@@ -36,14 +36,12 @@ def __init__(self, *args): # {{{
3636 self .partition = 'general-compute'
3737 self .qos = 'general-compute'
3838 self .time = 1 * 60 * 60
39- self .nodes = 1
4039 self .ntasks = 1
41- self .ntaskspernode = 1
4240 self .cpuspertask = 1
4341 self .exclusive = False
4442 self .mem = '10000'
4543 self .jobname = ''
46- self .modules = ['ccrsoft/2023.01' , 'gcc/11.2.0' , 'openmpi/4.1.1' ]
44+ self .modules = ['ccrsoft/2023.01' , 'gcc/11.2.0' ]
4745 self .srcpath = '/projects/grid/ghub/ISSM/repos/ISSM'
4846 self .codepath = '/projects/grid/ghub/ISSM/repos/ISSM/bin'
4947 self .executionpath = '$HOME/ISSM/execution'
@@ -81,9 +79,7 @@ def __repr__(self): # {{{
8179 s += ' partition: {}\n ' .format (self .partition )
8280 s += ' qos: {}\n ' .format (self .qos )
8381 s += ' time: {}\n ' .format (self .time )
84- s += ' nodes: {}\n ' .format (self .nodes )
8582 s += ' ntasks: {}\n ' .format (self .ntasks )
86- s += ' ntaskspernode: {}\n ' .format (self .ntaskspernode )
8783 s += ' cpuspertask: {}\n ' .format (self .cpuspertask )
8884 s += ' exclusive: {}\n ' .format (self .exclusive )
8985 s += ' mem: {}\n ' .format (self .mem )
@@ -100,7 +96,7 @@ def __repr__(self): # {{{
10096 # }}}
10197
10298 def nprocs (self ): # {{{
103- return self .ntasks * self .ntaskspernode
99+ return self .ntasks * self .cpuspertask
104100 # }}}
105101
106102 def checkconsistency (self , md , solution , analyses ): # {{{
@@ -151,14 +147,8 @@ def BuildQueueScript(self, dirname, modelname, solution, io_gather, isvalgrind,
151147
152148 fid .write ('#!/bin/bash -l\n ' )
153149 fid .write ('#SBATCH --time {:02d}:{:02d}:00\n ' .format (int (floor (self .time / 3600 )), int (floor (self .time % 3600 ) / 60 )))
154- if self .nodes != 1 :
155- fid .write ('#SBATCH --nodes={}\n ' .format (self .nodes ))
156- if self .ntasks != 1 :
157- fid .write ('#SBATCH --ntasks={}\n ' .format (self .ntasks ))
158- if self .ntaskspernode != 1 :
159- fid .write ('#SBATCH --ntasks-per-node={}\n ' .format (self .ntaskspernode ))
160- if self .cpuspertask != 1 :
161- fid .write ('#SBATCH --cpus-per-task={}\n ' .format (self .cpuspertask ))
150+ fid .write ('#SBATCH --ntasks={}\n ' .format (self .ntasks ))
151+ fid .write ('#SBATCH --cpus-per-task={}\n ' .format (self .cpuspertask ))
162152 if self .exclusive :
163153 fid .write ('#SBATCH --exclusive\n ' )
164154 fid .write ('#SBATCH --constraint="[SAPPHIRE-RAPIDS-IB|ICE-LAKE-IB|CASCADE-LAKE-IB|EMERALD-RAPIDS-IB]"\n ' )
@@ -176,13 +166,13 @@ def BuildQueueScript(self, dirname, modelname, solution, io_gather, isvalgrind,
176166 #fid.write('. /usr/share/modules/init/bash\n\n')
177167 for i in range (len (self .modules )):
178168 fid .write ('module load {}\n ' .format (self .modules [i ]))
179- fid .write ('export MPI_GROUP_MAX=64\n \n ' )
180- fid .write ('export MPI_UNBUFFERED_STDIO=true\n \n ' )
181169 fid .write ('export PATH="$PATH:."\n \n ' )
182170 fid .write ('export ISSM_DIR="{}"\n ' .format (self .srcpath ))
183171 fid .write ('source $ISSM_DIR/etc/environment.sh\n ' )
184172 fid .write ('cd {}/{}\n \n ' .format (self .executionpath , dirname ))
185173
174+ fid .write ('which mpiexec\n \n ' )
175+
186176 fid .write ('mpiexec -np {} {}/{} {} {}/{} {}\n ' .format (self .nprocs (), self .codepath , executable , solution , self .executionpath , dirname , modelname ))
187177
188178 if not io_gather : # concatenate the output files
0 commit comments