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

2 vues (au cours des 30 derniers jours)
Szabó Bence Károly
Szabó Bence Károly le 30 Août 2023
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?

Réponses (0)

Catégories

En savoir plus sur Prepare Model Inputs and Outputs dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by