Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
d1726182a4598faa06c9a17c72c4c9864002e2a3
[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);
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);
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 /** \ingroup MPI allgather
26  *  \brief The list of all available allgather collectives
27  */
28 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgather_description[];
29 XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun)
30                 (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
31                  MPI_Comm));
32
33 /** \ingroup MPI allgather
34  *  \brief The list of all available allgather collectives
35  */
36 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgatherv_description[];
37 XBT_PUBLIC_DATA(int (*mpi_coll_allgatherv_fun)
38                 (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype,
39                  MPI_Comm));
40
41
42 /** \ingroup MPI allreduce
43  *  \brief The list of all available allgather collectives
44  */
45 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allreduce_description[];
46 XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun)
47                 (void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype,
48                  MPI_Op op, MPI_Comm comm));
49
50
51 /** \ingroup MPI alltoall
52  *  \brief The list of all available alltoall collectives
53  */
54 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoall_description[];
55 XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun)
56                 (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
57                  MPI_Comm));
58
59 /** \ingroup MPI alltoallv
60  *  \brief The list of all available alltoallv collectives
61  */
62 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoallv_description[];
63 XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun)
64                 (void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype,
65                  MPI_Comm));
66
67
68 /** \ingroup MPI bcast
69  *  \brief The list of all available bcast collectives
70  */
71 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_bcast_description[];
72 XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun)
73                 (void *buf, int count, MPI_Datatype datatype, int root,
74                  MPI_Comm com));
75
76
77 /** \ingroup MPI reduce
78  *  \brief The list of all available reduce collectives
79  */
80 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_description[];
81 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun)
82                 (void *buf, void *rbuf, int count, MPI_Datatype datatype,
83                  MPI_Op op, int root, MPI_Comm comm));
84
85
86 XBT_PUBLIC(void) coll_help(const char *category,
87                            s_mpi_coll_description_t * table);
88 XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table,
89                                       const char *name);
90
91
92 #endif                          /* _SMPI_INTERFAC_H */