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
Best Answer