I searched online for how to suppress warnings in parfor workers, and i got the code like:
pctRunOnAll warning('off', 'all');
and I added this statement in my function to start to parpool:
function startParpool()
if isempty(gcp('nocreate'))
if isdeployed
setmcruserdata('ParallelProfile', fullfile(ctfroot, '\config\MyDefaultProfile.settings'));
end
parpool(20);
end
pctRunOnAll warning('off', 'all');
end
Everything is fine in Matlab IDE and the warnings during parfor are perfectly suppressed.
But after I compiled the program into application (using application compiler), I got this weird error when I run the application in command line:
what is the error Undefined function or variable 'parallel.internal.pool.interPPromptFcn' ??
(if i removed the above statement, the error will be gone, but the warnings are not suppressed.)