フィルターのクリア

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
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 ExchangeParallel for-Loops (parfor) についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by