X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5c8ede40c4f5e920bd12b2e4ede74db2892e0d60..2f810149832a2d855c33d0df5b02d736c2081e41:/include/smpi/smpif.h.in diff --git a/include/smpi/smpif.h.in b/include/smpi/smpif.h.in index 890712bff7..bbcb661ac1 100644 --- a/include/smpi/smpif.h.in +++ b/include/smpi/smpif.h.in @@ -17,8 +17,31 @@ #include #include +XBT_PUBLIC_DATA(__thread int) smpi_current_rank; + XBT_PUBLIC(int) smpi_process_argc(void); XBT_PUBLIC(int) smpi_process_getarg(integer* index, char* dst, ftnlen len); XBT_PUBLIC(int) smpi_global_size(void); +#define smpi_sample_local__(pi,pt) \ + { \ + if(smpi_sample_1(0, __FILE__, __LINE__, *pi, *pt)) { \ + smpi_sample_3(0, __FILE__, __LINE__); \ + } \ + if(!smpi_sample_2(0, __FILE__, __LINE__)) { \ + continue; \ + } \ + } + +#define smpi_sample_global__(pi,pt) \ + { \ + if(smpi_sample_1(1, __FILE__, __LINE__, *pi, *pt)) { \ + smpi_sample_3(1, __FILE__, __LINE__); \ + } \ + if(!smpi_sample_2(1, __FILE__, __LINE__)) { \ + continue; \ + } \ + } + + #endif