Ignore:
Timestamp:
06/05/12 10:43:43 (13 years ago)
Author:
Mathieu Morlighem
Message:

Fixed all clusters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/clusters/greenplanet.m

    r12363 r12371  
    102102                         end
    103103                 end %}}}
    104                  function LaunchQueueJob(cluster,md,options)% {{{
    105                          
    106                          %lauch command, to be executed via ssh
    107                          if ~cluster.interactive,
    108                                 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ...
    109                                         ' && cd ' md.private.runtimename ' && mv ../' md.private.runtimename '.tar.gz ./ && tar -zxf ' md.private.runtimename '.tar.gz  && qsub ' md.miscellaneous.name '.queue '];
    110                         else
    111                                 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive) ' && tar -zxf ' md.private.runtimename '.tar.gz'];
    112                         end
     104                 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
    113105
    114                         if ~strcmpi(options.batch,'yes'),
    115                                
    116                                 %compress the files into one zip.
    117                                 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue '  md.miscellaneous.name '.petsc '];
    118                                 if md.qmu.isdakota,
    119                                         compressstring=[compressstring md.miscellaneous.name '.qmu.in '];
    120                                 end
    121                                 if cluster.interactive,
    122                                         compressstring=[compressstring md.miscellaneous.name '.run ' md.miscellaneous.name '.errlog ' md.miscellaneous.name '.outlog '];
    123                                 end
    124                                 system(compressstring);
    125                                
    126                                 disp('uploading input file and queueing script');
    127                                 if cluster.interactive,
    128                                         directory=[cluster.executionpath '/Interactive' num2str(cluster.interactive)];
    129                                 else
    130                                         directory=cluster.executionpath;
    131                                 end
    132                                
    133                                 issmscpout(cluster.name,directory,cluster.login,cluster.port,{[md.private.runtimename '.tar.gz']});
    134                                
    135                                 disp('launching solution sequence on remote cluster');
    136                                 issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
     106                         %compress the files into one zip.
     107                         compressstring=['tar -zcf ' dirname '.tar.gz '];
     108                         for i=1:numel(filelist),
     109                                 compressstring = [compressstring ' ' filelist{i}];
     110                         end
     111                         if cluster.interactive,
     112                                 compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
     113                         end
     114                         system(compressstring);
    137115
    138                         else
    139                                 disp('batch mode requested: not launching job interactively');
    140                                 disp('launch solution sequence on remote cluster by hand');
    141                         end
    142                  end
    143                  %}}}
     116                         disp('uploading input file and queueing script');
     117                         issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
     118
     119                         disp('launching solution sequence on remote cluster');
     120                         launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
     121                                 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && qsub ' modelname '.queue '];
     122                         issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
     123                 end %}}}
    144124                 function Download(cluster,dirname,filelist)% {{{
    145125
Note: See TracChangeset for help on using the changeset viewer.