Clear Filters
Clear Filters

How do you suppress opening parpool messages?

9 views (last 30 days)
jsmith179
jsmith179 on 22 Mar 2015
Answered: Andrew Rowe on 10 Jun 2016
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.

Answers (1)

Andrew Rowe
Andrew Rowe on 10 Jun 2016
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.

Categories

Find more on Parallel Computing Fundamentals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!