MATLAB Answers

How do I disable directory change detection for directories being added by ADDPATH while submitting jobs with Distributed Computing Toolbox in MATLAB 7.3 (R2007a)?

2 views (last 30 days)
I am creating tasks that require the accessing of many MATLAB files on my shared file system. For this reason, I have created a taskStartup.m file that contains several ADDPATH commands to add the directories containing my MATLAB files to the workers' paths every time a task is run. However, my submitted jobs fail. Upon checking the task error:
task.ErrorIdentifier
task.ErrorMessage
I receive the following:
ans =
MATLAB:fileio:cantOpenFileNoPermission
ans =
\\servername\files\file1.m:
Cannot open file: permission denied.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Jul 2009
This error indicates that the Windows file server may have run out of change notification handles. To work around this, you can use the "-frozen" option for ADDPATH:
addpath -frozen <pathname>
This option adds the directory to the path but does not take out a change notification handle for that file.
This option should be used with care. The MATLAB files accessed by the workers should not be modified during task execution. As long as modifications are made between jobs and the ADDPATH commands are run once per job, workers will see the updated code in subsequent jobs.
For more information on change notification handles, execute the following commands at the MATLAB command prompt:
help changeNotification
help changeNotificationAdvanced
See the related solution on Change Notification Handles below for more information.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!