From c690c5c73a4d43bf2ef36b250dfcaaca9082e6f3 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Thu, 22 Dec 2011 13:40:29 +0100 Subject: [PATCH] matlab: fixes in RunOpenEMS_Parallel --- matlab/RunOpenEMS_Parallel.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/matlab/RunOpenEMS_Parallel.m b/matlab/RunOpenEMS_Parallel.m index 408838a..7ec9b99 100644 --- a/matlab/RunOpenEMS_Parallel.m +++ b/matlab/RunOpenEMS_Parallel.m @@ -1,5 +1,5 @@ -function [stdout, stderr] = RunOpenEMS_Parallel(Sim_Paths, Sim_Files, opts, Settings) -% function [stdout, stderr] = RunOpenEMS_Parallel(Sim_Paths, Sim_Files, opts, Settings) +function [stdout, stderr] = RunOpenEMS_Parallel(Sim_Paths, Sim_Files, opts, Settings, varargin) +% function [stdout, stderr] = RunOpenEMS_Parallel(Sim_Paths, Sim_Files, opts, Settings, varargin) % % Run multiple openEMS simulations in parallel, distributed on multiple % machines using a ssh host_list! (currently on Linux only) @@ -23,12 +23,12 @@ function [stdout, stderr] = RunOpenEMS_Parallel(Sim_Paths, Sim_Files, opts, Sett % ----------------------- % author: Thorsten Liebig 2011 -pause_queue = 1; %pause between consecutive runs (needed for FindFreeSSH) +pause_queue = 5; %pause between consecutive runs (needed for FindFreeSSH) skip_parallel = 0; % currently only supporting linux, run conventional RunOpenEMS -if ~isunix || +if ~isunix warning 'your OS is not supported (Unix only), running default RunOpenEMS'; skip_parallel = 1; end @@ -62,7 +62,7 @@ end % get the path to this file [dir] = fileparts( mfilename('fullpath') ); -queue = InitQueue('DependPath',dir); +queue = InitQueue('DependPath',{dir}, varargin{:}); % spawn multiple simulations numSims = numel(Sim_Paths); @@ -73,7 +73,7 @@ for n=1:numSims Sim_File = Sim_Files; end - queue = Add2Queue(queue,'RunOpenEMS',{Sim_Paths{1}, Sim_File, opts, Settings}); + queue = Add2Queue(queue,'RunOpenEMS',{Sim_Paths{n}, Sim_File, opts, Settings}); disp(['openEMS simulation #' int2str(n) ' in directory: ' Sim_Paths{n} ' started!']); pause(pause_queue); end