Parallel computing code: it works but not when compiled -- why? how to troubleshoot?

I have code that submits jobs to a cluster and runs fine when launched from inside a Matlab session. The same code, when compiled, runs into problems during execution. Why would it run differently when compiled? How to troubleshoot?
What I compile using mcc is a script that calls functions I've written (in the same directory), collects their outputs, and saves it to a file. Jobs get submitted to the cluster from within the functions. The job scheduler is of type 'lsf,' not the built-in Matlab Job Scheduler (MJS)).
Compiled serial Matlab code has run fine on this cluster, but this is the first time I've tried to run compiled parallelized code. To compile I'm doing: mcc -R -nodisplay -R -nosplash -C -m myFile.m
What additional information would be relevant? Any guidance/suggestions would be much appreciated!
Thanks in advance,

2 Commenti

Last I knew, scripts could not be compiled (but functions can be), but it could be that that limitation has been lifted.
I tried wrapping the script in a function and got the same result. The fact that the script compiles, runs, and fails while running does suggest that the compiler does support scripts. So this can't be the issue, right?
The error seems to specifically occur when the script calls a function that submits jobs to a cluster and then this function tries to retrieve the outputs from those jobs when their status becomes 'finished.' When running the code in compiled form, these jobs return no outputs, causing:
MException
Properties:
identifier: 'MATLAB:badsubscript'
message: 'Index exceeds matrix dimensions.'
cause: {}
stack: [2x1 struct]

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB Parallel Server in Centro assistenza e File Exchange

Richiesto:

il 7 Ott 2012

Community Treasure Hunt

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

Start Hunting!

Translated by