changes in WDM pt5

This commit is contained in:
Silas Oettinghaus
2025-09-17 16:19:53 +02:00
parent 20b6d9c75a
commit cbc0ceff0a
2 changed files with 103 additions and 75 deletions

View File

@@ -52,4 +52,29 @@ if isempty(p) || p.NumWorkers ~= cpus
if ~isempty(p), delete(p); end
p = parpool(c, cpus); % avoids the queued state
end
fprintf('parpool up with %d workers; JobStorage=%s\n', p.NumWorkers, c.JobStorageLocation);
fprintf('parpool up with %d workers; JobStorage=%s\n', p.NumWorkers, c.JobStorageLocation);
% result filename (timestamp + optional job id)
t = datetime('now','TimeZone','local','Format','yyyyMMdd_HHmmss');
jobid = getenv('SLURM_JOB_ID'); if isempty(jobid), jobid = 'nojid'; end
host = getenv('HOSTNAME'); if isempty(host), host = 'localhost'; end
% Output directory depends on platform
if ispc
output_root = fullfile('C:\Users\Silas\Documents\MATLAB\Datensätze\FWM_2025\');
else
output_root = '/work_beegfs/sutef391/results_WDM';
end
if ~exist(output_root,'dir'), mkdir(output_root); end
% Build filename
t = datetime('now','TimeZone','local','Format','yyyyMMdd_HHmmss');
jobid = getenv('SLURM_JOB_ID'); if isempty(jobid), jobid = 'nojid'; end
host = getenv('HOSTNAME'); if isempty(host), host = 'localhost'; end
fname = sprintf('WDM_%s_%s_%s.mat', char(t), host, jobid);