How do you suppress opening parpool messages?

6 次查看(过去 30 天)
Is there any way that you can stop parpool displaying messages upon set up and deletion?
i.e.
>> parpool(2);
Starting parallel pool (parpool) using the 'local' profile ... connected to 2 workers.
>> delete(gcp('nocreate'));
Parallel pool using the 'local' profile is shutting down.
I want to stop these updates displaying.
Thanks for your time.

回答(1 个)

Andrew Rowe
Andrew Rowe 2016-6-10
The only way I've found to do this is to execute the command with evalc. For example:
evalc('parpool(2)');
This should supress the output, but it doesn't give the script parser any insight into the code if you're running this in a script or function. For example, take the code:
function y = square(x) y = x^2;
will not raise any flags with the parser if run normally, but if you execute y = x^2 with an evalc call, then the parser will flag the function call and say that it appears the variables y and x are not used. It shouldn't make it not run, it will just provide an annoying warning that you either have to live with or suppress.

类别

Help CenterFile Exchange 中查找有关 Parallel Computing Fundamentals 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by