Error using batch caused by error using save
6 views (last 30 days)
Show older comments
Hello together,
I tried to make my first steps in the command batch. When I try to make a little example, like in the online documentation, I get an error, which I couldn't handle.
I made a script (exampleParfor.m) and testet it (it runs fine). By executing with the run-button of the editor, I choosed "Add to path". In the next step I tried to make a batch-job with this script, but I get this error:
j = batch('parforExample')
Error using batch (line 177)
An unexpected error occurred accessing properties: "CaptureDiary" "CreateTime" "DependentFiles" "Diary" "Error" "ErrorIdentifier" "ErrorMessage" "FinishTime" "Function" "InputArguments" "Name" "NumOutputArguments" "OutputArguments" "StartTime" "StateEnum" "Worker"
Caused by:
Error using save
The data no longer exists on the device.
I even tried to change the path in the command window, but the error still occurs. The operation system I am using is Linux 64bit and Matlab R2013a
Many thanks in advance,
Greatings
Sascha
2 Comments
Walter Roberson
on 28 Aug 2013
Do you have a "clear" statement in your code? And is it a "function" with a matching "end" statement (forming a static workspace) ? Or how are you determining the variables to save? Just using save with a filename and no variable name?
Answers (1)
Ryan
on 27 Nov 2017
I have also had this error. The problem tracks down to a save() line within FileSerializer.m ... the batch command is saving task information into a batch job folder, and the task data exceeds the size for the default save option. Two fix options: (A) Change your default save option to 7.3 or (2) actually patch FileSerializer itself such that even if user save options are set to the faster -v6 save, it still works when task files are too big.
save(filename, '-struct', 'data', saveFlags);
becomes ...
try % -- TASK FILE SIZE CAN CAUSE THIS TO CRASH!, adding -v7.3 averts failure
save(filename, '-struct', 'data', saveFlags);
catch ME
save(filename, '-struct', 'data', saveFlags,'-v7.3');
end
0 Comments
See Also
Categories
Find more on Search Path in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!