Hi there,
I was just having a look at the accounting policy code in slurmctld
and I was wondering what the correct way of setting the state
descriiption string for a job is. In this case for a job running
against an association that has exceeded its GrpCPUMin limit (we're
running with hard limits in place with quarterly quota amounts). I'd
like to set a state description of "QuotaExceeded" as that's a lot
more familiar to our users than "AssociationJobLimit".
Is the following patch correct?
Thanks!
Mark
---
src/slurmctld/acct_policy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: slurm-2.2.7/src/slurmctld/acct_policy.c
===================================================================
--- slurm-2.2.7.orig/src/slurmctld/acct_policy.c
+++ slurm-2.2.7/src/slurmctld/acct_policy.c
@@ -1063,7 +1063,7 @@ extern bool acct_policy_job_runnable(str
&& (assoc_ptr->grp_cpu_mins != (uint64_t)INFINITE)
&& (usage_mins >= assoc_ptr->grp_cpu_mins)) {
job_ptr->state_reason = WAIT_ASSOC_JOB_LIMIT;
- xfree(job_ptr->state_desc);
+ job_ptr->state_desc = strdup("QuotaExceeded");
debug2("job %u being held, "
"assoc %u is at or exceeds "
"group max cpu minutes limit %"PRIu64" "