Parallel pool on AWS needs files attached

2 次查看(过去 30 天)
Hi,
I have just conneted to AWS to get several workers running my code. However the error message below comes up without any clue of what file should I include in the workers. Apparently they need a function 'isShapeOnXY' which I don't know what it is about, and matlab offers me to addAttachedFiles() to upload the file to the worker, buy since I don't know what 'isShapeOnXY' is I don't know what file should I provide. What's more, the error is just using a mere '+' sign, when I go to the function where the problem is, I find that is a very simple operation.
Of course, when I do parallel computing in my local everything works perfectly.
I would appreciate if sb could give some gidance on how to get around this issue.
KR
Error using +
An UndefinedFunction error was thrown on the workers for 'isShapeOnXY'. This might be because the file containing
'isShapeOnXY' is not accessible on the workers. Use addAttachedFiles(pool, files) to specify the required files to be
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
attached. For more information, see the documentation for 'parallel.Pool/addAttachedFiles'.
Error in CA_Eq (line 31)
Error in SSE_CA_MW_SMM (line 72)
Error in SMM_obj_func (line 81)
Error in fcnvectorizer>@(x)SMM_obj_func(param,mmts,'param_est',x,'parnames',estpar_names)
Error in createAnonymousFcn>@(x)fcn(x,FcnArgs{:}) (line 11)
Error in fcnvectorizer (line 22)
parfor (i = 1:popSize)
Error in makeState (line 69)
Score = fcnvectorizer(state.Population(initScoreProvided+2:end,:),FitnessFcn,1,...
Error in galincon (line 24)
state = makeState(GenomeLength,FitnessFcn,Iterate,output.problemtype,options);
Error in ga (line 414)
[x,fval,exitFlag,output,population,scores] = galincon(FitnessFcn,nvars, ...
Error in CA_MW_E2E (line 76)
param_hat = ga(@(x)
SMM_obj_func(param,mmts,'param_est',x,'parnames',estpar_names),length(estpar_names),[],[],[],[],lb,ub,[],options_ga);
Caused by:
Undefined function 'isShapeOnXY' for input arguments of type 'double'.
Failure in user-supplied fitness function evaluation. GA cannot continue.
  1 个评论
Edric Ellis
Edric Ellis 2022-7-11
The method isShapeOnXY is required by class shape.Shape. Somehow it looks like this is missing from your AWS instance. It should be under <matlabroot>/toolbox/shared/em_cad/authoring for the most recent release of MATLAB. How are you setting things up with AWS? Which release are you using?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by