error using cluster computing

9 views (last 30 days)
Luigi
Luigi on 12 Oct 2023
Commented: Walter Roberson on 17 Oct 2023
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 Comments
Walter Roberson
Walter Roberson on 12 Oct 2023
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 on 13 Oct 2023
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?)

Sign in to comment.

Answers (1)

Luigi
Luigi on 13 Oct 2023
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 Comments
Raymond Norris
Raymond Norris on 17 Oct 2023
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 on 17 Oct 2023
Where you happening to "poof" delta into existance, such as using load() with no output variable, or using assignin('caller') or assignin('base') ?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!