A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a global variable to cache the rank of currently running process.
[simgrid.git]
/
src
/
smpi
/
smpi_bench.c
diff --git
a/src/smpi/smpi_bench.c
b/src/smpi/smpi_bench.c
index
8c81580
..
6dcff87
100644
(file)
--- a/
src/smpi/smpi_bench.c
+++ b/
src/smpi/smpi_bench.c
@@
-14,6
+14,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 allocs = NULL; /* Allocated on first use */
xbt_dict_t samples = NULL; /* Allocated on first use */
+int smpi_current_rank = 0; /* Updated after each MPI call */
typedef struct {
int count;
typedef struct {
int count;
@@
-68,6
+69,7
@@
static void smpi_execute(double duration)
void smpi_bench_begin(void)
{
xbt_os_timer_start(smpi_process_timer());
void smpi_bench_begin(void)
{
xbt_os_timer_start(smpi_process_timer());
+ smpi_current_rank = smpi_process_index();
}
void smpi_bench_end(void)
}
void smpi_bench_end(void)