How can I get mpiprofile information from a parfor script?

7 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Raymond Norris
Raymond Norris il 8 Set 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

Categorie

Scopri di più su Parallel Computing Fundamentals in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by