X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/814080c31d915f2a87c28bd787bd8d9a413f51a3..0d17d68ef25921dbdfde20b85e0a1de773ca263e:/include/smpi/smpi.h diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index b12a551f09..dafc86da4c 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -13,7 +13,7 @@ #include #define MPI_CALL(type,name,args) \ - type name args; \ + type name args __attribute__((weak)); \ type P##name args SG_BEGIN_DECL() @@ -419,18 +419,18 @@ XBT_PUBLIC(void) smpi_exit(int); XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs); XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv, struct timezone *tz); XBT_PUBLIC(void) smpi_sample_1(int global, const char *file, int line, - int max); + int iters, double threshold); XBT_PUBLIC(int) smpi_sample_2(int global, const char *file, int line); XBT_PUBLIC(void) smpi_sample_3(int global, const char *file, int line); XBT_PUBLIC(void) smpi_sample_flops(double flops); -#define SMPI_SAMPLE_LOCAL(num) for(smpi_sample_1(0, __FILE__, __LINE__, num); \ - smpi_sample_2(0, __FILE__, __LINE__); \ - smpi_sample_3(0, __FILE__, __LINE__)) +#define SMPI_SAMPLE_LOCAL(iters,thres) for(smpi_sample_1(0, __FILE__, __LINE__, iters, thres); \ + smpi_sample_2(0, __FILE__, __LINE__); \ + smpi_sample_3(0, __FILE__, __LINE__)) -#define SMPI_SAMPLE_GLOBAL(num) for(smpi_sample_1(1, __FILE__, __LINE__, num); \ - smpi_sample_2(1, __FILE__, __LINE__); \ - smpi_sample_3(1, __FILE__, __LINE__)) +#define SMPI_SAMPLE_GLOBAL(iters,thres) for(smpi_sample_1(1, __FILE__, __LINE__, iters, thres); \ + smpi_sample_2(1, __FILE__, __LINE__); \ + smpi_sample_3(1, __FILE__, __LINE__)) #define SMPI_SAMPLE_DELAY(flops) for(smpi_sample_flops(flops); 0; ) @@ -444,5 +444,7 @@ XBT_PUBLIC(void) smpi_shared_free(void *data); /* Fortran specific stuff */ XBT_PUBLIC(int) MAIN__(void); +XBT_PUBLIC(int) smpi_process_index(void); + SG_END_DECL() #endif