Changeset 13305


Ignore:
Timestamp:
09/08/12 10:47:48 (13 years ago)
Author:
Eric.Larour
Message:

CHG: run even when mpi is not available

File:
1 edited

Legend:

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

    r13281 r13305  
    7979                        fid.write('#!/bin/sh\n')
    8080                        if not isvalgrind:
    81                                 if self.interactive:
    82                                         fid.write('mpiexec -np %i %s/issm.exe %s %s/%s %s ' % (self.np,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname))
     81                                if self.interactive:
     82                                        if ismpi():
     83                                                fid.write('mpiexec -np %i %s/issm.exe %s %s/%s %s ' % (self.np,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname))
     84                                        else:
     85                                                fid.write('%s/issm.exe %s %s/%s %s ' % (self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname))
    8386                                else:
    84                                         fid.write('mpiexec -np %i %s/issm.exe %s %s/%s %s 2> %s.errlog >%s.outlog ' % (self.np,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))
     87                                        if ismpi():
     88                                                fid.write('mpiexec -np %i %s/issm.exe %s %s/%s %s 2> %s.errlog >%s.outlog ' % (self.np,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))
     89                                        else:
     90                                                fid.write('%s/issm.exe %s %s/%s %s 2> %s.errlog >%s.outlog ' % (self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))
    8591                        elif isgprof:
    8692                                fid.write('\n gprof %s/issm.exe gmon.out > %s.performance' % (self.codepath,modelname))
     
    8894                                #Add --gen-suppressions=all to get suppression lines
    8995                                fid.write('LD_PRELOAD=%s \\\n' % self.valgrindlib)
    90                                 fid.write('mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s/%s %s 2> %s.errlog >%s.outlog ' % \
    91                                         (self.np,self.valgrind,self.valgrindsup,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))
     96                                if ismpi():
     97                                        fid.write('mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s/%s %s 2> %s.errlog >%s.outlog ' % \
     98                                                        (self.np,self.valgrind,self.valgrindsup,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))
     99                                else:   
     100                                        fid.write('%s --leak-check=full --suppressions=%s %s/issm.exe %s %s/%s %s 2> %s.errlog >%s.outlog ' % \
     101                                                        (self.valgrind,self.valgrindsup,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))
     102
    92103                        if not io_gather:    #concatenate the output files:
    93104                                fid.write('\ncat %s.outbin.* > %s.outbin' % (modelname,modelname))
Note: See TracChangeset for help on using the changeset viewer.