diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 64aa51eb357ca9f5b9d1e178792f623af7cb13bc..26837d387260f1faf3e0cc4411b06593580a9573 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3745,7 +3745,7 @@ void job_time_limit(void) info("Job %u timed out, " "assoc %u is at or exceeds " "group max cpu minutes limit %llu " - "with %Lf for account %s", + "with %llu for account %s", job_ptr->job_id, assoc->id, assoc->grp_cpu_mins, usage_mins, assoc->acct); @@ -3773,7 +3773,7 @@ void job_time_limit(void) info("Job %u timed out, " "assoc %u is at or exceeds " "max cpu minutes limit %llu " - "with %Lf for account %s", + "with %llu for account %s", job_ptr->job_id, assoc->id, assoc->max_cpu_mins_pj, job_cpu_usage_mins, assoc->acct); @@ -6748,7 +6748,9 @@ static bool _validate_acct_policy(job_desc_msg_t *job_desc, int timelimit_set = 0; int max_nodes_set = 0; char *user_name = assoc_ptr->user; + bool rc = true; + slurm_mutex_lock(&assoc_mgr_association_lock); while(assoc_ptr) { /* for validation we don't need to look at * assoc_ptr->grp_cpu_mins. @@ -6773,7 +6775,8 @@ static bool _validate_acct_policy(job_desc_msg_t *job_desc, job_desc->min_nodes, assoc_ptr->grp_nodes, assoc_ptr->acct); - return false; + rc = false; + break; } else if (job_desc->max_nodes == 0 || (max_nodes_set && (job_desc->max_nodes @@ -6804,7 +6807,8 @@ static bool _validate_acct_policy(job_desc_msg_t *job_desc, job_desc->user_id, assoc_ptr->grp_submit_jobs, assoc_ptr->acct); - return false; + rc = false; + break; } @@ -6843,7 +6847,8 @@ static bool _validate_acct_policy(job_desc_msg_t *job_desc, job_desc->user_id, job_desc->min_nodes, assoc_ptr->max_nodes_pj); - return false; + rc = false; + break; } else if (job_desc->max_nodes == 0 || (max_nodes_set && (job_desc->max_nodes @@ -6872,7 +6877,8 @@ static bool _validate_acct_policy(job_desc_msg_t *job_desc, user_name, job_desc->user_id, assoc_ptr->max_submit_jobs); - return false; + rc = false; + break; } if ((assoc_ptr->max_wall_pj != NO_VAL) && @@ -6895,14 +6901,17 @@ static bool _validate_acct_policy(job_desc_msg_t *job_desc, user_name, job_desc->user_id, job_desc->time_limit, time_limit); - return false; + rc = false; + break; } } assoc_ptr = assoc_ptr->parent_assoc_ptr; parent = 1; } - return true; + slurm_mutex_unlock(&assoc_mgr_association_lock); + + return rc; } /*