フィルターのクリア

uniquetol give an "Unknown option specified" error when I run it on a cluster

2 ビュー (過去 30 日間)
I have code that I'm trying to run on a cluster. I've tested my code on a local host and it works fine, but if I run it on my cluster the MATLAB built-in function `uniquetol` errors out.
I call my function with the following script:
%% submit_script.m
cluster = parcluster('MyGenericClusterProfile') % NOTE: if I change the cluster profile to 'local' I don't have any errors
job = createCommunicatingJob(cluster);
job.numWorkersRange=[1 1]; % Trying to get it to work on a single node before I scale up and add communications functionality
createTask(job,@myFunction,0,{},'CaptureDiary',true);
submit(job);
%% myFunction.m
function myFunction()
% Lots of code building and setting up arrays, some of which are
% gpuArrays but none of the ones in uniquetol are gpuArrays
class(A) % returns 'double' in Task1.diary.txt
[C,IA,IC]=uniquetol(A,1e-4,'highest'); % According to Task1.out.mat, generates a MATLAB:uniquetol:UnknowOptions ParallelException when run on cluster
end
If I comment out the 'highest' option of uniquetol while running on the cluster, my code runs without Exceptions but I need that option to get the correct run-time results. Why does my code behave differently depending on where I run it, and how do I make it behave correctly?

採用された回答

Walter Roberson
Walter Roberson 2022 年 8 月 23 日
That option is new as of R2021b, the release after your cluster has.
  2 件のコメント
Raymond Norris
Raymond Norris 2022 年 8 月 24 日
A couple of comments
  • There's a typo in your example
;CaptureDiary'
should be
'CaptureDiary'
  • @Walter Roberson is probably right, I'm just puzzled how @Frank Moore-Clingenpeel is running R2021b locally (where it works), but then R2021a on the cluster, since MATLAB should have thrown a version mismatch. Unless the client is running R2021a on the cluster as well, but Frank didn't run the code locally on the cluster.
Frank Moore-Clingenpeel
Frank Moore-Clingenpeel 2022 年 8 月 24 日
編集済み: Frank Moore-Clingenpeel 2022 年 8 月 24 日
Fixed the typo, for posterity.
Yeah, this is the issue. My development machine and the machine submitting the job are different, due to firewall reasons. I copy my code over to a login node and submit from there. I was certain the local development machine was R2021a but further investigation shows that it's actually R2021b.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by