MATLAB: Do I receive a “nonexistent directory” error when I try to CD to a directory using the MATLAB Distributed Computing Engine 1.0.1 (R14SP2)

changecomputeddctdirectorydistributedMATLAB Parallel ServermdceParallel Computing Toolboxpath

In my taskStartup.m file for the MDCE, I am trying to CD to a directory. I can CD to this directory without an error from the MATLAB command window. However, when I CD to this directory from my taskStartup.m file, I get the following error:
Error using ==> cd
Cannot CD to s:\tempdir\ (Name is nonexistent or not a directory).

Best Answer

A Distributed Computing worker runs as a service. On Windows, a service does not know about network drive mappings.
As a workaround, use UNC paths, e.g., \\mathworks\tempdir instead of S:\ on a Windows machine. The worker can still CD to a local drive like C:\ or D:\.