Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge tag 'v3_9_90' into hypervisor
[simgrid.git] / include / smpi / smpif.h.in
1 /* Copyright (c) 2007-2013. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SMPIF_H
8 #define SMPIF_H
9
10 #cmakedefine SMPI_F2C @SMPI_F2C@
11
12 #ifdef SMPI_F2C
13
14 #include <xbt/misc.h>
15 #include <smpi/smpi.h>
16 #include <f2c.h>
17
18 XBT_PUBLIC_DATA(__thread int) smpi_current_rank;
19
20 XBT_PUBLIC(void) smpi_process_init(int *argc, char ***argv);
21 XBT_PUBLIC(int) smpi_process_argc(void);
22 XBT_PUBLIC(int) smpi_process_getarg(integer* index, char* dst, ftnlen len);
23 XBT_PUBLIC(int) smpi_global_size(void);
24
25 #define smpi_sample_local__(pi,pt) \
26    { \
27       if(smpi_sample_1(0, __FILE__, __LINE__, *pi, *pt)) { \
28          smpi_sample_3(0, __FILE__, __LINE__); \
29       } \
30       if(!smpi_sample_2(0, __FILE__, __LINE__)) { \
31          continue; \
32       } \
33    }
34
35 #define smpi_sample_global__(pi,pt) \
36    { \
37       if(smpi_sample_1(1, __FILE__, __LINE__, *pi, *pt)) { \
38          smpi_sample_3(1, __FILE__, __LINE__); \
39       } \
40       if(!smpi_sample_2(1, __FILE__, __LINE__)) { \
41          continue; \
42       } \
43    }
44
45
46 #endif
47
48 #endif // SMPI_F2C