Error using batch caused by error using save
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
Walter Roberson
2013-8-28
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?
回答(1 个)
Ryan
2017-11-27
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!