Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
4f5686aef90af256944d060dc431f84504c1fe28
[simgrid.git] / src / include / smpi / smpi_interface.h
1 /* Copyright (c) 2012-2015. 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 _SMPI_INTERFACE_H
8 #define _SMPI_INTERFACE_H
9 #include "smpi/smpi.h"
10
11 SG_BEGIN_DECL()
12
13 /** \brief MPI collective description */
14
15 typedef struct mpi_coll_description {
16   const char *name;
17   const char *description;
18   void *coll;
19 } s_mpi_coll_description_t, *mpi_coll_description_t;
20
21 /** \ingroup MPI gather
22  *  \brief The list of all available allgather collectives
23  */
24 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_gather_description[];
25 XBT_PUBLIC_DATA(int (*mpi_coll_gather_fun)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, int, MPI_Comm));
26                  
27 /** \ingroup MPI allgather
28  *  \brief The list of all available allgather collectives
29  */
30 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgather_description[];
31 XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun) (void *, int, MPI_Datatype, void *, int, MPI_Datatype, 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) (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype, MPI_Comm));
38
39 /** \ingroup MPI allreduce
40  *  \brief The list of all available allgather collectives
41  */
42 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allreduce_description[];
43 XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun)(void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype,MPI_Op op,
44                 MPI_Comm comm));
45
46 /** \ingroup MPI alltoall
47  *  \brief The list of all available alltoall collectives
48  */
49 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoall_description[];
50 XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm));
51
52 /** \ingroup MPI alltoallv
53  *  \brief The list of all available alltoallv collectives
54  */
55 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoallv_description[];
56 XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun)(void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype,
57                 MPI_Comm));
58
59 /** \ingroup MPI bcast
60  *  \brief The list of all available bcast collectives
61  */
62 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_bcast_description[];
63 XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun)(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm com));
64
65 /** \ingroup MPI reduce
66  *  \brief The list of all available reduce collectives
67  */
68 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_description[];
69 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun)(void *buf, void *rbuf, int count, MPI_Datatype datatype,
70                 MPI_Op op, int root, MPI_Comm comm));
71
72 /** \ingroup MPI reduce_scatter
73  *  \brief The list of all available allgather collectives
74  */
75 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_scatter_description[];
76 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_scatter_fun) (void *sbuf, void *rbuf, int *rcounts,
77                  MPI_Datatype dtype, MPI_Op op,MPI_Comm comm));
78
79 /** \ingroup MPI scatter
80  *  \brief The list of all available allgather collectives
81  */
82 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_scatter_description[];
83 XBT_PUBLIC_DATA(int (*mpi_coll_scatter_fun)(void *sendbuf, int sendcount, MPI_Datatype sendtype,
84                 void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
85
86 /** \ingroup MPI barrier
87  *  \brief The list of all available allgather collectives
88  */
89 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_barrier_description[];
90 XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)(MPI_Comm comm));
91
92 XBT_PUBLIC(void) coll_help(const char *category, s_mpi_coll_description_t * table);
93 XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, char *name, const char *desc);
94
95 XBT_PUBLIC_DATA(void) (*smpi_coll_cleanup_callback)(void);
96 XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2(void);
97
98 SG_END_DECL()
99
100 #endif                          /* _SMPI_INTERFAC_H */