Documents affected: https://curc.readthedocs.io/en/latest/software/matlab.html
Issue: This is related to a recent case we received, INC1368817. If a parallel pool ("parpool") is not explicitly created by a user prior to running a "parfor" loop, the number of workers will default to 12, no matter how many cores the user has requested. Our MATLAB documentation currently does not cover the creation of parallel pools, although it does cover "parfor" loops. Recommend that we include an example for creating a parallel pool, e.g.:
% Start pool safely
pool = gcp('nocreate');
if isempty(pool)
pool = parpool(16);
end
% Parallel work
parfor i = 1:16
fprintf("Hello, World from process %i\n", i);
end
% Clean shutdown
delete(pool);