Changeset 20857


Ignore:
Timestamp:
07/05/16 14:37:32 (9 years ago)
Author:
Mathieu Morlighem
Message:

CHG: minor indenting

File:
1 edited

Legend:

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

    r20533 r20857  
    1717                 queue          = 'long';
    1818                 time           = 12*60;
    19                  processor      = 'wes';
     19                 processor      = 'ivy';
    2020                 codepath       = '';
    2121                 executionpath  = '';
     
    200200                         end
    201201                 end %}}}
    202                 function BuildQueueScriptMultipleModels(cluster,dirname,modelname,solution,dirnames,modelnames,nps) % {{{
    203                
    204                         %some checks:
    205                         if isempty(modelname), error('BuildQueueScriptMultipleModels error message: need a non empty model name!');end
    206 
    207                         %what is the executable being called?
    208                         executable='issm_slr.exe';
    209 
    210                         if ispc(), error('BuildQueueScriptMultipleModels not support yet on windows machines');end;
    211                        
    212                         %write queuing script
    213                         fid=fopen([modelname '.queue'],'w');
    214                        
    215                         fprintf(fid,'#PBS -S /bin/bash\n');
    216                         fprintf(fid,'#PBS -N %s\n',modelname);
    217                         fprintf(fid,'#PBS -l select=%i:ncpus=%i:model=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor);
    218                         fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
    219                         fprintf(fid,'#PBS -q %s \n',cluster.queue);
    220                         fprintf(fid,'#PBS -W group_list=%s\n',cluster.grouplist);
    221                         fprintf(fid,'#PBS -m e\n');
    222                         fprintf(fid,'#PBS -o %s.outlog \n',[cluster.executionpath '/' dirname '/' modelname]);
    223                         fprintf(fid,'#PBS -e %s.errlog \n\n',[cluster.executionpath '/' dirname '/' modelname]);
    224                         fprintf(fid,'. /usr/share/modules/init/bash\n\n');
    225                         fprintf(fid,'module load comp-intel/2015.0.090\n');
    226                         fprintf(fid,'module load mpi-sgi/mpt.2.12r16\n');
    227                         fprintf(fid,'export PATH="$PATH:."\n\n');
    228                         fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
    229                         fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME
    230                         fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
    231                         fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,dirname);
    232 
    233                         %number of cpus:
    234                         mpistring=sprintf('mpiexec -np %i ',cluster.numnodes*cluster.cpuspernode);
    235 
    236                         %executable:
    237                         mpistring=[mpistring sprintf('%s/%s ',cluster.codepath,executable)];
    238                        
    239                         %solution name:
    240                         mpistring=[mpistring sprintf('%s ',EnumToString(solution))];
    241 
    242                         %execution directory and model name:
    243                         mpistring=[mpistring sprintf('%s/%s %s',cluster.executionpath,dirname,modelname)];
    244 
    245                         %inform main executable of how many icecaps, glaciers and earth models are being run:
    246                         mpistring=[mpistring sprintf(' %i ',length(dirnames))];
    247                        
    248                         %icecaps, glaciers and earth location, names and number of processors associated:
    249                         for i=1:length(dirnames),
    250                         mpistring=[mpistring sprintf(' %s/%s %s %i ',cluster.executionpath,dirnames{i},modelnames{i},nps{i})];
    251                         end
    252 
    253                         %write this long string to disk:
    254                         fprintf(fid,mpistring);
    255                         fclose(fid);
    256                        
    257                         if cluster.interactive,
    258                                 fid=fopen([modelname '.run'],'w');
    259                                
    260                                 %number of cpus:
    261                                 mpistring=sprintf('mpiexec -np %i ',cluster.numnodes*cluster.cpuspernode);
    262 
    263                                 %executable:
    264                                 mpistring=[mpistring sprintf('%s/%s ',cluster.codepath,executable)];
    265 
    266                                 %solution name:
    267                                 mpistring=[mpistring sprintf('%s ',EnumToString(solution))];
    268 
    269                                 %execution directory and model name:
    270                                 mpistring=[mpistring sprintf('%s/%s %s',cluster.executionpath,dirname,modelname)];
    271 
    272                                 %inform main executable of how many icecaps, glaciers and earth models are being run:
    273                                 mpistring=[mpistring sprintf(' %i ',length(dirnames))];
    274 
    275                                 %icecaps, glaciers and earth location, names and number of processors associated:
    276                                 for i=1:length(dirnames),
    277                                         mpistring=[mpistring sprintf(' %s/Interactive%i %s %i ',cluster.executionpath,cluster.interactive,modelnames{i},nps{i})];
    278                                 end
    279                                                  
    280                                 %write this long string to disk:
    281                                 fprintf(fid,mpistring);
    282                                 fclose(fid);
    283 
    284                                 fid=fopen([modelname '.errlog'],'w');
    285                                 fclose(fid);
    286                                 fid=fopen([modelname '.outlog'],'w');
    287                                 fclose(fid);
    288                          end
    289                 end
    290                 %}}}
     202                 function BuildQueueScriptMultipleModels(cluster,dirname,modelname,solution,dirnames,modelnames,nps) % {{{
     203
     204                         %some checks:
     205                         if isempty(modelname), error('BuildQueueScriptMultipleModels error message: need a non empty model name!');end
     206
     207                         %what is the executable being called?
     208                         executable='issm_slr.exe';
     209
     210                         if ispc(), error('BuildQueueScriptMultipleModels not support yet on windows machines');end;
     211
     212                         %write queuing script
     213                         fid=fopen([modelname '.queue'],'w');
     214
     215                         fprintf(fid,'#PBS -S /bin/bash\n');
     216                         fprintf(fid,'#PBS -N %s\n',modelname);
     217                         fprintf(fid,'#PBS -l select=%i:ncpus=%i:model=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor);
     218                         fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
     219                         fprintf(fid,'#PBS -q %s \n',cluster.queue);
     220                         fprintf(fid,'#PBS -W group_list=%s\n',cluster.grouplist);
     221                         fprintf(fid,'#PBS -m e\n');
     222                         fprintf(fid,'#PBS -o %s.outlog \n',[cluster.executionpath '/' dirname '/' modelname]);
     223                         fprintf(fid,'#PBS -e %s.errlog \n\n',[cluster.executionpath '/' dirname '/' modelname]);
     224                         fprintf(fid,'. /usr/share/modules/init/bash\n\n');
     225                         fprintf(fid,'module load comp-intel/2015.0.090\n');
     226                         fprintf(fid,'module load mpi-sgi/mpt.2.12r16\n');
     227                         fprintf(fid,'export PATH="$PATH:."\n\n');
     228                         fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
     229                         fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME
     230                         fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
     231                         fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,dirname);
     232
     233                         %number of cpus:
     234                         mpistring=sprintf('mpiexec -np %i ',cluster.numnodes*cluster.cpuspernode);
     235
     236                         %executable:
     237                         mpistring=[mpistring sprintf('%s/%s ',cluster.codepath,executable)];
     238
     239                         %solution name:
     240                         mpistring=[mpistring sprintf('%s ',EnumToString(solution))];
     241
     242                         %execution directory and model name:
     243                         mpistring=[mpistring sprintf('%s/%s %s',cluster.executionpath,dirname,modelname)];
     244
     245                         %inform main executable of how many icecaps, glaciers and earth models are being run:
     246                         mpistring=[mpistring sprintf(' %i ',length(dirnames))];
     247
     248                         %icecaps, glaciers and earth location, names and number of processors associated:
     249                         for i=1:length(dirnames),
     250                                 mpistring=[mpistring sprintf(' %s/%s %s %i ',cluster.executionpath,dirnames{i},modelnames{i},nps{i})];
     251                         end
     252
     253                         %write this long string to disk:
     254                         fprintf(fid,mpistring);
     255                         fclose(fid);
     256
     257                         if cluster.interactive,
     258                                 fid=fopen([modelname '.run'],'w');
     259
     260                                 %number of cpus:
     261                                 mpistring=sprintf('mpiexec -np %i ',cluster.numnodes*cluster.cpuspernode);
     262
     263                                 %executable:
     264                                 mpistring=[mpistring sprintf('%s/%s ',cluster.codepath,executable)];
     265
     266                                 %solution name:
     267                                 mpistring=[mpistring sprintf('%s ',EnumToString(solution))];
     268
     269                                 %execution directory and model name:
     270                                 mpistring=[mpistring sprintf('%s/%s %s',cluster.executionpath,dirname,modelname)];
     271
     272                                 %inform main executable of how many icecaps, glaciers and earth models are being run:
     273                                 mpistring=[mpistring sprintf(' %i ',length(dirnames))];
     274
     275                                 %icecaps, glaciers and earth location, names and number of processors associated:
     276                                 for i=1:length(dirnames),
     277                                         mpistring=[mpistring sprintf(' %s/Interactive%i %s %i ',cluster.executionpath,cluster.interactive,modelnames{i},nps{i})];
     278                                 end
     279
     280                                 %write this long string to disk:
     281                                 fprintf(fid,mpistring);
     282                                 fclose(fid);
     283
     284                                 fid=fopen([modelname '.errlog'],'w');
     285                                 fclose(fid);
     286                                 fid=fopen([modelname '.outlog'],'w');
     287                                 fclose(fid);
     288                         end
     289                 end
     290                 %}}}
    291291                 function BuildKrigingQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
    292292
Note: See TracChangeset for help on using the changeset viewer.