Could identical job storage locations for several running instances of a function affect the results?

1 次查看(过去 30 天)
I am currently running a function with different sets of input parameter on different nodes of a cluster. The function was compiled to standalone applications through mcc, which was then submitted with multiple sets of input parameters as separate jobs to the cluster using the PBS system.
The function uses parallelization (through parfeval). I noticed that the jobs resulted in errors when two of then where running simultaneously on different nodes of the cluster. I think that this was caused by a mistake in my code which resulted in the job storage location to be identical (the default location) for all running jobs.
I did the following
c = parcluster('local');
c.JobStorageLocation = strcat(getenv('VSC_SCRATCH'),'/',getenv('PBS_JOBID'));
pool = parpool(c.NumWorkers)
but the last line should have been
pool = parpool(c, c.NumWorkers)
My function however, still managed to save some data before it crashed.
I need to know if I can trust these results. Can the output of a function (in this case, mat files that are saved) be influenced by another instance of the same function that is using the same jobstoragelocation?

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by