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

Change some error codes (typos in some names).

Did some general code clean-up.
parent b25dce39
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <src/common/slurm_protocol_api.h> #include <src/common/slurm_protocol_api.h>
/* slurm_submit_job - load the supplied node information buffer if changed */ /* slurm_submit_batch_job - load the supplied node information buffer if changed */
int int
slurm_submit_batch_job (job_desc_msg_t * job_desc_msg, submit_response_msg_t ** slurm_alloc_msg ) slurm_submit_batch_job (job_desc_msg_t * job_desc_msg, submit_response_msg_t ** slurm_alloc_msg )
{ {
......
...@@ -38,14 +38,13 @@ static slurm_errtab_t slurm_errtab[] = { ...@@ -38,14 +38,13 @@ static slurm_errtab_t slurm_errtab[] = {
{ ESLURM_USER_ID_MISSING , "User id missing" }, { ESLURM_USER_ID_MISSING , "User id missing" },
{ ESLURM_JOB_NAME_TOO_LONG, "Job name too long" }, { ESLURM_JOB_NAME_TOO_LONG, "Job name too long" },
{ ESLURM_DUPLICATE_JOB_ID , "Duplicate job id" }, { ESLURM_DUPLICATE_JOB_ID , "Duplicate job id" },
{ ESLURM_INVALID_PROCS_PER_TASK, "Invalid processors per task specification" },
{ ESLURM_NOT_TOP_PRIORITY, "Immediate execution impossible, higher priority jobs pending" }, { ESLURM_NOT_TOP_PRIORITY, "Immediate execution impossible, higher priority jobs pending" },
{ ESLURM_REQUESTED_NODE_CONFIGURATION_UNAVAILBLE, "Requested node configuration is not available" }, { ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE, "Requested node configuration is not available" },
{ ESLURM_NODES_BUSY, "Requested nodes are busy" }, { ESLURM_NODES_BUSY, "Requested nodes are busy" },
{ ESLURM_INVALID_JOB_ID, "Invalid job id specified" }, { ESLURM_INVALID_JOB_ID, "Invalid job id specified" },
{ ESLURM_INVALID_NODE_NAMES, "Invalid node name specified" }, { ESLURM_INVALID_NODE_NAMES, "Invalid node name specified" },
{ ESLURM_INVALID_PARTITION_NAME, "Invalid partition name specified" }, { ESLURM_INVALID_PARTITION_NAME, "Invalid partition name specified" },
{ ESLURM_TRANSISTION_STATE_NO_UPDATE, "Job can not be altered now, try again later" }, { fBESLURM_TRANSITION_STATE_NO_UPDATE, "Job can not be altered now, try again later" },
{ ESLURM_ALREADY_DONE, "Job/step already completed" }, { ESLURM_ALREADY_DONE, "Job/step already completed" },
/* partition_mgr.c/update_part */ /* partition_mgr.c/update_part */
......
...@@ -34,14 +34,13 @@ ...@@ -34,14 +34,13 @@
#define ESLURM_USER_ID_MISSING -2010 #define ESLURM_USER_ID_MISSING -2010
#define ESLURM_JOB_NAME_TOO_LONG -2011 #define ESLURM_JOB_NAME_TOO_LONG -2011
#define ESLURM_DUPLICATE_JOB_ID -2012 #define ESLURM_DUPLICATE_JOB_ID -2012
#define ESLURM_INVALID_PROCS_PER_TASK -2013
#define ESLURM_NOT_TOP_PRIORITY -2014 #define ESLURM_NOT_TOP_PRIORITY -2014
#define ESLURM_REQUESTED_NODE_CONFIGURATION_UNAVAILBLE -2015 #define ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE -2015
#define ESLURM_NODES_BUSY -2016 #define ESLURM_NODES_BUSY -2016
#define ESLURM_INVALID_JOB_ID -2017 #define ESLURM_INVALID_JOB_ID -2017
#define ESLURM_INVALID_NODE_NAMES -2018 #define ESLURM_INVALID_NODE_NAMES -2018
#define ESLURM_INVALID_PARTITION_NAME -2019 #define ESLURM_INVALID_PARTITION_NAME -2019
#define ESLURM_TRANSISTION_STATE_NO_UPDATE -2020 #define fBESLURM_TRANSITION_STATE_NO_UPDATE -2020
#define ESLURM_ALREADY_DONE -2021 #define ESLURM_ALREADY_DONE -2021
/* partition_mgr.c/update_part */ /* partition_mgr.c/update_part */
......
...@@ -77,7 +77,7 @@ main (int argc, char *argv[]) ...@@ -77,7 +77,7 @@ main (int argc, char *argv[])
for (i=0; i<10; i++) { for (i=0; i<10; i++) {
error_code = slurm_cancel_job_step (job_id, step_id); error_code = slurm_cancel_job_step (job_id, step_id);
if ((error_code == 0) || if ((error_code == 0) ||
(errno != ESLURM_TRANSISTION_STATE_NO_UPDATE)) (errno != fBESLURM_TRANSITION_STATE_NO_UPDATE))
break; break;
printf ("Job is in transistional state, retrying\n"); printf ("Job is in transistional state, retrying\n");
sleep ( 5 + i ); sleep ( 5 + i );
...@@ -89,7 +89,7 @@ main (int argc, char *argv[]) ...@@ -89,7 +89,7 @@ main (int argc, char *argv[])
for (i=0; i<10; i++) { for (i=0; i<10; i++) {
error_code = slurm_cancel_job (job_id); error_code = slurm_cancel_job (job_id);
if ((error_code == 0) || if ((error_code == 0) ||
(errno != ESLURM_TRANSISTION_STATE_NO_UPDATE)) (errno != fBESLURM_TRANSITION_STATE_NO_UPDATE))
break; break;
printf ("Job is in transistional state, retrying\n"); printf ("Job is in transistional state, retrying\n");
sleep ( 5 + i ); sleep ( 5 + i );
......
...@@ -464,7 +464,7 @@ job_cancel (uint32_t job_id) ...@@ -464,7 +464,7 @@ job_cancel (uint32_t job_id)
info ("job_cancel: job %u can't be cancelled from state=%s", info ("job_cancel: job %u can't be cancelled from state=%s",
job_id, job_state_string(job_ptr->job_state)); job_id, job_state_string(job_ptr->job_state));
return ESLURM_TRANSISTION_STATE_NO_UPDATE; return fBESLURM_TRANSITION_STATE_NO_UPDATE;
} }
...@@ -708,7 +708,7 @@ job_step_cancel (uint32_t job_id, uint32_t step_id) ...@@ -708,7 +708,7 @@ job_step_cancel (uint32_t job_id, uint32_t step_id)
info ("job_step_cancel: step %u.%u can't be cancelled from state=%s", info ("job_step_cancel: step %u.%u can't be cancelled from state=%s",
job_id, step_id, job_state_string(job_ptr->job_state)); job_id, step_id, job_state_string(job_ptr->job_state));
return ESLURM_TRANSISTION_STATE_NO_UPDATE; return fBESLURM_TRANSITION_STATE_NO_UPDATE;
} }
......
...@@ -809,7 +809,7 @@ select_nodes (struct job_record *job_ptr, int test_only) ...@@ -809,7 +809,7 @@ select_nodes (struct job_record *job_ptr, int test_only)
info ("select_nodes: no node configurations satisfy requirements procs=%u:mem=%u:disk=%u:feature=%s", info ("select_nodes: no node configurations satisfy requirements procs=%u:mem=%u:disk=%u:feature=%s",
job_ptr->details->min_procs, job_ptr->details->min_memory, job_ptr->details->min_procs, job_ptr->details->min_memory,
job_ptr->details->min_tmp_disk, job_ptr->details->features); job_ptr->details->min_tmp_disk, job_ptr->details->features);
error_code = ESLURM_REQUESTED_NODE_CONFIGURATION_UNAVAILBLE; error_code = ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE;
goto cleanup; goto cleanup;
} }
/* eliminate last (incomplete) node_set record */ /* eliminate last (incomplete) node_set record */
...@@ -824,7 +824,7 @@ select_nodes (struct job_record *job_ptr, int test_only) ...@@ -824,7 +824,7 @@ select_nodes (struct job_record *job_ptr, int test_only)
info ("select_nodes: requested nodes do not satisfy configurations requirements procs=%u:mem=%u:disk=%u:feature=%s", info ("select_nodes: requested nodes do not satisfy configurations requirements procs=%u:mem=%u:disk=%u:feature=%s",
job_ptr->details->min_procs, job_ptr->details->min_memory, job_ptr->details->min_procs, job_ptr->details->min_memory,
job_ptr->details->min_tmp_disk, job_ptr->details->features); job_ptr->details->min_tmp_disk, job_ptr->details->features);
error_code = ESLURM_REQUESTED_NODE_CONFIGURATION_UNAVAILBLE; error_code = ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE;
goto cleanup; goto cleanup;
} }
} }
...@@ -842,7 +842,7 @@ select_nodes (struct job_record *job_ptr, int test_only) ...@@ -842,7 +842,7 @@ select_nodes (struct job_record *job_ptr, int test_only)
goto cleanup; goto cleanup;
} }
if (error_code == EINVAL) { if (error_code == EINVAL) {
error_code = ESLURM_REQUESTED_NODE_CONFIGURATION_UNAVAILBLE; error_code = ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE;
info ("select_nodes: no nodes can satisfy job request"); info ("select_nodes: no nodes can satisfy job request");
goto cleanup; goto cleanup;
} }
......
...@@ -371,7 +371,7 @@ step_create (struct step_specs *step_specs) ...@@ -371,7 +371,7 @@ step_create (struct step_specs *step_specs)
nodeset = pick_step_nodes (job_ptr, step_specs->min_nodes, step_specs->min_cpus, nodeset = pick_step_nodes (job_ptr, step_specs->min_nodes, step_specs->min_cpus,
step_specs->node_list, step_specs->relative_node_list); step_specs->node_list, step_specs->relative_node_list);
if (nodeset == NULL) if (nodeset == NULL)
return ESLURM_REQUESTED_NODE_CONFIGURATION_UNAVAILBLE; return ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE;
step_ptr = create_step_record (job_ptr); step_ptr = create_step_record (job_ptr);
if (step_ptr == NULL) if (step_ptr == NULL)
......
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