How do you suppress opening parpool messages?

6 visualizaciones (últimos 30 días)
jsmith179
jsmith179 el 22 de Mzo. de 2015
Respondida: Andrew Rowe el 10 de Jun. de 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.

Respuestas (1)

Andrew Rowe
Andrew Rowe el 10 de Jun. de 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.

Categorías

Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by