Skip to content

Commit

Permalink
fix issue with NTASKS
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 16, 2023
1 parent 8f97110 commit 66b5fb8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CIME/XML/env_mach_pes.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ def get_value(
if ngpus_per_node is None:
ngpus_per_node = self.get_value("NGPUS_PER_NODE")
if (ngpus_per_node and value) and value < 0:
if ngpus_per_node > 0:
value = -1 * value * max_cputasks_per_gpu_node
else:
value = -1 * value * max_mpitasks_per_node
value = -1 * value * max_cputasks_per_gpu_node
elif value:
value = -1 * value * max_mpitasks_per_node
# in the nuopc driver there is only one NINST value
# so that NINST_{comp} = NINST
if "NINST_" in vid and value is None:
Expand Down Expand Up @@ -163,6 +162,7 @@ def get_total_tasks(self, comp_classes, async_interface=False):
tt = rootpe + nthrds * ((ntasks - 1) * pstrid + 1)
maxrootpe = max(maxrootpe, rootpe)
total_tasks = max(tt, total_tasks)

if asyncio_tasks:
total_tasks = total_tasks + len(asyncio_tasks)
if self.get_value("MULTI_DRIVER"):
Expand Down

0 comments on commit 66b5fb8

Please sign in to comment.