function htmlOut = mpiprofview(functionName, profileInfoArray)
% MPIPROFVIEW   Display HTML profiler interface.
%   This function is unsupported and might change or be removed without
%   notice in a future version.
%
%   MPIPROFVIEW (functionName, profileInfoArray)
%   functionName can be either a name or an index number into the profile.
%   profileInfoArray is a concatenated array of  profileInfo structures where
%   profileInfo = MPIPROFILE('INFO') when run on the worker MATLAB(s).
%   The index into profileInfoArray should correspond to the spmdIndex of the worker.
%   If the functionName argument passed in is zero, then mpiprofview displays
%   the profile summary page for the first worker in the profileInfoArray array.
%
%   See also MPIPROFILE, PROFVIEW.

%   Copyright 1984-2023 The MathWorks, Inc.

% mpiprofile viewer and mpiprofview are not supported in MATLAB clients which are not local (see g2175913)
import matlab.internal.capability.Capability
Capability.require([Capability.LocalClient]);

matlab.internal.profileviewer.updateProfileViewer(matlab.internal.profileviewer.ProfilerType.MPI, ...
    @mpiprofile, functionName, profileInfoArray);

if nargout == 1
    htmlOut = '';
end
