Commit c36f02f6 authored by S. Lackner's avatar S. Lackner

[code] Add protocol feature to continue dynamic submissions

parent 82f0eae6
......@@ -121,6 +121,9 @@ std::string ip_message_type_to_string(IPMessageType type)
break;
case IPMessageType::END_DYNAMIC_SUBMIT:
s = "END_DYNAMIC_SUBMIT";
break;
case IPMessageType::CONTINUE_DYNAMIC_SUBMIT:
s = "CONTINUE_DYNAMIC_SUBMIT";
}
return s;
......@@ -237,6 +240,9 @@ IPMessage::~IPMessage()
case IPMessageType::END_DYNAMIC_SUBMIT:
{
} break;
case IPMessageType::CONTINUE_DYNAMIC_SUBMIT:
{
} break;
}
data = nullptr;
......
......@@ -71,6 +71,7 @@ enum class IPMessageType
,SWITCHED_ON //!< SwitcherON -> Server. The switcherON process tells the server the machine pstate has been changed
,SWITCHED_OFF //!< SwitcherOFF -> Server. The switcherOFF process tells the server the machine pstate has been changed.
,END_DYNAMIC_SUBMIT //!< Scheduler -> Server. The scheduler tells the server that dynamic job submissions are finished.
,CONTINUE_DYNAMIC_SUBMIT //!< Scheduler -> Server. The scheduler tells the server that dynamic job submissions continue.
};
/**
......
......@@ -666,6 +666,10 @@ void JsonProtocolReader::handle_notify(int event_number,
{
send_message(timestamp, "server", IPMessageType::END_DYNAMIC_SUBMIT);
}
else if (notify_type == "continue_submission")
{
send_message(timestamp, "server", IPMessageType::CONTINUE_DYNAMIC_SUBMIT);
}
else
{
xbt_assert(false, "Unknown NOTIFY type received ('%s').", notify_type.c_str());
......
......@@ -66,6 +66,7 @@ int server_process(int argc, char *argv[])
handler_map[IPMessageType::SWITCHED_ON] = server_on_switched;
handler_map[IPMessageType::SWITCHED_OFF] = server_on_switched;
handler_map[IPMessageType::END_DYNAMIC_SUBMIT] = server_on_end_dynamic_submit;
handler_map[IPMessageType::CONTINUE_DYNAMIC_SUBMIT] = server_on_continue_dynamic_submit;
// Simulation loop
while ((data->nb_submitters == 0) ||// To enter the loop
......@@ -495,6 +496,15 @@ void server_on_end_dynamic_submit(ServerData * data,
check_submitted_and_completed(data);
}
void server_on_continue_dynamic_submit(ServerData * data,
IPMessage * task_data)
{
(void) task_data;
data->context->submission_sched_finished = false;
check_submitted_and_completed(data);
}
void server_on_submit_job(ServerData * data,
IPMessage * task_data)
{
......
......@@ -166,6 +166,15 @@ void server_on_end_dynamic_submit(ServerData * data,
IPMessage * task_data);
/**
* @brief Server CONTINUE_DYNAMIC_SUBMIT handler
* @param[in,out] data The data associated with the server_process
* @param[in,out] task_data The data associated with the message the server received
*/
void server_on_continue_dynamic_submit(ServerData * data,
IPMessage * task_data);
/**
* @brief Server JOB_SUBMITTED_BY_DP handler
* @param[in,out] data The data associated with the server_process
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment