old batch job blocking new ones

Hi,
Since I have code which involves big 'for' loops that seemed to me ideal for parallel computation, I was trying to set up a parallel batch job. With only little experience in parallel computing, I was exercising, hoping, there'll be some "learning-by-doing", following some examples and "first steps" in the MATLAB help browser.
I cannot tell what went wrong but it seems ever since my practice session, there is a batch job running, blocking all new jobs I want to set up. Command output from 'findJob' and 'findRessource' suggests that this blocking job always starts whenever I open my matlab pool. Interestingly, looking at the processor load, this job seems to do nothing at all.
I tried to set up a new configurations, to delete the 'local_scheduler_data' folder and even to change the user. Nothing helped. I couldn't find a solution searching Google and MathWorks so I really would appreciate if anyone could help me. Currently, I have MATLAB R2011a installed and I'm using OpenSuse 11.4.
Thanks in advance, Mathias

 Réponse acceptée

Edric Ellis
Edric Ellis le 19 Août 2011

0 votes

When you open a MATLABPOOL, you are running a job on your scheduler. That job is connected up to your MATLAB client to provide workers to run the body of any PARFOR loops you may execute. I would suggest you follow one or other of the following paths:
  1. Change your code to use PARFOR loops rather than FOR loops, and open a MATLABPOOL prior to running stuff
  2. Submit batch jobs using the 'batch' function, but do not open a MATLABPOOL.

Plus de réponses (1)

Mathias
Mathias le 22 Août 2011

0 votes

Hi Edric,
Thanks for your answer. Changing the appropriate for-loops to parfor-loops was the first thing I did when preparing my code for parallel execution. But using the batch command, apparently, I really don't have to open a matlabpool at all -- even for parallel jobs (command: batch('script','matlabpool',#workers) ). Does MATLAB use the default pool automatically or does it run the code sequentially in this case?
Anyway, I figured out that in my state of experience, spmd may be a more convenient choice.

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by