Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
boot_processes_ vector becomes actors_at_boot_ map
[simgrid.git] / src / msg / msg_gos.cpp
index b7429cb..84d1c06 100644 (file)
@@ -65,12 +65,14 @@ msg_error_t MSG_parallel_task_execute_with_timeout(msg_task_t task, double timeo
               task->name ?: "", simdata->host_nb, simdata->host_list, simdata->flops_parallel_amount,
               simdata->bytes_parallel_amount, -1.0, timeout));
       XBT_DEBUG("Parallel execution action created: %p", simdata->compute.get());
+      if (task->category != nullptr)
+        simcall_set_category(simdata->compute, task->category);
     } else {
       simdata->compute = boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(
-          simcall_execution_start(task->name ?: "", simdata->flops_amount, simdata->priority, simdata->bound,
-                                  MSG_process_get_host(MSG_process_self())));
+          simcall_execution_start(task->name ?: "", task->category ?: "", simdata->flops_amount, simdata->priority,
+                                  simdata->bound, MSG_process_get_host(MSG_process_self())));
     }
-    simcall_set_category(simdata->compute, task->category);
+
     comp_state = simcall_execution_wait(simdata->compute);
 
     simdata->setNotUsed();
@@ -792,7 +794,7 @@ msg_error_t MSG_task_send_with_timeout(msg_task_t task, const char *alias, doubl
     smx_activity_t comm = nullptr; /* MC needs the comm to be set to nullptr during the simix call  */
     comm = simcall_comm_isend(SIMIX_process_self(), mailbox->get_impl(), t_simdata->bytes_amount, t_simdata->rate, task,
                               sizeof(void*), nullptr, nullptr, nullptr, nullptr, 0);
-    if (TRACE_is_enabled())
+    if (TRACE_is_enabled() && task->category != nullptr)
       simcall_set_category(comm, task->category);
     t_simdata->comm = boost::static_pointer_cast<simgrid::kernel::activity::CommImpl>(comm);
     simcall_comm_wait(comm, timeout);