Changeset 19674
- Timestamp:
- 10/21/15 17:33:16 (9 years ago)
- Location:
- issm/trunk-jpl/src/m/classes/clusters
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/generic.py
r19638 r19674 71 71 def BuildQueueScript(self,dirname,modelname,solution,io_gather,isvalgrind,isgprof,isdakota): # {{{ 72 72 73 executable='issm.exe'; 74 if isdakota: 75 version=IssmConfig('_DAKOTA_VERSION_')[0:2] 76 version=float(version) 77 if version>=6: 78 executable='issm_dakota.exe' 79 73 80 #write queuing script 74 81 if not m.ispc(): … … 79 86 if self.interactive: 80 87 if IssmConfig('_HAVE_MPI_')[0]: 81 fid.write('mpiexec -np %i %s/ issm.exe %s %s/%s %s ' % (self.np,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname))88 fid.write('mpiexec -np %i %s/%s %s %s/%s %s ' % (self.np,self.codepath,executable,EnumToString(solution)[0],self.executionpath,dirname,modelname)) 82 89 else: 83 fid.write('%s/ issm.exe %s %s/%s %s ' % (self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname))90 fid.write('%s/%s %s %s/%s %s ' % (self.codepath,executable,EnumToString(solution)[0],self.executionpath,dirname,modelname)) 84 91 else: 85 92 if IssmConfig('_HAVE_MPI_')[0]: 86 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))93 fid.write('mpiexec -np %i %s/%s %s %s/%s %s 2> %s.errlog >%s.outlog ' % (self.np,self.codepath,executable,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname)) 87 94 else: 88 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))95 fid.write('%s/%s %s %s/%s %s 2> %s.errlog >%s.outlog ' % (self.codepath,executable,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname)) 89 96 elif isgprof: 90 fid.write('\n gprof %s/ issm.exe gmon.out > %s.performance' % (self.codepath,modelname))97 fid.write('\n gprof %s/%s gmon.out > %s.performance' % (self.codepath,executable,modelname)) 91 98 else: 92 99 #Add --gen-suppressions=all to get suppression lines 93 100 fid.write('LD_PRELOAD=%s \\\n' % self.valgrindlib) 94 101 if IssmConfig('_HAVE_MPI_')[0]: 95 fid.write('mpiexec -np %i %s --leak-check=full --suppressions=%s %s/ issm.exe%s %s/%s %s 2> %s.errlog >%s.outlog ' % \96 (self.np,self.valgrind,self.valgrindsup,self.codepath, EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))102 fid.write('mpiexec -np %i %s --leak-check=full --suppressions=%s %s/%s %s %s/%s %s 2> %s.errlog >%s.outlog ' % \ 103 (self.np,self.valgrind,self.valgrindsup,self.codepath,executable,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname)) 97 104 else: 98 fid.write('%s --leak-check=full --suppressions=%s %s/ issm.exe%s %s/%s %s 2> %s.errlog >%s.outlog ' % \99 (self.valgrind,self.valgrindsup,self.codepath, EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))105 fid.write('%s --leak-check=full --suppressions=%s %s/%s %s %s/%s %s 2> %s.errlog >%s.outlog ' % \ 106 (self.valgrind,self.valgrindsup,self.codepath,executable,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname)) 100 107 101 108 if not io_gather: #concatenate the output files: … … 108 115 fid.write('@echo off\n') 109 116 if self.interactive: 110 fid.write('"%s/ issm.exe" %s "%s/%s" %s ' % (self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname))111 else: 112 fid.write('"%s/ issm.exe" %s "%s/%s" %s 2> %s.errlog >%s.outlog' % \113 (self.codepath, EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))117 fid.write('"%s/%s" %s "%s/%s" %s ' % (self.codepath,executable,EnumToString(solution)[0],self.executionpath,dirname,modelname)) 118 else: 119 fid.write('"%s/%s" %s "%s/%s" %s 2> %s.errlog >%s.outlog' % \ 120 (self.codepath,executable,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname)) 114 121 fid.close() 115 122 -
issm/trunk-jpl/src/m/classes/clusters/pfe.py
r19638 r19674 49 49 #initialize cluster using user settings if provided 50 50 self=pfe_settings(self) 51 self.np= 20*851 self.np=self.nprocs() 52 52 #OK get other fields 53 53 self=options.AssignObjectFields(self) … … 78 78 # }}} 79 79 80 def nprocs(self): 81 # {{{ 82 self.np=self.numnodes*self.cpuspernode 83 return self.np 84 # }}} 80 85 def checkconsistency(self,md,solution,analyses): 81 86 # {{{ … … 86 91 'debug':[2*60,150], 87 92 'devel':[2*60,150]} 88 QueueRequirements(queuedict,self.queue,self.np ,self.time)93 QueueRequirements(queuedict,self.queue,self.nprocs(),self.time) 89 94 90 95 #now, check cluster.cpuspernode according to processor type … … 132 137 # {{{ 133 138 134 self.np=self.numnodes*self.cpuspernode; 139 executable='issm.exe' 140 if isdakota: 141 version=IssmConfig('_DAKOTA_VERSION_')[0:2] 142 version=float(version) 143 if version>=6: 144 executable='issm_dakota.exe' 145 135 146 #write queuing script 136 147 fid=open(modelname+'.queue','w') … … 151 162 fid.write('source $ISSM_DIR/etc/environment.sh\n') 152 163 fid.write('cd %s/%s/\n\n' % (self.executionpath,dirname)) 153 fid.write('mpiexec -np %i %s/ issm.exe %s %s/%s %s\n' % (self.np,self.codepath,str(EnumToString(solution)[0]),self.executionpath,dirname,modelname))164 fid.write('mpiexec -np %i %s/%s %s %s/%s %s\n' % (self.nprocs(),self.codepath,executable,str(EnumToString(solution)[0]),self.executionpath,dirname,modelname)) 154 165 155 166 fid.close()
Note:
See TracChangeset
for help on using the changeset viewer.