Skip to content

Commit

Permalink
Remove DO_KILL_NODE _FAILURE and use DO_KILL state instead if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Aug 25, 2023
1 parent a0e1259 commit 5a43497
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/_ert_com_protocol/status_type_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"RUNNING_EXIT_CALLBACK": "STEP_RUNNING",
"STATUS_FAILURE": "STEP_UNKNOWN",
"FAILED": "STEP_FAILED",
"DO_KILL_NODE_FAILURE": "STEP_FAILED",
"UNKNOWN": "STEP_UNKNOWN",
}

Expand Down
1 change: 0 additions & 1 deletion src/clib/lib/include/ert/job_queue/job_queue_status.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ struct job_queue_status_struct {
JOB_QUEUE_RUNNING_EXIT_CALLBACK, // Temporary state, while running requested callbacks after an ended job - controlled by job_queue
JOB_QUEUE_STATUS_FAILURE, // The driver call to get status has failed, job status remains unchanged
JOB_QUEUE_FAILED, // Job has failed, no more retries, FINAL STATE
JOB_QUEUE_DO_KILL_NODE_FAILURE, // Job has failed, node should be blacklisted
JOB_QUEUE_UNKNOWN}; // Unable to get status from submitted job
};

Expand Down
4 changes: 1 addition & 3 deletions src/clib/lib/include/ert/job_queue/job_status.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ typedef enum {
JOB_QUEUE_RUNNING_EXIT_CALLBACK = 2048,
JOB_QUEUE_STATUS_FAILURE = 4096,
JOB_QUEUE_FAILED = 8192,
JOB_QUEUE_DO_KILL_NODE_FAILURE = 16384,
JOB_QUEUE_UNKNOWN = 32768
} job_status_type;

Expand All @@ -109,7 +108,6 @@ const std::map<const job_status_type, const std::string> job_status_names = {
{JOB_QUEUE_RUNNING_EXIT_CALLBACK, "JOB_QUEUE_RUNNING_EXIT_CALLBACK"},
{JOB_QUEUE_STATUS_FAILURE, "JOB_QUEUE_STATUS_FAILURE"},
{JOB_QUEUE_FAILED, "JOB_QUEUE_FAILED"},
{JOB_QUEUE_DO_KILL_NODE_FAILURE, "JOB_QUEUE_DO_KILL_NODE_FAILURE"},
{JOB_QUEUE_UNKNOWN, "JOB_QUEUE_UNKNOWN"},
};

Expand All @@ -123,7 +121,7 @@ const std::map<const job_status_type, const std::string> job_status_names = {
*/
#define JOB_QUEUE_CAN_KILL \
(JOB_QUEUE_WAITING + JOB_QUEUE_RUNNING + JOB_QUEUE_PENDING + \
JOB_QUEUE_SUBMITTED + JOB_QUEUE_DO_KILL + JOB_QUEUE_DO_KILL_NODE_FAILURE)
JOB_QUEUE_SUBMITTED + JOB_QUEUE_DO_KILL)

#define JOB_QUEUE_CAN_UPDATE_STATUS \
(JOB_QUEUE_RUNNING + JOB_QUEUE_PENDING + JOB_QUEUE_SUBMITTED + \
Expand Down
2 changes: 1 addition & 1 deletion src/clib/lib/job_queue/job_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ ERT_CLIB_SUBMODULE("queue", m) {
MAX_CONFIRMED_WAIT, node->job_name, node->submit_attempt);
logger->info(error_msg);
msg = error_msg;
job_status_type new_status = JOB_QUEUE_DO_KILL_NODE_FAILURE;
job_status_type new_status = JOB_QUEUE_DO_KILL;
job_queue_node_set_status(node, new_status);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/clib/old_tests/job_queue/test_job_status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ void test_index() {
add_and_count_job_status(status, JOB_QUEUE_RUNNING_EXIT_CALLBACK, count++);
add_and_count_job_status(status, JOB_QUEUE_STATUS_FAILURE, count++);
add_and_count_job_status(status, JOB_QUEUE_FAILED, count++);
add_and_count_job_status(status, JOB_QUEUE_DO_KILL_NODE_FAILURE, count++);
job_queue_status_free(status);
}

Expand Down
2 changes: 1 addition & 1 deletion src/ert/job_queue/job_queue_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def _log_kill_thread_stopping_status(self) -> None:
DONE_STATES = [
JobStatus.SUCCESS,
JobStatus.IS_KILLED,
JobStatus.DO_KILL_NODE_FAILURE,
JobStatus.DO_KILL,
]
FAILURE_STATES = [JobStatus.FAILED]

Expand Down
1 change: 0 additions & 1 deletion src/ert/job_queue/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"RUNNING_EXIT_CALLBACK": _FM_STEP_RUNNING,
"STATUS_FAILURE": _FM_STEP_UNKNOWN,
"FAILED": _FM_STEP_FAILURE,
"DO_KILL_NODE_FAILURE": _FM_STEP_FAILURE,
"UNKNOWN": _FM_STEP_UNKNOWN,
}

Expand Down

0 comments on commit 5a43497

Please sign in to comment.