Log file of minimization done in parallel using batch

Asked by Fernando on 6 Jul 2012
Latest activity Commented on by Fernando on 9 Jul 2012

Hi,

I'm working on a problem that has an outer minimization that searches over one set of parameters, and an inner minimization that for every iteration of the outer one, solves n systems of equations, where each system depends on the parameter values of the iteration of the outer loop. As all systems of the inner loop are independent of each other, I can use the parallel features of MATLAB to speed up the outer minimization. This work perfectly when using the 'local' profile in my laptop and I save a lot of time by using PARFOR in the inner minimization, compared with the same situation without parallelizing the inner loop.

However, I need to submit this as a batch job to a remote cluster, and I would like to be able to monitor the job. In particular, I would like to see the value of the objective function at each iteration, as it is shown in my laptop when 'Display','iter' is specified in options.

I have tried using

job = batch('script', 'matlabpool', 4,'CaptureDiary',true)

However, using

diary(job)

while the job is running returns nothing. It seems that I'll have to wait to see the output of diary() until the job is finished. Is there any way to observe what I want? I would like to have a log file as the one that is generated when I run the script as a batch job without using the parallel features.

Thanks,

Fernando

0 Comments

Fernando

Products

No products are associated with this question.

1 Answer

Answer by Edric Ellis on 9 Jul 2012
Accepted answer

At this time, it's not possible to get the diary output from a batch job until after the job has completed execution. You could manually write status output to a file using fopen/fprintf/fclose.

1 Comment

Fernando on 9 Jul 2012

Hi Edric,

Thanks for your answer,

Fernando

Edric Ellis

Contact us