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

조회 수: 13 (최근 30일)
Szabó Bence Károly
Szabó Bence Károly 2023년 8월 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에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by