How to delay a queued job's execution until some other jobs have finished
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How do I make a batch job delay its execution until another set of jobs is executed?
The background is the following:
- I have to execute multiple simulation runs in parallel.
- I want to output the result of all the simulations into one plot
- I want to save the diaries of each simulation run to check for warnings and errors.
- I want to continue working interactively while the simulations are running.
To fulfil requirements 1 & 2, I can use `batch(.)` to execute the jobs and `wait(.)` to wait for their completition before creating the plots, or `parfor`. However, to fulfill requirement 3, I need to use `batch(.)`, because I have found no possibility to save the diaries and outputs of `parfor` parallel jobs. This is possible with `batch(.)`.
To fullfil requirement 4, my idea was to create a plotting job which saves the plots to disk. It can read the output of the preceeding jobs from disk as well. However, I fear that I might block one worker if the plotting job executes before all the simulation jobs are complete.
Thank you for any idea!
0 commentaires
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!