Why is batch job status' stays "queued"?

14 ビュー (過去 30 日間)
Valentina Watts
Valentina Watts 2012 年 6 月 19 日
コメント済み: David 2014 年 11 月 7 日
After I activate parallel processing with
>> matlabpool open
I submit a batch job as follows
>> j1 = batch('myscript')
Consequently, as I check the j1 structure, the status field shows "queued" and that does not change. I have run "myscript" directly without any problems. I have a four-core processor multithreaded to 8 processors. The script runs a loop that calculates values and outputs them in files. I have tried various fomulatins of matlabpool and batch with no improvement. I have restarted Matlab and even rebooted the computer.
I am looking for a way to run this script via batch to take advantage of the parallel processing and to run the jobs in the background.

採用された回答

Jill Reese
Jill Reese 2012 年 6 月 19 日
The interactive matlabpool that you explicitly opened is using all of your resources. Therefore, when you submit a batch job it is waiting in the queue until the matlabpool is closed and the resources are again available.
Do not open the matlabpool explicitly with "matlabpool open". Instead, submit your batch job using the syntax that allows you to specify the size of the matlabpool to use:
j1 = batch('myscript', 'matlabpool', 4);
  3 件のコメント
Jill Reese
Jill Reese 2012 年 6 月 21 日
What version of MATLAB are you using? Are you able to successfully validate the cluster you want to submit the batch command to?
David
David 2014 年 11 月 7 日
That fixed it. Thanks!

サインインしてコメントする。

その他の回答 (1 件)

Valentina Watts
Valentina Watts 2012 年 6 月 19 日
Jill, thank you. Your solution worked. I thought I had tried to run my batch file without matlabpool activation before, but I suppose I was mistaken.

カテゴリ

Help Center および File ExchangeMATLAB Parallel Server についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by