From 66b5fb862ddaca51b196bf9a8574227bd3fc7fb8 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Wed, 16 Aug 2023 09:32:51 -0600 Subject: [PATCH] fix issue with NTASKS --- CIME/XML/env_mach_pes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CIME/XML/env_mach_pes.py b/CIME/XML/env_mach_pes.py index b7cfe9331d6..083f283f81e 100644 --- a/CIME/XML/env_mach_pes.py +++ b/CIME/XML/env_mach_pes.py @@ -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: @@ -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"):