How can I load and save pictures, while executing the program in parallel?

6 views (last 30 days)
I need to parallelize a program, which can load a picture, evaluate several values from it and save some plots as PDF's, which are made by these values. The access and save location of these pictures is an shared folder on one of the clients. (The Networkpath is also added in the current Cluster Profiles properties under additional Paths) I can easily access and edit the folder in the Matlab current folder and from every worker's Computer manually.
But when i try to execute the program in parallel, the present working directory changes from the folder, where i execute the program from, and I want to save the pdf-files to, to „C:\Windows\TEMP\MDCE\Checkpoint\Controller_Controller_worker02_mlworker_log\matlab\work“. I tried to change the present working directory on the workers, by calling the command „ cd (TargetDir)“ in a function, which is executed in an parfor-loop. This resulted in the error:
Cannot CD to \\PD32A12\Documents\MATLAB\Thilo\AuszuwertendeBilder (Directory permission denied).
I currently got no further ideas on how i can get the workers to load the pictures from the specified directory and more importantly to save the created plots, so i hope you can give me some information, of what i've missed, or can do, to make the program work the way I explained above.

Answers (1)

Edric Ellis
Edric Ellis on 24 Feb 2015
Whether the workers can see that network location depends on the "security level" you're using (from the directory location you mention, I assume you're using MJS as the cluster type). See the documentation for more about that - you'll need to run at security level 3 to have the workers run using your identity.

Categories

Find more on Parallel for-Loops (parfor) in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!