Skip to content

Commit

Permalink
Merge pull request #4477 from jedwards4b/derecho_gpu_enabled_fix
Browse files Browse the repository at this point in the history
gpu_enabled needs to be true only when gpu is used
  • Loading branch information
jedwards4b authored Aug 17, 2023
2 parents 847df06 + 60f8ee7 commit 35bfbae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CIME/case/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,10 @@ def get_values(self, item, attribute=None, resolved=True, subgroup=None):
def get_value(self, item, attribute=None, resolved=True, subgroup=None):
if item == "GPU_ENABLED":
if not self.gpu_enabled:
if self.get_value("GPU_TYPE") != "none":
if (
self.get_value("GPU_TYPE") != "none"
and self.get_value("NGPUS_PER_NODE") > 0
):
self.gpu_enabled = True
return "true" if self.gpu_enabled else "false"

Expand Down

0 comments on commit 35bfbae

Please sign in to comment.