Changeset 20316


Ignore:
Timestamp:
03/14/16 05:00:05 (9 years ago)
Author:
hakesson
Message:

chg: vilje cluster script update

File:
1 edited

Legend:

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

    r20315 r20316  
    99    properties (SetAccess=public) 
    1010                 % {{{
    11                  name          = 'vilje'
    12                  login         = '';
    13          accountname    ='';
    14                  numnodes      = 20;
    15                  cpuspernode   = '';
    16                  port          = '';
    17                  queue         = '';
    18                  codepath      = '';
    19                  executionpath = '';
    20                  interactive   = 0;
    21                  time          = '';
    22                  memory        = 2;
     11                 name           = 'vilje';
     12                 login          = '';
     13                 numnodes       = 2;
     14                 cpuspernode    = 32;
     15                 procspernodes  = 16;
     16                 mem            = 28;
     17                 queue          = 'workq';
     18                 time           = 2*60;
     19                 codepath       = '';
     20                 executionpath  = '';
     21                 interactive    = 0;
     22                 port           = [];
     23                 accountname    = '';
     24
     25
    2326         end
    2427         properties (SetAccess=private)
    25                  np=20*8;
     28                 np=numnodes*procspernodes;
    2629                 % }}}
    2730         end
     
    4245                         disp(sprintf('    login: %s',cluster.login));
    4346                         disp(sprintf('    accountname: %s',cluster.accountname));
    44                          disp(sprintf('    port: %i',cluster.port));
    4547                         disp(sprintf('    numnodes: %i',cluster.numnodes));
    4648                         disp(sprintf('    cpuspernode: %i',cluster.cpuspernode));
    47                          disp(sprintf('    np: %i',cluster.cpuspernode*cluster.numnodes));
     49                         disp(sprintf('    np: %i', ...
     50                                      cluster.cpuspernode*cluster.numnodes));
     51                         disp(sprintf('    procspernodes: %i',cluster.procspernodes));
    4852                         disp(sprintf('    queue: %s',cluster.queue));
    4953                         disp(sprintf('    codepath: %s',cluster.codepath));
     
    5155                         disp(sprintf('    interactive: %i',cluster.interactive));
    5256                         disp(sprintf('    time: %i',cluster.time));
    53                          disp(sprintf('    memory: %i',cluster.memory));
     57                         disp(sprintf('    memory: %i',cluster.mem));
    5458                 end
    5559                 %}}}
    5660                 function md = checkconsistency(cluster,md,solution,analyses) % {{{
    5761
    58                          available_queues={'c6145','default'};
    59                          queue_requirements_time=[Inf Inf];
    60                          queue_requirements_np=[80 80];
     62                         available_queues={'workq'};
     63                         queue_requirements_time=[5*24*60];
     64                         queue_requirements_np=[30];
    6165
    62                         % QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,1)
     66                        QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,1)
    6367
    6468                         %Miscelaneous
     
    105109                         if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
    106110
     111                         executable='issm.exe';
     112                         if isdakota,
     113                                 version=IssmConfig('_DAKOTA_VERSION_'); version=str2num(version(1:3));
     114                                 if (version>=6),
     115                                         executable='issm_dakota.exe';
     116                                 end
     117                         end
     118
    107119                         %compute number of processors
    108120                         cluster.np=cluster.numnodes*cluster.cpuspernode;
     121
     122                         
     123                         shortname = substring(modelname,1,min(12,length(modelname)));
    109124
    110125                         %write queuing script
    111126                         fid=fopen([modelname '.queue'],'w');
    112127                         fprintf(fid,'#PBS -S /bin/bash\n');
    113                          fprintf(fid,'#PBS -N %s\n',modelname);
    114 %                        fprintf(fid,'#PBS -q %s \n',cluster.queue);
    115              fprintf(fid,'#PBS -l select=%i:ncpus=%i:mpiprocs=%i\n',cluster.numnodes,cluster.cpuspernode,16);
    116              %fprintf(fid,'#PBS -l select=%i:ncpus=%i\n',cluster.numnodes,cluster.cpuspernode);
    117                          fprintf(fid,'#PBS -l walltime=%s\n',cluster.time); %walltime is in seconds.
     128                         fprintf(fid,'#PBS -N %s\n',shortname);
     129                         fprintf(fid,'#PBS -q %s \n',cluster.queue);
     130             fprintf(fid,'#PBS -l select=%i:ncpus=%i:mpiprocs=%i\n',cluster.numnodes,cluster.cpuspernode,cluster.procspernodes);
     131                         fprintf(fid,'#PBS -l walltime=%s\n',duration(0,cluster.time,0)); %walltime is in minutes.
    118132                         fprintf(fid,'#PBS -A %s\n',cluster.accountname);
    119 %                        fprintf(fid,'#PBS -l mem=%igb\n',cluster.memory);
    120 %                        fprintf(fid,'#PBS -M mmorligh@uci.edu\n');
    121                          fprintf(fid,'#PBS -o %s.outlog \n',modelname);
    122                          fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
     133                         fprintf(fid,'#PBS -o %s.outlog \n',[cluster.executionpath '/' dirname '/' modelname]);
     134                         fprintf(fid,'#PBS -e %s.errlog \n\n',[cluster.executionpath '/' dirname '/' modelname]);
    123135                         fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME
    124136                         fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
    125                          fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname);
    126                          fprintf(fid,'mpiexec_mpt -n %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
     137                         fprintf(fid,'cd %s/%s\n\n', ...
     138                                 cluster.executionpath,dirname);
     139                         fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
     140
    127141                         if ~io_gather, %concatenate the output files:
    128142                                 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
     
    144158                         end
    145159                 end %}}}
    146                  function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
     160
     161
     162                 function UploadQueueJob(cluster,modelname,dirname,filelist)% {{{
    147163
    148164                         %compress the files into one zip.
     
    151167                                 compressstring = [compressstring ' ' filelist{i}];
    152168                         end
    153                          if cluster.interactive,
    154                                  compressstring = [compressstring ' ' modelname '.errlog ' modelname '.outlog '];
    155                          end
     169                         
    156170                         system(compressstring);
    157171
    158172                         disp('uploading input file and queueing script');
    159                          issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[dirname '.tar.gz']});
     173                       
     174                         directory=cluster.executionpath;
     175
     176                         issmbbftpout(cluster.name,directory, ...
     177                                      cluster.login,cluster.port,cluster.numstreams,{[dirname '.tar.gz']});
     178
     179                 end
     180                 %}}}
     181
     182
     183                 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
    160184
    161185                         disp('launching solution sequence on remote cluster');
Note: See TracChangeset for help on using the changeset viewer.