-void TRACE_smpi_computing_init(int rank)
-{
- //first use, initialize the color in the trace
- if (not TRACE_smpi_is_enabled() || not TRACE_smpi_is_computing())
- return;
-
- char str[INSTR_DEFAULT_STR_SIZE];
- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get(str);
- type_t type = PJ_type_get("MPI_STATE", container->type);
- const char* color = instr_find_color("computing");
- val_t value = s_val::PJ_value_get_or_new("computing", color, type);
- new PushStateEvent(SIMIX_get_clock(), container, type, value);
-}
-
-void TRACE_smpi_computing_in(int rank, instr_extra_data extra)
-{
- //do not forget to set the color first, otherwise this will explode
- if (not TRACE_smpi_is_enabled() || not TRACE_smpi_is_computing()) {
- cleanup_extra_data(extra);
- return;
- }
-
- char str[INSTR_DEFAULT_STR_SIZE];
- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
- val_t value = s_val::PJ_value_get_or_new ("computing", nullptr, type);
- new PushStateEvent (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
-}
-
-void TRACE_smpi_computing_out(int rank)
-{
- if (not TRACE_smpi_is_enabled() || not TRACE_smpi_is_computing())
- return;
- char str[INSTR_DEFAULT_STR_SIZE];
- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
- new PopStateEvent (SIMIX_get_clock(), container, type);
-}
-
-void TRACE_smpi_sleeping_init(int rank)
-{
- //first use, initialize the color in the trace
- if (not TRACE_smpi_is_enabled() || not TRACE_smpi_is_sleeping())
- return;
-
- char str[INSTR_DEFAULT_STR_SIZE];
- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
- const char *color = instr_find_color ("sleeping");
- val_t value = s_val::PJ_value_get_or_new ("sleeping", color, type);
- new PushStateEvent (SIMIX_get_clock(), container, type, value);
-}
-
-void TRACE_smpi_sleeping_in(int rank, instr_extra_data extra)
-{
- //do not forget to set the color first, otherwise this will explode
- if (not TRACE_smpi_is_enabled() || not TRACE_smpi_is_sleeping()) {
- cleanup_extra_data(extra);
- return;
- }
-
- char str[INSTR_DEFAULT_STR_SIZE];
- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
- val_t value = s_val::PJ_value_get_or_new ("sleeping", nullptr, type);
- new PushStateEvent (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
-}
-
-void TRACE_smpi_sleeping_out(int rank)
-{
- if (not TRACE_smpi_is_enabled() || not TRACE_smpi_is_sleeping())
- return;
- char str[INSTR_DEFAULT_STR_SIZE];
- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
- new PopStateEvent (SIMIX_get_clock(), container, type);
-}
-
-void TRACE_smpi_testing_in(int rank, instr_extra_data extra)
-{
- //do not forget to set the color first, otherwise this will explode
- if (not TRACE_smpi_is_enabled()) {
- cleanup_extra_data(extra);
- return;
- }
-
- char str[INSTR_DEFAULT_STR_SIZE];
- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
- val_t value = s_val::PJ_value_get_or_new ("test", nullptr, type);
- new PushStateEvent (SIMIX_get_clock(), container, type, value, static_cast<void*>(extra));
-}
-
-void TRACE_smpi_testing_out(int rank)
-{
- if (not TRACE_smpi_is_enabled())
- return;
- char str[INSTR_DEFAULT_STR_SIZE];
- smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
- container_t container = PJ_container_get (str);
- type_t type = PJ_type_get ("MPI_STATE", container->type);
- new PopStateEvent (SIMIX_get_clock(), container, type);
-}
-
-void TRACE_smpi_ptp_in(int rank, const char *operation, instr_extra_data extra)