Why do I receive the error Unable to read file '<filename>'. No such file or directory in MATLAB Workers?

3 views (last 30 days)
I would like to load some MAT files and do some operations.
But, when I do it in parallel, I get the following error-
ERROR: Unable to read file 'mockdata.mat'. No such file or directory.
How to fix this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 22 Oct 2021
Edited: MathWorks Support Team on 26 Oct 2021
Use addAttachedFiles if you would like to access files from workers.
'addAttachedFiles' adds extra attached files to the specified parallel pool. These files are transferred to each worker and are treated exactly the same as if they had been set at the time the pool was opened — specified by the parallel profile or the 'AttachedFiles' argument of the parpool function.

More Answers (0)

Categories

Find more on Parallel Computing Fundamentals in Help Center and File Exchange

Products


Release

R2016a

Community Treasure Hunt

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

Start Hunting!