Changeset 6378
- Timestamp:
- 10/21/10 14:41:06 (15 years ago)
- Location:
- issm/trunk/src/m
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/clusters/pfe.m
r6363 r6378 10 10 % {{{1 11 11 name='pfe' 12 login=' elarour';12 login=''; 13 13 numnodes=20; 14 14 cpuspernode=8; … … 17 17 time=12*60; 18 18 processor='neh'; 19 codepath=' /staff/elarour/trunk/bin';20 executionpath=' /nobackupp10/elarour/execution/pleiades';19 codepath=''; 20 executionpath=''; 21 21 interactive=0; 22 22 bbftp=0; … … 30 30 methods 31 31 function cluster=pfe(varargin) % {{{1 32 33 %initialize cluster using default settings if provided 34 if (exist('pfe_settings')==2), pfe_settings; end 35 36 %use provided options to change fields 32 37 options=pairoptions(varargin{:}); 33 38 for i=1:size(options.list,1), … … 92 97 error('IsConsistent error message: unknown processor type, should be ''neh'',''wes'' or ''har'''); 93 98 end 99 100 %Miscelaneous 101 if isempty(cluster.login), error('IsConsistent error message: login empty'); end 102 if isempty(cluster.codepath), error('IsConsistent error message: codepath empty'); end 103 if isempty(cluster.executionpath), error('IsConsistent error message: executionpath empty'); end 94 104 95 105 end … … 182 192 disp('launching solution sequence on remote cluster'); 183 193 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 184 185 if cluster.interactive,186 error('done uploading files to interactive directory on remote cluster');187 end188 194 189 195 else -
issm/trunk/src/m/model/solveparallel.m
r6304 r6378 29 29 30 30 %Do we return, or just wait for results? 31 if (md.waitonlock ~=0 & ~strcmpi(options.batch,'yes')),31 if (md.waitonlock>0 & ~strcmpi(options.batch,'yes')), 32 32 %we wait for the done file 33 33 islock=waitonlock(md); -
issm/trunk/src/m/model/waitonlock.m
r5954 r6378 19 19 if ~strcmpi(oshostname(),cluster), 20 20 21 if port, 22 %there is a tunnel, so we have a short at looking for the lock file. 23 24 disp(['waiting for ' filename ' hold on... (Ctrl+C to exit)']) 25 time=0; ispresent=0; 26 while (ispresent==0 & time<timelimit) 27 [status, result]=system(['ssh -q -p ' num2str(port) ' ' login '@localhost "if ( -e ' executionpath '/' md.runtimename '/' md.name '.lock ) echo 1"']); 28 if ~isempty(result), 29 if ismember('1',result), 30 ispresent=1; 31 else 32 ispresent=0; 33 end 34 else 35 ispresent=0; 36 end 37 pause(10); %tunnel can be unstable, let's not use it too much 38 time=time+1/60; 39 end 40 disp(['waitonlock: lock detected, with value of result:|' result '|']); 41 42 %build output 43 if (time>timelimit), 44 disp('Time limit exceeded. Increase md.waitonlock'); 45 disp('The results must be loaded manually with md=loadresultsfromcluster(md).'); 46 error(['waitonlock error message: time limit exceeded']); 47 flag=0; 48 else 49 flag=1; 50 end 21 disp('solution launched on remote cluster. log in to detect job completion.'); 22 choice=input('Is the job successfully completed? (y/n)','s'); 23 if ~strcmp(choice,'y'), 24 disp('Results not loaded... exiting'); 25 flag=0; 51 26 else 52 disp('solution launched on remote cluster. log in to detect job completion.'); 53 choice=input('Is the job successfully completed? (y/n)','s'); 54 if ~strcmp(choice,'y'), 55 disp('Results not loaded... exiting'); 56 flag=0; 57 else 58 flag=1; 59 end 27 flag=1; 60 28 end 61 29
Note:
See TracChangeset
for help on using the changeset viewer.