Skip to content

Commit

Permalink
one more ntasks fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 16, 2023
1 parent 66b5fb8 commit 780a209
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion CIME/XML/env_mach_pes.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def get_value(
ngpus_per_node = self.get_value("NGPUS_PER_NODE")
if (ngpus_per_node and value) and value < 0:
value = -1 * value * max_cputasks_per_gpu_node
elif value:
elif value and value < 0:
value = -1 * value * max_mpitasks_per_node
# in the nuopc driver there is only one NINST value
# so that NINST_{comp} = NINST
Expand Down
3 changes: 0 additions & 3 deletions CIME/case/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,6 @@ def _setup_mach_pes(self, pecount, multi_driver, ninst, machine_name, mpilib):
comment = None
force_tasks = None
force_thrds = None

if match1:
opti_tasks = match1.group(1)
if opti_tasks.isdigit():
Expand Down Expand Up @@ -1222,7 +1221,6 @@ def _setup_mach_pes(self, pecount, multi_driver, ninst, machine_name, mpilib):
pstrid = pes_pstrid[pstrid_str] if pstrid_str in pes_pstrid else 1

totaltasks.append((ntasks + rootpe) * nthrds)

mach_pes_obj.set_value(ntasks_str, ntasks)
mach_pes_obj.set_value(nthrds_str, nthrds)
mach_pes_obj.set_value(rootpe_str, rootpe)
Expand Down Expand Up @@ -1399,7 +1397,6 @@ def configure(
if not dmax:
dmax = machobj.get_value(name)
if dmax:
print(f"here name is {name} and dmax is {dmax}")
self.set_value(name, dmax)
elif name == "MAX_CPUTASKS_PER_GPU_NODE":
logger.debug(
Expand Down

0 comments on commit 780a209

Please sign in to comment.