Skip to content
Snippets Groups Projects
Commit 1e241624 authored by Moe Jette's avatar Moe Jette
Browse files

Add example job_modify support for job_submit/defaults plugin

parent abcb872e
No related branches found
No related tags found
No related merge requests found
......@@ -107,7 +107,8 @@ const uint32_t min_plug_version = 100;
extern int job_submit(struct job_descriptor *job_desc)
{
if (job_desc->acctg_freq < MIN_ACCTG_FREQUENCY) {
info("Changing accounting frequency of submitted from %u to %u",
info("Changing accounting frequency of submitted job "
"from %u to %u",
job_desc->acctg_freq, MIN_ACCTG_FREQUENCY);
job_desc->acctg_freq = MIN_ACCTG_FREQUENCY;
}
......@@ -121,9 +122,24 @@ extern int job_submit(struct job_descriptor *job_desc)
}
/* This example code will prevent users from setting an accounting frequency
* of less than 30 seconds in order to insure more precise accounting. */
* of less than 30 seconds in order to insure more precise accounting.
* Also remove any QOS value set by the user in order to use the default value
* from the database. */
extern int job_modify(struct job_descriptor *job_desc,
struct job_record *job_ptr)
{
if (job_desc->acctg_freq < MIN_ACCTG_FREQUENCY) {
info("Changing accounting frequency of modify job %u "
"from %u to %u", job_ptr->job_id,
job_desc->acctg_freq, MIN_ACCTG_FREQUENCY);
job_desc->acctg_freq = MIN_ACCTG_FREQUENCY;
}
if (job_desc->qos) {
info("Clearing QOS (%s) from modify of job %u",
job_desc->qos, job_ptr->job_id);
xfree(job_desc->qos);
}
return SLURM_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment