Ignore:
Timestamp:
09/19/12 09:32:34 (12 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 13393

Location:
issm/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk

  • issm/trunk/src

  • issm/trunk/src/m/classes/clusters/pfe.m

    r12706 r13395  
    99    properties (SetAccess=public) 
    1010                 % {{{
    11                  name='pfe'
    12                  login='';
    13                  numnodes=20;
    14                  cpuspernode=8;
    15                  port=1025;
    16                  queue='long';
    17                  time=12*60;
    18                  processor='neh';
    19                  codepath='';
    20                  executionpath='';
    21                  interactive=0;
    22                  bbftp=0;
    23                  numstreams=8;
    24                  hyperthreading=0;
     11                 name           = 'pfe'
     12                 login          = '';
     13                 numnodes       = 20;
     14                 cpuspernode    = 8;
     15                 port           = 1025;
     16                 queue          = 'long';
     17                 time           = 12*60;
     18                 processor      = 'neh';
     19                 codepath       = '';
     20                 executionpath  = '';
     21                 grouplist     = 's1010';
     22                 interactive    = 0;
     23                 bbftp          = 0;
     24                 numstreams     = 8;
     25                 hyperthreading = 0;
    2526         end
    2627         properties (SetAccess=private)
     
    5253                         disp(sprintf('    codepath: %s',cluster.codepath));
    5354                         disp(sprintf('    executionpath: %s',cluster.executionpath));
     55                         disp(sprintf('    grouplist: %s',cluster.grouplist));
    5456                         disp(sprintf('    interactive: %i',cluster.interactive));
    5557                         disp(sprintf('    hyperthreading: %i',cluster.hyperthreading));
     
    9395                         if isempty(cluster.codepath), md = checkmessage(md,'codepath empty'); end
    9496                         if isempty(cluster.executionpath), md = checkmessage(md,'executionpath empty'); end
    95 
    96                  end
    97                  %}}}
    98                  function BuildQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
     97                         if isempty(cluster.grouplist), md = checkmessage(md,'grouplist empty'); end
     98
     99                 end
     100                 %}}}
     101                 function BuildQueueScript(cluster,dirname,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
    99102
    100103                         if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
     
    107110                         fprintf(fid,'#PBS -S /bin/bash\n');
    108111%                        fprintf(fid,'#PBS -N %s\n',modelname);
     112                         fprintf(fid,'#PBS -l select=%i:ncpus=%i:model=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor);
     113                         fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
     114                         fprintf(fid,'#PBS -q %s \n',cluster.queue);
     115                         fprintf(fid,'#PBS -W group_list=%s\n',cluster.grouplist);
     116                         fprintf(fid,'#PBS -m e\n');
     117                         fprintf(fid,'#PBS -o %s.outlog \n',modelname);
     118                         fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
     119                         fprintf(fid,'. /usr/share/modules/init/bash\n\n');
     120                         fprintf(fid,'module load comp-intel/11.1.046\n');
     121                         fprintf(fid,'module load mpi/mpt.1.25\n');
     122                         fprintf(fid,'module load math/intel_mkl_64_10.0.011\n\n');
     123                         fprintf(fid,'export PATH="$PATH:."\n\n');
     124                         fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
     125                         fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME
     126                         fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
     127                         fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,dirname);
     128                         fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
     129                         if ~io_gather, %concatenate the output files:
     130                                 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
     131                         end
     132                         fclose(fid);
     133
     134                         %in interactive mode, create a run file, and errlog and outlog file
     135                         if cluster.interactive,
     136                                 fid=fopen([modelname '.run'],'w');
     137                                 if ~isvalgrind,
     138                                         fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname);
     139                                 else
     140                                         fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname);
     141                                 end
     142                                 if ~io_gather, %concatenate the output files:
     143                                         fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
     144                                 end
     145                                 fclose(fid);
     146                                 fid=fopen([modelname '.errlog'],'w');
     147                                 fclose(fid);
     148                                 fid=fopen([modelname '.outlog'],'w');
     149                                 fclose(fid);
     150                         end
     151                 end %}}}
     152                 function BuildKrigingQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
     153
     154                         if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
     155
     156                         %compute number of processors
     157                         cluster.np=cluster.numnodes*cluster.cpuspernode;
     158
     159                         %write queuing script
     160                         fid=fopen([modelname '.queue'],'w');
     161                         fprintf(fid,'#PBS -S /bin/bash\n');
     162                         %                       fprintf(fid,'#PBS -N %s\n',modelname);
    109163                         fprintf(fid,'#PBS -l select=%i:ncpus=%i:model=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor);
    110164                         fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds.
     
    118172                         fprintf(fid,'module load mpi/mpt.1.25\n');
    119173                         fprintf(fid,'module load math/intel_mkl_64_10.0.011\n\n');
    120                          fprintf(fid,'export PATH="$PATH:."\n\n');
     174                         fprintf(fid,'export PATH="$PATH:."\n');
     175                         fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME
     176                         fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
    121177                         fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
    122                          fprintf(fid,'cd $PBS_O_WORKDIR\n\n');
    123                          fprintf(fid,'mpiexec -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
     178                         fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,modelname);
     179                         fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s\n',cluster.np,cluster.codepath,[cluster.executionpath '/' modelname],modelname); %FIXME
    124180                         if ~io_gather, %concatenate the output files:
    125181                                 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
     
    131187                                 fid=fopen([modelname '.run'],'w');
    132188                                 if ~isvalgrind,
    133                                          fprintf(fid,'mpiexec -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
    134                                  else
    135                                          fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
     189                                         fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s\n',cluster.np,cluster.codepath,[cluster.executionpath '/' modelname],modelname);
     190                                 else
     191                                         fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/kriging.exe %s %s\n',cluster.np,cluster.codepath,[cluster.executionpath '/' modelname],modelname);
    136192                                 end
    137193                                 if ~io_gather, %concatenate the output files:
Note: See TracChangeset for help on using the changeset viewer.