- First unix platform fixes (working for parallel runs of the local machine; remote commands still to be implemented);
- avoid use of ls and use dir instead (ls gives different results in win and unix); git-svn-id: https://www.dynare.org/svn/dynare/trunk@2693 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
c68ea2110a
commit
4c141a2044
|
@ -95,7 +95,7 @@ end
|
||||||
|
|
||||||
if Parallel(indPC).Local == 1, % run on the local machine
|
if Parallel(indPC).Local == 1, % run on the local machine
|
||||||
if isunix,
|
if isunix,
|
||||||
% command1=['start /B psexec -W ',DyMo, ' -a ',int2str(Parallel(indPC).NumCPU(j-nCPU0)),' -low matlab -nosplash -nodesktop -minimize -r fParallel(',int2str(offset+1),',',int2str(sum(nBlockPerCPU(1:j))),',',int2str(j),',',int2str(indPC),',''',fname,''')'];
|
command1=['ssh localhost "cd ',DyMo, '; ',matlabroot,'/bin/matlab -nosplash -nodesktop -minimize -r fParallel\(',int2str(offset+1),',',int2str(sum(nBlockPerCPU(1:j))),',',int2str(j),',',int2str(indPC),',\''',fname,'\''\);" &'];
|
||||||
else
|
else
|
||||||
command1=['start /B psexec -W ',DyMo, ' -a ',int2str(Parallel(indPC).NumCPU(j-nCPU0)),' -low matlab -nosplash -nodesktop -minimize -r fParallel(',int2str(offset+1),',',int2str(sum(nBlockPerCPU(1:j))),',',int2str(j),',',int2str(indPC),',''',fname,''')'];
|
command1=['start /B psexec -W ',DyMo, ' -a ',int2str(Parallel(indPC).NumCPU(j-nCPU0)),' -low matlab -nosplash -nodesktop -minimize -r fParallel(',int2str(offset+1),',',int2str(sum(nBlockPerCPU(1:j))),',',int2str(j),',',int2str(indPC),',''',fname,''')'];
|
||||||
end
|
end
|
||||||
|
@ -162,7 +162,11 @@ end
|
||||||
|
|
||||||
fclose(fid);
|
fclose(fid);
|
||||||
|
|
||||||
|
if isunix,
|
||||||
|
system('sh ConcurrentCommand1.bat')
|
||||||
|
else
|
||||||
system('ConcurrentCommand1.bat')
|
system('ConcurrentCommand1.bat')
|
||||||
|
end
|
||||||
delete ConcurrentCommand1.bat
|
delete ConcurrentCommand1.bat
|
||||||
|
|
||||||
status_string={'Starting remote parallel computation ... '};
|
status_string={'Starting remote parallel computation ... '};
|
||||||
|
@ -173,11 +177,11 @@ end
|
||||||
pause(1)
|
pause(1)
|
||||||
% keyboard;
|
% keyboard;
|
||||||
% if (cputime-t0)>10,
|
% if (cputime-t0)>10,
|
||||||
stax = ls(['comp_status_',fname,'*.mat']);
|
stax = dir(['comp_status_',fname,'*.mat']);
|
||||||
for j=1:size(stax,1),
|
for j=1:length(stax),
|
||||||
|
|
||||||
try
|
try
|
||||||
load(stax(j,:))
|
load(stax(j).name)
|
||||||
% status_string{j}=(['Chain ',int2str(whoiam),' at ',num2str(100*jstatus/nruns(whoiam)),'% accept. rate ',num2str(isux/jstatus,4),'.']);
|
% status_string{j}=(['Chain ',int2str(whoiam),' at ',num2str(100*jstatus/nruns(whoiam)),'% accept. rate ',num2str(isux/jstatus,4),'.']);
|
||||||
catch
|
catch
|
||||||
|
|
||||||
|
@ -185,7 +189,7 @@ end
|
||||||
% disp(status_string{j})
|
% disp(status_string{j})
|
||||||
if ishandle(hh(njob)),
|
if ishandle(hh(njob)),
|
||||||
waitbar(prtfrc,hh(njob),waitbarString);
|
waitbar(prtfrc,hh(njob),waitbarString);
|
||||||
if prtfrc==1, close(hh(njob)); delete(stax(j,:)), end
|
if prtfrc==1, close(hh(njob)); delete(stax(j).name), end
|
||||||
else
|
else
|
||||||
hh(njob) = waitbar(0,waitbarString);
|
hh(njob) = waitbar(0,waitbarString);
|
||||||
set(hh(njob),'Name',['Parallel ',waitbarTitle]);
|
set(hh(njob),'Name',['Parallel ',waitbarTitle]);
|
||||||
|
@ -195,7 +199,7 @@ end
|
||||||
% disp(' ')
|
% disp(' ')
|
||||||
% t0=cputime;
|
% t0=cputime;
|
||||||
% end
|
% end
|
||||||
if isempty(ls(['P_',fname,'_*End.txt']))
|
if isempty(dir(['P_',fname,'_*End.txt']))
|
||||||
delete(['comp_status_',fname,'*.mat'])
|
delete(['comp_status_',fname,'*.mat'])
|
||||||
for j=1:length(hh),
|
for j=1:length(hh),
|
||||||
if ishandle(hh(j)),
|
if ishandle(hh(j)),
|
||||||
|
|
Loading…
Reference in New Issue