File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 1+ import os
12import sys
23
34from verify_slurm_cluster import VerifySlurmCluster , set_defaults
@@ -11,13 +12,17 @@ class VerifyCedarCluster(VerifySlurmCluster):
1112
1213 def get_arguments (self , ** kwargs ):
1314
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 )
15+ kwargs = super (VerifyCedarCluster , self ).get_arguments (** kwargs )
16+
17+ if kwargs ["gpusPerCommand" ] == 0 :
18+ account = os .environ .get ("CPU_SLURM_ACCOUNT" )
19+ else :
20+ account = os .environ .get ("GPU_SLURM_ACCOUNT" )
21+
22+ if "sbatchFlags" not in kwargs or len (kwargs ["sbatchFlags" ]) == 0 :
23+ kwargs ["sbatchFlags" ] = "--account=" + account
24+ else :
25+ kwargs ["sbatchFlags" ] += " --account=" + account
2126
2227 return kwargs
2328
You can’t perform that action at this time.
0 commit comments