Why the worker save the logsout first to the local machine?

1 次查看(过去 30 天)
I am trying to run a batch simulation in MATLAB using the following code:
in(i) = Simulink.SimulationInput(model);
in(i) = in(i).setPreSimFcn(@(x) myInitFun());
in(i) = in(i).setModelParameter(...
'LoggingToFile', logFileFlag,...
'SignalLogging', signalLogging,...
'LoggingFileName',logFilePathName,...
'StopTime', num2str(stop_time.sim_end),...
'SaveFormat', 'Dataset',...
'SaveTime', 'off',...
'SaveState', 'off',...
'SaveOutput', 'off',...
'SaveFinalState', 'off',...
'DSMLogging', 'off',...
'ReturnWorkspaceOutputs', 'on',...
'Profile', 'off',...
'InspectSignalLogs', 'off',...
'DatasetSignalFormat', 'timeseries'...
);
simJob = batchsim(myCluster, in, ...
'Pool', wn,...
'AutoAddClientPath', false,...
'AutoAttachFiles', false,...
'ManageDependencies', 'off',...
'AttachedFiles',filesToAttach,...
'TransferBaseWorkspaceVariables', 'off',...
'CleanupFcn', @Simulink.sdi.clear);
I've configured logging to save some signals from the Simulink model, but I'm facing an issue. Instead of saving the log file in the server directory specified by logFilePathName, each worker saves the log.mat file to its temporary folder. Only after all workers are done does it move the log to the correct folder. This has caused the cluster machine to run out of disk space.
What can I do to avoid this issue and make sure the log files are saved directly to the specified server folder to prevent disk space problems on the workers?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by