Worker can't find attached files
Afficher commentaires plus anciens
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 commentaires
Edric Ellis
le 3 Déc 2020
Hm, strange. What happens if you do
fetchOutputs(parfeval(@which, 1, 'Driver_VLEmix'))
That should tell you where (if anywhere...) the file is on the worker. It may be that the error isn't 100% accurate as to precisely which file it cannot find - maybe there are some other code files you need to make available to the workers. (Are you using eval or feval in that file?)
Dominik Schäfer
le 3 Déc 2020
Modifié(e) : Dominik Schäfer
le 3 Déc 2020
PeymanS
le 17 Mar 2021
Hi Dominik,
I have faced the same problem. Have you found the solution?
Best,
Peyman
Réponse acceptée
Plus de réponses (1)
Chien-Han Su
le 1 Juil 2021
Modifié(e) : Chien-Han Su
le 1 Juil 2021
2 votes
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 commentaire
Maria
le 6 Oct 2021
thanks! Similar things here
Catégories
En savoir plus sur Parallel for-Loops (parfor) dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!