Logo AND Algorithmique Numérique Distribuée

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