Unable to set NumThreads when creating a job

7 ビュー (過去 30 日間)
Kevin
Kevin 2018 年 2 月 12 日
編集済み: Edric Ellis 2018 年 2 月 16 日
I seem to be unable to set NumThreads when creating a job:
>> sge = parcluster('sge');
>> class(sge)
'parallel.cluster.Generic'
>> sge.NumThreads
1
>> job = sge.createJob('NumThreads',4);
>> class(job)
'parallel.job.CJSIndependentJob'
>> job.NumThreads
1
I'm able to set the other job properties just fine by passing arguments to createJob(). For now, my workaround is to modify the parallel.cluster.Generic object before creating the job:
>> sge.NumThreads = 4;
>> job = sge.createJob();
>> job.NumThreads
4
Is this a bug? Or am I doing this wrong?
I am using the Parallel Computing Toolbox with MATLAB R2017a.

採用された回答

Edric Ellis
Edric Ellis 2018 年 2 月 16 日
編集済み: Edric Ellis 2018 年 2 月 16 日
Thanks for reporting this - it does indeed look like a bug. I'll forward this report to the appropriate team here at MathWorks.
To expand a little on this - NumThreads is only intended to be configurable on a per-cluster basis rather than a per-job basis. So, in this case, probably the createJob call should reject your attempt to set NumThreads on the job.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeThird-Party Cluster Configuration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by