Skip to content

Commit a3c08c8

Browse files
committed
Set properly account in verify_graham
The tests were failing because the account was not specified.
1 parent 998f3ba commit a3c08c8

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

smartdispatch/tests/verify_graham.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ class VerifyGrahamCluster(VerifySlurmCluster):
1111

1212
def get_arguments(self, **kwargs):
1313

14-
set_defaults(
15-
kwargs,
16-
coresPerCommand=1,
17-
gpusPerCommand=0,
18-
walltime=self.WALLTIME,
19-
coresPerNode=self.CORES_PER_NODE,
20-
gpusPerNode=self.GPUS_PER_NODE,
21-
sbatchFlags="--account=rpp-bengioy")
14+
kwargs = super(VerifyGrahamCluster, self).get_arguments(**kwargs)
15+
16+
if kwargs["gpusPerCommand"] == 0:
17+
account = os.environ.get("CPU_SLURM_ACCOUNT")
18+
else:
19+
account = os.environ.get("GPU_SLURM_ACCOUNT")
20+
21+
if "sbatchFlags" not in kwargs or len(kwargs["sbatchFlags"]) == 0:
22+
kwargs["sbatchFlags"] = "--account=" + account
23+
else:
24+
kwargs["sbatchFlags"] += " --account=" + account
2225

2326
return kwargs
2427

0 commit comments

Comments
 (0)