Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MSG: add a function to register a task copy callback
[simgrid.git] / include / smpi / smpif.h.in
1 /* Copyright (c) 2007, 2008, 2009, 2010. 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 HAVE_F2C_H @HAVE_SMPI_F2C_H@
11
12 #ifndef HAVE_F2C_H
13 #error F2C is mandatory
14 #endif
15
16 #include <xbt/misc.h>
17 #include <smpi/smpi.h>
18 #include <f2c.h>
19
20 XBT_PUBLIC_DATA(__thread int) smpi_current_rank;
21
22 XBT_PUBLIC(int) smpi_process_argc(void);
23 XBT_PUBLIC(int) smpi_process_getarg(integer* index, char* dst, ftnlen len);
24 XBT_PUBLIC(int) smpi_global_size(void);
25
26 #define smpi_sample_local__(pi,pt) \
27    { \
28       if(smpi_sample_1(0, __FILE__, __LINE__, *pi, *pt)) { \
29          smpi_sample_3(0, __FILE__, __LINE__); \
30       } \
31       if(!smpi_sample_2(0, __FILE__, __LINE__)) { \
32          continue; \
33       } \
34    }
35
36 #define smpi_sample_global__(pi,pt) \
37    { \
38       if(smpi_sample_1(1, __FILE__, __LINE__, *pi, *pt)) { \
39          smpi_sample_3(1, __FILE__, __LINE__); \
40       } \
41       if(!smpi_sample_2(1, __FILE__, __LINE__)) { \
42          continue; \
43       } \
44    }
45
46
47 #endif