Saving values in parfor loops
Afficher commentaires plus anciens
I have a large database (1e8,4) and I want to use parfor command to do some calculations. I also want to use matlabpool command. My problem is in saving the output of the calculations. I used the following line to save the outputs:
parsave(sprintf('%d.mat', i), NumCr, NumNi);
where parsave is a function to save variables NumCr and NumNi.
The problem is that since this line of the code creates a huge number of *.mat files, MATLAB crashes. I also know that with matlabpool open command, global variables are not working. Is it possible to mention how I can save the values?
2 commentaires
Edric Ellis
le 17 Avr 2013
Why do you want to save data from the workers - is it not sufficient to let the PARFOR loop complete and save the data from the client?
Are you creating one file per 1e8 iterations of your PARFOR loop?
Ronaldo
le 17 Avr 2013
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!