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 164ea6fa authored by MERCIER Michael's avatar MERCIER Michael
Browse files

Merge branch 'master' of gitlab.inria.fr:batsim/batsim

parents 6233e505 a2484a82
Pipeline #16232 failed with stages
in 21 minutes and 38 seconds
......@@ -559,7 +559,7 @@ Machine::~Machine()
bool Machine::has_role(Permissions role) const
{
return (role | this->permissions) == role;
return (role & this->permissions) == role;
}
bool Machine::has_pstate(int pstate) const
......
......@@ -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,
xbt_die(
"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);
}
else
{
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",
message->profile_name.c_str(),
message->workload_name.c_str());
// 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