Saving and resuming the parfor states
Mostra commenti meno recenti
Is it possible to save the states of parfor loop, stop/break and restart from the same state. For example, in may case some time Windows crashes and I can not run the simulaiton from the same state, I have to run from initial level. In a simple for loop, I can save the variable i and ourval then I can run the for loop. In the code shown below, I have only variable i chaning in the parfor. Can I save parfor states after some interval and after restarting Matlab I can have all the variables in the wokspace resume parfor from same states.
% cubeL=51;
% XYZw=[90 100 108];
% P_labs, xyz nx3 matrix
% some_function is a function
ourval=zeros(size(xyz));
parfor i=1:cubeL*cubeL*cubeL
ourval(i,:)= some_function(xyz(i,:),P_labs,rgb,XYZw);
endd
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Parallel for-Loops (parfor) in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!