Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 8d45fc1f authored by Clement Mommessin's avatar Clement Mommessin
Browse files

[code] Create dynamic workload during handling of first profile registration

parent e8bc3903
......@@ -1370,7 +1370,7 @@ void JsonProtocolReader::handle_register_job(int event_number,
message->job_description = context->storage.get(job_key);
// FIXME: All this initialization should be done in the server
// FIXME: All this initialization should be done in the server?
// Create the job into memory now (so that following events at the same timestamp can refer to this job).
// But first, create the workload if needed.
Workload * workload = nullptr;
......@@ -572,7 +572,7 @@ void server_on_register_job(ServerData * data,
"Dynamically registered job '%s' has no profile: "
"Workload '%s' has no profile named '%s'. "
"When registering a dynamic job, its profile should already exist "
"When registering a dynamic job, its profile should already exist. "
"If the profile is also dynamic, it can be registered with the REGISTER_PROFILE "
"message but you must ensure that the profile is sent (non-strictly) before "
"the REGISTER_JOB message.",
......@@ -609,13 +609,22 @@ void server_on_register_profile(ServerData * data,
ProfileRegisteredByDPMessage * message = (ProfileRegisteredByDPMessage *) task_data->data;
(void) message;
// Retrieve the workload, or create if it does not exist yet
Workload * workload = nullptr;
if (data->context->workloads.exists(message->workload_name))
workload = data->context->workloads.at(message->workload_name);
workload = Workload::new_dynamic_workload(message->workload_name);
data->context->workloads.insert_workload(workload->name, workload);
XBT_DEBUG("New dynamically registered profile %s to workload %s",
// Does nothing.
// Just here to keep the usual time increases from protocol reader to orchestrator.
Workload * workload = data->context->workloads.at(message->workload_name);
if (!workload->profiles->exists(message->profile_name))
XBT_INFO("Adding dynamically registered profile %s to workload %s",
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