X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7c18a530be4246d48938e74026e61713d8bbdea0..8138044ce3ba946c574a0c3f9e7b7f61e52beb6e:/src/smpi/smpi_bench.c diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index e531e85913..b9d6366c8d 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -16,6 +16,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_bench, smpi, xbt_dict_t allocs = NULL; /* Allocated on first use */ xbt_dict_t samples = NULL; /* Allocated on first use */ xbt_dict_t calls = NULL; /* Allocated on first use */ +__thread int smpi_current_rank = 0; /* Updated after each MPI call */ typedef struct { int count; @@ -73,6 +74,7 @@ static void smpi_execute(double duration) void smpi_bench_begin(void) { xbt_os_timer_start(smpi_process_timer()); + smpi_current_rank = smpi_process_index(); } void smpi_bench_end(void)