MATLAB PARALLEL COMPUTING TOOLBOX - S Guida Utente Pagina 521

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 520
mpiprofile
11-177
Examples
In pmode, turn on the parallel profiler, run your function in parallel, and call the viewer:
mpiprofile on;
% call your function;
mpiprofile viewer;
If you want to obtain the profiler information from a communicating job outside of pmode
(i.e., in the MATLAB client), you need to return output arguments of mpiprofile info
by using the functional form of the command. Define your function foo(), and make it
the task function in a communicating job:
function [pInfo, yourResults] = foo
mpiprofile on
initData = (rand(100, codistributor()) ...
* rand(100, codistributor()));
pInfo = mpiprofile('info');
yourResults = gather(initData,1)
After the job runs and foo() is evaluated on your cluster, get the data on the client:
A = fetchOutputs(yourJob);
Then view parallel profile information:
pInfoVector = [A{:, 1}];
mpiprofile('viewer', pInfoVector);
See Also
profile | pmode | mpiSettings
Vedere la pagina 520
1 2 ... 516 517 518 519 520 521 522 523 524 525 526 ... 655 656

Commenti su questo manuale

Nessun commento