X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0a5b9684ee8e2485eb3ca07bffa2b3e618f9c229..0e9c0448c6566825b170b98ecff716b098bda10e:/include/smpi/smpif.h.in diff --git a/include/smpi/smpif.h.in b/include/smpi/smpif.h.in index 6f3ccb876c..37b80e8718 100644 --- a/include/smpi/smpif.h.in +++ b/include/smpi/smpif.h.in @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2007-2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -7,18 +7,42 @@ #ifndef SMPIF_H #define SMPIF_H -#cmakedefine HAVE_F2C_H @HAVE_SMPI_F2C_H@ +#cmakedefine SMPI_F2C @SMPI_F2C@ -#ifndef HAVE_F2C_H -#error F2C is mandatory -#endif +#ifdef SMPI_F2C #include +#include #include +XBT_PUBLIC_DATA(__thread int) smpi_current_rank; + +XBT_PUBLIC(void) smpi_process_init(int *argc, char ***argv); XBT_PUBLIC(int) smpi_process_argc(void); XBT_PUBLIC(int) smpi_process_getarg(integer* index, char* dst, ftnlen len); -XBT_PUBLIC(int) smpi_global_rank(void); 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 + +#endif // SMPI_F2C