The source code for the parfor-loop that is trying to execute on the worker could not be found.
23 ビュー (過去 30 日間)
古いコメントを表示
Hi. I have compiled my code and I'm trying to run it by matlab runtime on a linux HPC server. The code has been parallelized by parfor and it works well in matlab, but when I try to run it with matlabruntime I get this error while I don't use "nanmean" in my code.
The source code (parallelized_closedLoopSimulation) for the parfor-loop that is trying to execute on the worker could not be found.
Caused by:
Undefined function 'nanmean' for input arguments of type 'double'.
Error using remoteParallelFunction (line 84)
Worker unable to find file.
Undefined function 'nanmean' for input arguments of type 'double'.
MATLAB:parfor:SourceCodeNotAvailable.
Here is part of my parfor loop:
parfor run = 1: nbRun
fprintf(['%%%%****** RUN NUM: ' num2str(run) '******%%%%%'])
%% ===== Step 3 - starting of 26 chunks of consequitive trials =======
for chunk = 1:length(chunks)
fprintf(['START chunk number: ' num2str(chunk) '/n']);
current_chunk = chunks{1,chunk}{1,1};
sCfg = [];
sCfg.dataset = currentSessionPath;
sCfg.trialdef.eventtype = cTRIGTYPE;
sCfg.trialdef.eventvalue = ceTRIG;
sCfg.trialdef.prestim = PRESTIM;
sCfg.trialdef.poststim = POSTSTIM;
sCfg.trialfun = cTRIALFUN;
...
end
1 件のコメント
Christopher McCausland
2023 年 12 月 12 日
Hi Sina,
nanmean() is an inbuilt function which calculates the mean value, ignoring NaN's. I believe it is depreciated and mean() with pairwise inputs to specify the NaN behaviour is preferred.
That being said, this is beside the point. Your worker nodes cannot see these inbuilt functions. Are you sure that the root folder of MATLAB installation to cluster ClusterMatlabRoot is set to the correct path?
Kind regards,
Christopher
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Parallel for-Loops (parfor) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!