Skip to content

Commit addba69

Browse files
Specify only ntasks_model for SLURM resource request (#106)
2 parents bdc308b + fb07ead commit addba69

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Changed
1515

16+
- Specify only ntasks_model for SLURM resource request.
1617
- Revisions for handling of Nens and special nml and mwtrm path/files in coupled land-atm DAS.
1718

1819
### Fixed

GEOSldas_App/ldas_setup

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class LDASsetup:
5959
# ------
6060
# Required resource manager input fields
6161
# ------
62-
rqdRmInpKeys = ['account', 'walltime', 'ntasks_model', 'ntasks-per-node']
62+
rqdRmInpKeys = ['account', 'walltime', 'ntasks_model']
6363
# ------
6464
# Optional resource manager input fields
6565
# ------
@@ -610,8 +610,6 @@ class LDASsetup:
610610
self.rqdRmInp['account'] = cmdLineArgs['account']
611611
self.rqdRmInp['walltime'] = "01:00:00"
612612
self.rqdRmInp['ntasks_model'] = 120
613-
self.rqdRmInp['ntasks-per-node'] = 46 # 46 works on Cascade Lake and Milan
614-
615613

616614

617615
# print rm inputs
@@ -646,19 +644,10 @@ class LDASsetup:
646644
self.rstdir = self.outdir + '/'+self.rqdExeInp['EXP_DOMAIN']+'/rs/'
647645
self.exefyl = self.blddirLn + exefyl
648646

649-
my_ntasks_per_node = int(self.rqdRmInp['ntasks-per-node'])
650-
651-
# default number of nodes
652-
my_nodes = self.rqdRmInp['ntasks_model'] // my_ntasks_per_node
653-
if self.rqdRmInp['ntasks_model'] % my_ntasks_per_node > 0 :
654-
my_nodes = my_nodes + 1
655-
656647
# default is set to 0 ( no output server)
657648
if 'oserver_nodes' not in self.optRmInp :
658649
self.optRmInp['oserver_nodes'] = 0
659650

660-
self.optRmInp['nodes'] = my_nodes + int(self.optRmInp['oserver_nodes'])
661-
662651
if (int(self.optRmInp['oserver_nodes']) >=1) :
663652
self.rqdExeInp['WRITE_RESTART_BY_OSERVER'] = "YES"
664653
# set default for now
@@ -1590,8 +1579,7 @@ class LDASsetup:
15901579
SBATCHQSUB = SBATCHQSUB,
15911580
MY_ACCOUNT = self.rqdRmInp['account'],
15921581
MY_WALLTIME = self.rqdRmInp['walltime'],
1593-
MY_NODES = str(self.optRmInp['nodes']),
1594-
MY_NTASKS_PER_NODE = str(self.rqdRmInp['ntasks-per-node']),
1582+
MY_NTASKS_MODEL = str(self.rqdRmInp['ntasks_model']),
15951583
MY_CONSTRAINT = constraint,
15961584
MY_OSERVER_NODES = str(self.optRmInp['oserver_nodes']),
15971585
MY_WRITERS_NPES = str(self.optRmInp['writers-per-node']),
@@ -1850,9 +1838,6 @@ def _printRmInputKeys(rqdRmInpKeys, optRmInpKeys):
18501838
print ('# [At NCCS: Use command "getsponsor" to see available account number(s).]' )
18511839
print ('# - walltime = walltime requested; format is HH:MM:SS (hours/minutes/seconds)')
18521840
print ('# - ntasks_model = number of processors requested for the model (typically 126; output server is not included)')
1853-
print ('# - ntasks-per-node = number of tasks per node (typically 46 for Cascade Lake and 126 for Milan)')
1854-
print ('# [If >46, Milan nodes will be allocated, else Cascade Lake or Milan.]')
1855-
print ('# [NCCS recommends <=46 for Cascade Lake and <=126 for Milan.]')
18561841
print ('#')
18571842
for key in rqdRmInpKeys:
18581843
print (key + ':')
@@ -1863,8 +1848,8 @@ def _printRmInputKeys(rqdRmInpKeys, optRmInpKeys):
18631848
print ('# NOTE:')
18641849
print ('# - job_name = name of experiment; default is "exp_id"')
18651850
print ('# - qos = quality-of-service; do not specify by default; specify "debug" for faster but limited service.')
1866-
print ('# - oserver_nodes = number of nodes for oserver ( default is 0 )')
1867-
print ('# - writers-per-node = tasks per oserver_node for writing ( default is 5 ),')
1851+
print ('# - oserver_nodes = number of nodes for oserver ( default is 0, for future use )')
1852+
print ('# - writers-per-node = tasks per oserver_node for writing ( default is 5, for future use ),')
18681853
print ('# IMPORTANT REQUIREMENT: total #writers = writers-per-node * oserver_nodes >= 2')
18691854
print ('# Jobs will hang when oserver_nodes = writers-per-node = 1.')
18701855
print ('#')

GEOSldas_App/lenkf_j_template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#SBATCH --error={MY_EXPDIR}/scratch/GEOSldas_err_txt
1313
#SBATCH --account={MY_ACCOUNT}
1414
#SBATCH --time={MY_WALLTIME}
15-
#SBATCH --nodes={MY_NODES} --ntasks-per-node={MY_NTASKS_PER_NODE}
15+
#SBATCH --ntasks={MY_NTASKS_MODEL}
1616
#SBATCH --job-name={MY_JOB}
1717
#SBATCH --qos={MY_QOS}
1818
#SBATCH --constraint={MY_CONSTRAINT}

0 commit comments

Comments
 (0)