Skip to content

Commit 98148f8

Browse files
committed
fix joining gres
1 parent 35b88ff commit 98148f8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/hpc_connect/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,12 @@ def count_per_socket(self, type: str, default: int | None = None) -> int:
396396

397397
@cached_property
398398
def node_count(self) -> int:
399+
count: int = 0
399400
for resource in self.resource_specs:
400401
if resource["type"] == "node":
401-
return resource["count"]
402+
count += resource["count"]
403+
if count:
404+
return count
402405
raise ValueError("Unable to determine node count")
403406

404407
@cached_property

src/hpcc_slurm/submit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def read_sinfo() -> dict[str, Any] | None:
264264
"cores_per_socket": cores_per_socket,
265265
"threads_per_core": threads_per_core,
266266
"cpus_per_node": cpus_per_node,
267-
"gres": " ".join(gres),
267+
"gres": " ".join(str(_) for _ in gres),
268268
},
269269
}
270270
for res in gres:

0 commit comments

Comments
 (0)