X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ea5d4ac6b57a3771a16f9a998179688088f8b96c..272ccad1b68b6d9c17069f3c934886925bb15b5d:/src/instr/instr_smpi.c diff --git a/src/instr/instr_smpi.c b/src/instr/instr_smpi.c index ea8d33be59..060f0a98c2 100644 --- a/src/instr/instr_smpi.c +++ b/src/instr/instr_smpi.c @@ -86,7 +86,7 @@ static char *TRACE_smpi_put_key(int src, int dst, char *key, int n) } //generate the key static unsigned long long counter = 0; - snprintf(key, n, "%d%d%lld", src, dst, counter++); + snprintf(key, n, "%d%d%llu", src, dst, counter++); //push it char *a = (char*)xbt_strdup(key); @@ -184,10 +184,7 @@ void TRACE_smpi_collective_in(int rank, int root, const char *operation) container_t container = PJ_container_get (str); type_t type = PJ_type_get ("MPI_STATE", container->type); const char *color = instr_find_color (operation); - val_t value = PJ_value_get (operation, type); - if (value == NULL){ - value = PJ_value_new (operation, color, type); - } + val_t value = PJ_value_get_or_new (operation, color, type); new_pajePushState (SIMIX_get_clock(), container, type, value); } @@ -213,10 +210,7 @@ void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation) container_t container = PJ_container_get (str); type_t type = PJ_type_get ("MPI_STATE", container->type); const char *color = instr_find_color (operation); - val_t value = PJ_value_get (operation, type); - if (value == NULL){ - value = PJ_value_new (operation, color, type); - } + val_t value = PJ_value_get_or_new (operation, color, type); new_pajePushState (SIMIX_get_clock(), container, type, value); }