Changeset 6378


Ignore:
Timestamp:
10/21/10 14:41:06 (15 years ago)
Author:
Mathieu Morlighem
Message:

cluster pfe is by default empty. User dependent settings are to be found in pfe_settings of the user contrib directory that has been added to the matlab path (startup).
Also, waitonlock waits for y/n to load results automatically from cluster. Use waitonlck=0 to disable this functionnality.

Location:
issm/trunk/src/m
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/clusters/pfe.m

    r6363 r6378  
    1010                 % {{{1
    1111                 name='pfe'
    12                  login='elarour';
     12                 login='';
    1313                 numnodes=20;
    1414                 cpuspernode=8;
     
    1717                 time=12*60;
    1818                 processor='neh';
    19                  codepath='/staff/elarour/trunk/bin';
    20                  executionpath='/nobackupp10/elarour/execution/pleiades';
     19                 codepath='';
     20                 executionpath='';
    2121                 interactive=0;
    2222                 bbftp=0;
     
    3030         methods
    3131                 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
    3237                         options=pairoptions(varargin{:});
    3338                         for i=1:size(options.list,1),
     
    9297                                 error('IsConsistent error message: unknown processor type, should be ''neh'',''wes'' or ''har''');
    9398                         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
    94104
    95105                 end
     
    182192                                disp('launching solution sequence on remote cluster');
    183193                                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                                 end
    188194
    189195                        else
  • issm/trunk/src/m/model/solveparallel.m

    r6304 r6378  
    2929
    3030        %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')),
    3232                %we wait for the done file
    3333                islock=waitonlock(md);
  • issm/trunk/src/m/model/waitonlock.m

    r5954 r6378  
    1919if ~strcmpi(oshostname(),cluster),
    2020
    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;
    5126        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;
    6028        end
    6129
Note: See TracChangeset for help on using the changeset viewer.