Changeset 19670


Ignore:
Timestamp:
10/21/15 15:06:14 (9 years ago)
Author:
schlegel
Message:

CHG: updating for dakota cluster run

Location:
issm/trunk-jpl/src/m
Files:
3 edited

Legend:

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

    r19642 r19670  
    2121                 time          = 24*60*60;
    2222         end
    23          properties (SetAccess=private)
    24                  np=20*8;
    25                  % }}}
    26          end
    2723         methods
    2824                 function cluster=lonestar(varargin) % {{{
     
    3329                         %use provided options to change fields
    3430                         cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
     31
    3532                 end
    3633                 %}}}
     
    4441                         disp(sprintf('    numnodes: %i',cluster.numnodes));
    4542                         disp(sprintf('    cpuspernode: %i',cluster.cpuspernode));
    46                          disp(sprintf('    np: %i',cluster.cpuspernode*cluster.numnodes));
     43                         disp(sprintf('    np: %i',cluster.np));
    4744                         disp(sprintf('    queue: %s',cluster.queue));
    4845                         disp(sprintf('    codepath: %s',cluster.codepath));
     
    5047                         disp(sprintf('    interactive: %i',cluster.interactive));
    5148                         disp(sprintf('    time: %i',cluster.time));
     49                 end
     50                 %}}}
     51                 function numprocs=np(cluster) % {{{
     52                         %compute number of processors
     53                         numprocs=cluster.numnodes*cluster.cpuspernode;
    5254                 end
    5355                 %}}}
     
    7072                         if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
    7173                         if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
    72 
    73                          %compute number of processors
    74                          cluster.np=cluster.numnodes*cluster.cpuspernode;
    7574
    7675                         %write queuing script
     
    9998                         if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
    10099
    101                          %compute number of processors
    102                          cluster.np=cluster.numnodes*cluster.cpuspernode;
     100                         executable='issm.exe';
     101                         if isdakota,
     102                                 version=IssmConfig('_DAKOTA_VERSION_'); version=str2num(version(1:3));
     103                                 if (version>=6),
     104                                         executable='issm_dakota.exe';
     105                                 end
     106                         end
    103107
    104108                         %write queuing script
     
    122126                         fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
    123127                         fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname);
    124                          fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
     128                         fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    125129                         if ~io_gather, %concatenate the output files:
    126130                                 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
     
    131135                         if cluster.interactive,
    132136                                 fid=fopen([modelname '.run'],'w');
    133                                  fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
     137                                 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,executable,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    134138                                 if ~io_gather, %concatenate the output files:
    135139                                         fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
  • issm/trunk-jpl/src/m/classes/clusters/pfe.m

    r19638 r19670  
    2626                 hyperthreading = 0;
    2727         end
    28          properties (SetAccess=private)
    29                  np=20*8;
    30                  % }}}
    31          end
    3228         methods
    3329                 function cluster=pfe(varargin) % {{{
     
    6056                 end
    6157                 %}}}
     58                 function numprocs=np(cluster) % {{{
     59                         %compute number of processors
     60                         numprocs=cluster.numnodes*cluster.cpuspernode;
     61                 end
     62                 %}}}
    6263                 function md = checkconsistency(cluster,md,solution,analyses) % {{{
    6364
     
    116117                         if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
    117118
    118                          %compute number of processors
    119                          cluster.np=cluster.numnodes*cluster.cpuspernode;
     119                         executable='issm.exe';
     120                         if isdakota,
     121                                 version=IssmConfig('_DAKOTA_VERSION_'); version=str2num(version(1:3));
     122                                 if (version>=6),
     123                                         executable='issm_dakota.exe';
     124                                 end
     125                         end
    120126
    121127                         %write queuing script
     
    139145                         fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,dirname);
    140146                         if ~isvalgrind,
    141                                  fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    142                          else
    143                                  fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
     147                                 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
     148                         else
     149                                 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    144150                         end
    145151                         if ~io_gather, %concatenate the output files:
     
    153159                                 if cluster.interactive==10,
    154160                                                 fprintf(fid,'module unload mpi-mvapich2/1.4.1/gcc\n');
    155                                                  fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[pwd() '/run'],modelname);
     161                                                 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[pwd() '/run'],modelname);
    156162                                 else
    157163                                         if ~isvalgrind,
    158                                                  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);
     164                                                 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname);
    159165                                         else
    160                                                  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);
     166                                                 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname);
    161167                                         end
    162168                                 end
     
    174180
    175181                         if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
    176 
    177                          %compute number of processors
    178                          cluster.np=cluster.numnodes*cluster.cpuspernode;
    179182
    180183                         %write queuing script
  • issm/trunk-jpl/src/m/qmu/dakota_in_write.m

    r19656 r19670  
    8585if IssmConfig('_DAKOTA_VERSION_') < 6,
    8686        strategy_write(fidi,params);
     87else
     88        environment_write(fidi,params);
    8789end
    8890
     
    119121
    120122fprintf(fidi,'strategy,\n');
    121 fprintf(fidi,'\tsingle_method\n');
     123fprintf(fidi,'\tsingle_method\n\n');
    122124param_write(fidi,'\t  ','graphics','','\n',params);
    123125param_write(fidi,'\t  ','tabular_graphics_data','','\n',params);
    124126param_write(fidi,'\t  ','tabular_graphics_file',' ''','''\n',params);
    125127fprintf(fidi,'\n');
     128
     129end
     130
     131%%  function to write the environment section of the file
     132
     133function []=environment_write(fidi,params)
     134
     135        display('Writing environment section of Dakota input file.');
     136
     137        fprintf(fidi,'environment,\n');
     138        param_write(fidi,'\t  ','graphics','','\n',params);
     139        param_write(fidi,'\t  ','tabular_graphics_data','','\n',params);
     140        param_write(fidi,'\t  ','tabular_graphics_file',' ''','''\n',params);
     141        fprintf(fidi,'\n');
    126142
    127143end
Note: See TracChangeset for help on using the changeset viewer.