Azzera filtri
Azzera filtri

Speeding up a batching process that takes too long

3 visualizzazioni (ultimi 30 giorni)
I have been using the batch() function to run a needy process in the background using multiple workers in a local pool. The problem I'm finding is that the execution of batch() in my case actually takes a very long time, in some cases almost as long as it would take the process itself to finish. I've tried to re-write it so that the batching process (which takes a while) is called in a script, and that script is then itself batched. What I end up with is an error saying that workers cannot submit jobs to the local cluster. Does anyone know if there is a way to support parallel batching done in the background?

Risposta accettata

Edric Ellis
Edric Ellis il 27 Lug 2015
You can use parfeval on top of a parallel pool to do this. (Note that by opening a parallel pool of workers, you're actually reducing the number of workers available to run batch jobs - workers can work on either parallel pool things ( parfor, parfeval, and spmd ), or batch - but not both at the same time).
The programming interface to parfeval is broadly similar to batch, so it should not be too difficult to adapt your code to use that instead. parfeval has the advantage of lower overheads once your parallel pool is set up ( batch has to launch a new MATLAB worker process for each task that it executes).

Più risposte (0)

Categorie

Scopri di più su MATLAB Parallel Server in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by