How can I get mpiprofile information from a parfor script?

2 visualizaciones (últimos 30 días)
John B.
John B. el 8 de Sept. de 2020
Comentada: John B. el 9 de Sept. de 2020
I have been unable to launch the parallel profiler outside of an spmd block, which prevents usage of parfor. I always get the same error when I try to turn on the profiler, both with and without a parallel pool running. Is there something obvious that I am missing, or is there something more nuanced about how mpiprofile is used?
>> mpiprofile on
Error using mpiprofile (line 162)
MPIPROFILE on must run in pmode or as part of a parallel job.
See doc for MPIPROFILE in the Parallel Computing Toolbox.

Respuestas (1)

Raymond Norris
Raymond Norris el 8 de Sept. de 2020
Hi John,
Prior to R2020a, you need to call mpiprofile within pmode or a parallel job, as shown in this example:
In R2020a, we began sunsetting pmode. With that we also allow for mpiprofile to be called either inside or outside of an spmd block, such as with this contrived example
p = parpool('local',4);
Starting parallel pool (parpool) using the 'local' profile ...
Connected to the parallel pool (number of workers: 4).
mpiprofile on
A = distributed.rand(400);
b = distributed.rand(400,1);
x = A\b;
mpiprofile off
mpiprofile viewer
Raymond

Categorías

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

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by