From a016f80cf39bfad74182e7c6550e6ca4a4ba79d1 Mon Sep 17 00:00:00 2001 From: Comeani Date: Wed, 28 Feb 2024 09:45:19 -0500 Subject: [PATCH] use billing instead of cpu/gpu for TRES limit --- bank/system/slurm.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bank/system/slurm.py b/bank/system/slurm.py index cbaefed0..ce458ce6 100644 --- a/bank/system/slurm.py +++ b/bank/system/slurm.py @@ -146,10 +146,7 @@ def set_locked_state(self, lock_state: bool, cluster: str) -> None: raise ClusterNotFoundError(f'Cluster {cluster} is not configured with Slurm') lock_state_int = 0 if lock_state else -1 - ShellCmd(f'sacctmgr -i modify account where account={self.account_name} cluster={cluster} ' - f'set GrpTresRunMins=cpu={lock_state_int}').raise_if_err() - ShellCmd(f'sacctmgr -i modify account where account={self.account_name} cluster={cluster} ' - f'set GrpTresRunMins=gres/gpu={lock_state_int}').raise_if_err() + ShellCmd(f'sacctmgr -i modify account where account={self.account_name} cluster={cluster} set GrpTresRunMins=billing={lock_state_int}').raise_if_err() def get_cluster_usage_per_user(self, cluster: str, start: date, end: date, in_hours: bool = True) -> Dict[str, int]: """Return the raw account usage per user on a given cluster