Weird error happens after suppress warnings in parfor workers
Mostra commenti meno recenti
I searched online for how to suppress warnings in parfor workers, and i got the code like:
pctRunOnAll warning('off', 'all'); % supress warnings on all workers
and I added this statement in my function to start to parpool:
function startParpool()
% import parallel profile and startup parpool workers
if isempty(gcp('nocreate'))
if isdeployed
setmcruserdata('ParallelProfile', fullfile(ctfroot, '\config\MyDefaultProfile.settings'));
end
parpool(20); % matches # of cores on ARMS server
end
pctRunOnAll warning('off', 'all'); % supress warnings on all workers
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.)

Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Parallel Computing Fundamentals in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!