error using cluster computing

조회 수: 13 (최근 30일)
Luigi
Luigi 2023년 10월 12일
댓글: Walter Roberson 2023년 10월 17일
I am running a matlab script I wrote using a cluster on a company's server. My code includes parfor loops, which have been modified using opts=parforOptions(cluster).
While running the code I receive the following message:
" Error: The parallel job was cancelled because the task ID 1 terminated abnormally for the following reason: Shapes requires a RF_PCB_Toolbox license".
I am not using Shape anywhwere in the code as I am simply solving a system of equations using lsqnlonlin and fmincon through functions that appear in the parfor loops.
Any idea what this error implies? The error does not appear when running the code on my local machine. In fact on my local machine the code runs just fine (e.g., without any errors appearing).
  댓글 수: 4
Walter Roberson
Walter Roberson 2023년 10월 12일
Time to start debugging, such as putting a whos right before the parfor, and putting a whos right before the lsqnonlin . If the whos before the lsqnonlin execute successfully then you would have isolated the problem to somewhere in the lsqnonlin call; meanwhile the whos before the parfor tell you whether you reached the start of the parfor at all.
Raymond Norris
Raymond Norris 2023년 10월 13일
What's odd about this is that really the only way you could have triggered a call to shapes is with a PrintedLine object and therefore you should have seen the license issue regarding PrintedLine before shape was instantiated.
To me, there's a scoping issue here. f() is anonymous and not nested, correct? At the top level, are you running a script or a function?
Can you show us more of how you run the parallel code? How are you calling parfor? (and side note, I'm gathering you're not using parallel in your solver?)

댓글을 달려면 로그인하십시오.

답변 (1개)

Luigi
Luigi 2023년 10월 13일
Issue resolved. Turns out one of the parameters that I am using in the functions handle was "delta" and delta seems to be a reserved object https://www.mathworks.com/help/rfpcb/ref/delta.html
I take that the lesson is to never use greek letters to name objects. The issue was surprising to the extent that I have frequently used this parameter name before in other occasions and never encountered this problem, until today when running my code in the cluster.
  댓글 수: 4
Raymond Norris
Raymond Norris 2023년 10월 17일
I wouldn't say don't use greek names anymore than I would say don't use any MATLAB function name as a variable (not necessarily easy to do). In fact only nine of the greek letters are MATLAB functions.
Walter Roberson
Walter Roberson 2023년 10월 17일
Where you happening to "poof" delta into existance, such as using load() with no output variable, or using assignin('caller') or assignin('base') ?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by