Worker can't find attached files

16 ビュー (過去 30 日間)
Dominik Schäfer
Dominik Schäfer 2020 年 12 月 3 日
コメント済み: Maria 2021 年 10 月 6 日
Hi Matlab Community,
We've set up a Jenkins server for our simulation code. We have a set of test cases, where output data of our code is compared to reference values from the literature or stable versions of the code. Matlab on jenkins server is Version 2020b/Linux.
One test case, which is going into a parfor loop, can't seem to find the source code files for the workers. Other test cases, which run basically the same parts of the code including this exact parfor loop, have no problems whatsoever. I get the following error:
Error using Driver_VLEmix (line 167)
The source code
(*********************************************/Driver_VLEmix.m) for
the parfor-loop that is trying to execute on the worker could not be found.
Auto attached files are being stored in the home directory of the Jenkins user. The file is on the other hand listed via listAutoAttachedFiles(gcp())
Files automatically added to the parallel pool:
*********************************************/Driver_VLEmix.m
I tried a run, where I manually attach the file, still the same result.
This error only occurs on the jenkins server. On our local machines, it works just fine (Linux 2019b, Win 2020b).
This is the only case, where I get the following message when the parpool is initialized:
Analyzing and transferring files to the workers ...done.
Which I'd guess is where the files are automatically attached. Any ideas what could be wrong?
Best regards,
Dominik
  3 件のコメント
Dominik Schäfer
Dominik Schäfer 2020 年 12 月 3 日
編集済み: Dominik Schäfer 2020 年 12 月 3 日
Hi Edric,
we have basically one main script and one subdirectory src/ containing all functions. At the start of the main script, the subdirectory src/ with all functions is added to the path list.
fetchOutputs(parfeval(@which, 1, 'Driver_VLEmix')) has given:
>> fetchOutputs(parfeval(@which, 1, 'Driver_VLEmix'))
ans =
'/tmp/tp430c38ea_816a_4e76_9cb2_238c7e8ab218rp38541/a/tp29d74774_ee86_4d86_a833_26b886057d52/Driver_VLEmix.m'
I have checked the list of auto attached files and not all files in src/ have been auto attached. But I guess, the parpool initializer only auto attaches files, that it considers relevant to the running job. I already did a run, where I manually attached the whole src/ directory to the processpool.
Neither eval nor feval used in Driver_VLEmix.m.
Best regards,
Dominik
PeymanS
PeymanS 2021 年 3 月 17 日
Hi Dominik,
I have faced the same problem. Have you found the solution?
Best,
Peyman

サインインしてコメントする。

採用された回答

Dominik Schäfer
Dominik Schäfer 2021 年 3 月 17 日
Hi Peyman,
one of the subfunctions in the parfor loop called the (not recommended) nansum function.
When we changed nansum to sum(A,'omitnan') everything worked as intended.
Hope this helps!
Best regards,
Dominik

その他の回答 (1 件)

Chien-Han Su
Chien-Han Su 2021 年 7 月 1 日
編集済み: Chien-Han Su 2021 年 7 月 1 日
I accidentally triggered this error as well, and the fail is resulted from, in the parfor loop, an wrongly called non-existent variable/function due to typos.
I think for any one who has the same problem, one possible way to deal this is turn off the parallel procedure at first (using "for" instead of "parfor"). In this way, matlab will return a more detailed error massage, and that's how I figure it out.
  1 件のコメント
Maria
Maria 2021 年 10 月 6 日
thanks! Similar things here

サインインしてコメントする。

カテゴリ

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