Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / include / smpi / smpi_interface.h
1 #ifndef _SMPI_INTERFACE_H
2 #define _SMPI_INTERFACE_H
3 #include "smpi/smpi.h"
4
5 /********** Tracing **********/
6 /* from smpi_instr.c */
7 void TRACE_smpi_alloc(void);
8 void TRACE_smpi_release(void);
9 void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation, int size);
10 void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation);
11 void TRACE_smpi_send(int rank, int src, int dst, int size);
12 void TRACE_smpi_recv(int rank, int src, int dst);
13 void TRACE_smpi_init(int rank);
14 void TRACE_smpi_finalize(int rank);
15
16 /** \brief MPI collective description
17  */
18
19 typedef struct mpi_coll_description {
20   const char *name;
21   const char *description;
22   void *coll;
23 } s_mpi_coll_description_t, *mpi_coll_description_t;
24
25
26 /** \ingroup MPI gather
27  *  \brief The list of all available allgather collectives
28  */
29 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_gather_description[];
30 XBT_PUBLIC_DATA(int (*mpi_coll_gather_fun)
31                 (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
32                  int, MPI_Comm));
33                  
34 /** \ingroup MPI allgather
35  *  \brief The list of all available allgather collectives
36  */
37 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgather_description[];
38 XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun)
39                 (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
40                  MPI_Comm));
41
42 /** \ingroup MPI allgather
43  *  \brief The list of all available allgather collectives
44  */
45 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgatherv_description[];
46 XBT_PUBLIC_DATA(int (*mpi_coll_allgatherv_fun)
47                 (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype,
48                  MPI_Comm));
49
50
51 /** \ingroup MPI allreduce
52  *  \brief The list of all available allgather collectives
53  */
54 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allreduce_description[];
55 XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun)
56                 (void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype,
57                  MPI_Op op, MPI_Comm comm));
58
59
60 /** \ingroup MPI alltoall
61  *  \brief The list of all available alltoall collectives
62  */
63 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoall_description[];
64 XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun)
65                 (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
66                  MPI_Comm));
67
68 /** \ingroup MPI alltoallv
69  *  \brief The list of all available alltoallv collectives
70  */
71 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoallv_description[];
72 XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun)
73                 (void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype,
74                  MPI_Comm));
75
76
77 /** \ingroup MPI bcast
78  *  \brief The list of all available bcast collectives
79  */
80 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_bcast_description[];
81 XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun)
82                 (void *buf, int count, MPI_Datatype datatype, int root,
83                  MPI_Comm com));
84
85
86 /** \ingroup MPI reduce
87  *  \brief The list of all available reduce collectives
88  */
89 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_description[];
90 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun)
91                 (void *buf, void *rbuf, int count, MPI_Datatype datatype,
92                  MPI_Op op, int root, MPI_Comm comm));
93
94 /** \ingroup MPI reduce_scatter
95  *  \brief The list of all available allgather collectives
96  */
97 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_scatter_description[];
98 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_scatter_fun)
99                 (void *sbuf, void *rbuf, int *rcounts,
100                  MPI_Datatype dtype, MPI_Op op,MPI_Comm comm));
101
102 /** \ingroup MPI scatter
103  *  \brief The list of all available allgather collectives
104  */
105 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_scatter_description[];
106 XBT_PUBLIC_DATA(int (*mpi_coll_scatter_fun)
107                 (void *sendbuf, int sendcount, MPI_Datatype sendtype,
108                 void *recvbuf, int recvcount, MPI_Datatype recvtype,
109                 int root, MPI_Comm comm));
110
111 /** \ingroup MPI barrier
112  *  \brief The list of all available allgather collectives
113  */
114 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_barrier_description[];
115 XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)
116                 (MPI_Comm comm));
117
118
119 XBT_PUBLIC(void) coll_help(const char *category,
120                            s_mpi_coll_description_t * table);
121 XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table,
122                                       char *name);
123 #endif                          /* _SMPI_INTERFAC_H */