Changeset 13278


Ignore:
Timestamp:
09/06/12 14:56:24 (13 years ago)
Author:
schlegel
Message:

CHG: Clusters pass directory argument in issm execution to be full path to bin file.

Location:
issm/trunk-jpl/src/m/classes/clusters
Files:
9 edited

Legend:

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

    r12925 r13278  
    7474          fprintf(fid,'\n');
    7575          fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
    76                    cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
     76                   cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname,modelname,modelname);
    7777                         fclose(fid);
    7878
  • issm/trunk-jpl/src/m/classes/clusters/castor.m

    r12844 r13278  
    6262                         fprintf(fid,'#PBS -o %s.outlog \n',modelname);
    6363                         fprintf(fid,'#PBS -e %s.errlog \n',modelname);
    64                          fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
     64                         fprintf(fid,'export PBS_O_WORKDIR=%s\n',[cluster.executionpath '/' dirname]);
    6565                         fprintf(fid,'cd $PBS_O_WORKDIR\n');
    6666                         fprintf(fid,'export OMP_NUM_THREADS=1\n');
    67                          fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     67                         fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    6868                         fclose(fid);
    6969
  • issm/trunk-jpl/src/m/classes/clusters/cosmos.m

    r12844 r13278  
    6060                         fprintf(fid,'#PBS -o %s.outlog \n',modelname);
    6161                         fprintf(fid,'#PBS -e %s.errlog \n',modelname);
    62                          fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
     62                         fprintf(fid,'export PBS_O_WORKDIR=%s\n',[cluster.executionpath '/' dirname]);
    6363                         fprintf(fid,'cd $PBS_O_WORKDIR\n');
    6464                         fprintf(fid,'export OMP_NUM_THREADS=1\n');
    6565                         fprintf(fid,'ulimit -s unlimited\n');
    6666                         fprintf(fid,'ulimit -c 0\n');
    67                          fprintf(fid,'/opt/mpich/gm/intel10.1/bin/mpiexec -np %i %s/issm.exe %s %s %s',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     67                         fprintf(fid,'/opt/mpich/gm/intel10.1/bin/mpiexec -np %i %s/issm.exe %s %s %s',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    6868                         fclose(fid);
    6969
  • issm/trunk-jpl/src/m/classes/clusters/discover.m

    r13175 r13278  
    111111                         fprintf(fid,'export PATH="$PATH:."\n\n');
    112112                         fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
    113                          fprintf(fid,'cd $PBS_O_WORKDIR\n\n');
    114                          fprintf(fid,'mpirun -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
     113                         fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,dirname);
     114                         fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    115115                         if ~io_gather, %concatenate the output files:
    116116                                 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
     
    122122                                 fid=fopen([modelname '.run'],'w');
    123123                                 if ~isvalgrind,
    124                                          fprintf(fid,'mpirun -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
     124                                         fprintf(fid,'mpirun -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    125125                                 else
    126                                          fprintf(fid,'mpirun -np %i valgrind --leak-check=full %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
     126                                         fprintf(fid,'mpirun -np %i valgrind --leak-check=full %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    127127                                 end
    128128                                 if ~io_gather, %concatenate the output files:
  • issm/trunk-jpl/src/m/classes/clusters/gemini.m

    r12844 r13278  
    6363                         fprintf(fid,'#PBS -e %s.errlog \n',modelname);
    6464
    65                          fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
     65                         fprintf(fid,'export PBS_O_WORKDIR=%s\n',[cluster.executionpath '/' dirname]);
    6666                         fprintf(fid,'cd $PBS_O_WORKDIR\n');
    6767                         fprintf(fid,'export OMP_NUM_THREADS=1\n');
    68                          fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     68                         fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    6969                         fclose(fid);
    7070
  • issm/trunk-jpl/src/m/classes/clusters/generic.m

    r13170 r13278  
    6868                                if ~isvalgrind,
    6969                                        if cluster.interactive
    70                                                 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s ',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     70                                                fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s ',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    7171                                        else
    72                                                 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
     72                                                fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname,modelname,modelname);
    7373                                        end
    7474                                elseif isgprof,
     
    7979                                        if ismac,
    8080                                                fprintf(fid,'mpiexec -np %i %s --leak-check=full --dsymutil=yes --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
    81                                                 cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
     81                                                cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname], modelname,modelname,modelname);
    8282                                        else
    8383                                                fprintf(fid,'mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
    84                                                 cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
     84                                                cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname,modelname,modelname);
    8585                                        end
    8686                                end
     
    9595                                fprintf(fid,'@echo off\n');
    9696                                if cluster.interactive
    97                                         fprintf(fid,'"%s/issm.exe" %s "%s" %s ',cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     97                                        fprintf(fid,'"%s/issm.exe" %s "%s" %s ',cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    9898                                else
    9999                                        fprintf(fid,'"%s/issm.exe" %s "%s" %s 2> %s.errlog >%s.outlog',...
    100                                                 cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
     100                                                cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname,modelname,modelname);
    101101                                end
    102102                                fclose(fid);
     
    119119                                if ~isvalgrind,
    120120                                        if cluster.interactive
    121                                                 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s ',cluster.np,cluster.codepath,cluster.executionpath,modelname);
     121                                                fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s ',cluster.np,cluster.codepath,[cluster.executionpath '/' modelname],modelname);
    122122                                        else
    123                                                 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s 2> %s.errlog >%s.outlog ',cluster.np,cluster.codepath,cluster.executionpath,modelname,modelname,modelname);
     123                                                fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s 2> %s.errlog >%s.outlog ',cluster.np,cluster.codepath,[cluster.executionpath '/' modelname],modelname,modelname,modelname);
    124124                                        end
    125125                                elseif isgprof,
     
    129129                                        fprintf(fid,'LD_PRELOAD=%s \\\n',cluster.valgrindlib);
    130130                                        fprintf(fid,'mpiexec -np %i %s --leak-check=full --suppressions=%s %s/kriging.exe %s %s 2> %s.errlog >%s.outlog ',...
    131                                                 cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,cluster.executionpath,modelname,modelname,modelname);
     131                                                cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,[cluster.executionpath '/' modelname],modelname,modelname,modelname);
    132132                                end
    133133                                if ~io_gather, %concatenate the output files:
     
    141141                                fprintf(fid,'@echo off\n');
    142142                                if cluster.interactive
    143                                         fprintf(fid,'"%s/issm.exe" %s "%s" %s ',cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     143                                        fprintf(fid,'"%s/issm.exe" %s "%s" %s ',cluster.codepath,EnumToString(solution),[cluster.executionpath '/' modelname],modelname);
    144144                                else
    145145                                        fprintf(fid,'"%s/issm.exe" %s "%s" %s 2> %s.errlog >%s.outlog',...
    146                                                 cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
     146                                                cluster.codepath,EnumToString(solution),[cluster.executionpath '/' modelname],modelname,modelname,modelname);
    147147                                end
    148148                                fclose(fid);
  • issm/trunk-jpl/src/m/classes/clusters/greenplanet.m

    r12844 r13278  
    8282                         fprintf(fid,'#PBS -e %s.errlog \n\n',modelname);
    8383                         fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname);
    84                          fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     84                         fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    8585                         if ~io_gather, %concatenate the output files:
    8686                                 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
     
    9191                         if cluster.interactive,
    9292                                 fid=fopen([modelname '.run'],'w');
    93                                  fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     93                                 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    9494                                 if ~io_gather, %concatenate the output files:
    9595                                         fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
  • issm/trunk-jpl/src/m/classes/clusters/pfe.m

    r13126 r13278  
    125125                         fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME
    126126                         fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
    127                          fprintf(fid,'cd $PBS_O_WORKDIR\n\n');
    128                          fprintf(fid,'mpiexec -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname '/' modelname]);
     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);
    129129                         if ~io_gather, %concatenate the output files:
    130130                                 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
     
    136136                                 fid=fopen([modelname '.run'],'w');
    137137                                 if ~isvalgrind,
    138                                          fprintf(fid,'mpiexec -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution),modelname);
    139                                  else
    140                                          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);
     138                                         fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],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 '/' dirname],modelname);
    141141                                 end
    142142                                 if ~io_gather, %concatenate the output files:
     
    176176                         fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
    177177                         fprintf(fid,'export MPI_GROUP_MAX=64\n\n');
    178                          fprintf(fid,'cd $PBS_O_WORKDIR\n');
    179                          fprintf(fid,'mpiexec -np %i %s/kriging.exe $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,[cluster.executionpath '/' modelname '/' modelname]); %FIXME
     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
    180180                         if ~io_gather, %concatenate the output files:
    181181                                 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
     
    187187                                 fid=fopen([modelname '.run'],'w');
    188188                                 if ~isvalgrind,
    189                                          fprintf(fid,'mpiexec -np %i %s/kriging.exe $PBS_O_WORKDIR %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 $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,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);
    192192                                 end
    193193                                 if ~io_gather, %concatenate the output files:
  • issm/trunk-jpl/src/m/classes/clusters/pollux.m

    r12844 r13278  
    6262                         fprintf(fid,'#PBS -o %s.outlog \n',modelname);
    6363                         fprintf(fid,'#PBS -e %s.errlog \n',modelname);
    64                          fprintf(fid,'export PBS_O_WORKDIR=%s\n',cluster.executionpath);
     64                         fprintf(fid,'export PBS_O_WORKDIR=%s\n',[cluster.executionpath '/' dirname]);
    6565                         fprintf(fid,'cd $PBS_O_WORKDIR\n');
    6666                         fprintf(fid,'export OMP_NUM_THREADS=1\n');
    67                          fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     67                         fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
    6868                         fclose(fid);
    6969
Note: See TracChangeset for help on using the changeset viewer.