X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/30d4658a4fe5933ee06cdc60f6910a9e3f01e831..5c8ede40c4f5e920bd12b2e4ede74db2892e0d60:/include/smpi/smpi_cocci.h diff --git a/include/smpi/smpi_cocci.h b/include/smpi/smpi_cocci.h index cc03928600..29daeec643 100644 --- a/include/smpi/smpi_cocci.h +++ b/include/smpi/smpi_cocci.h @@ -38,17 +38,6 @@ void __attribute__((weak,destructor)) __postfini_##name(void) { \ name = NULL; \ } -#define SMPI_GLOBAL_VAR_LOCAL_ACCESS(name) name[__rank()] - -/* This function stores the rank locally, so that a request in - SIMIX is not created each time */ -int __attribute__((weak)) __rank(void) { - static __thread int rank = -1; - - if(rank < 0) { - rank = smpi_global_rank(); - } - return rank; -} +#define SMPI_GLOBAL_VAR_LOCAL_ACCESS(name) name[smpi_process_index()] #endif