error using cluster computing

1 次查看(过去 30 天)
Luigi
Luigi 2023-10-12
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 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by