1 /* Copyright (c) 2012-2014. The SimGrid Team.
2 * All rights reserved. */
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. */
7 #ifndef _SMPI_INTERFACE_H
8 #define _SMPI_INTERFACE_H
13 /** \brief MPI collective description
16 typedef struct mpi_coll_description {
18 const char *description;
20 } s_mpi_coll_description_t, *mpi_coll_description_t;
23 /** \ingroup MPI gather
24 * \brief The list of all available allgather collectives
26 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_gather_description[];
27 XBT_PUBLIC_DATA(int (*mpi_coll_gather_fun)
28 (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
31 /** \ingroup MPI allgather
32 * \brief The list of all available allgather collectives
34 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgather_description[];
35 XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun)
36 (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
39 /** \ingroup MPI allgather
40 * \brief The list of all available allgather collectives
42 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgatherv_description[];
43 XBT_PUBLIC_DATA(int (*mpi_coll_allgatherv_fun)
44 (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype,
48 /** \ingroup MPI allreduce
49 * \brief The list of all available allgather collectives
51 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allreduce_description[];
52 XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun)
53 (void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype,
54 MPI_Op op, MPI_Comm comm));
57 /** \ingroup MPI alltoall
58 * \brief The list of all available alltoall collectives
60 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoall_description[];
61 XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun)
62 (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
65 /** \ingroup MPI alltoallv
66 * \brief The list of all available alltoallv collectives
68 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoallv_description[];
69 XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun)
70 (void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype,
74 /** \ingroup MPI bcast
75 * \brief The list of all available bcast collectives
77 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_bcast_description[];
78 XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun)
79 (void *buf, int count, MPI_Datatype datatype, int root,
83 /** \ingroup MPI reduce
84 * \brief The list of all available reduce collectives
86 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_description[];
87 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun)
88 (void *buf, void *rbuf, int count, MPI_Datatype datatype,
89 MPI_Op op, int root, MPI_Comm comm));
91 /** \ingroup MPI reduce_scatter
92 * \brief The list of all available allgather collectives
94 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_scatter_description[];
95 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_scatter_fun)
96 (void *sbuf, void *rbuf, int *rcounts,
97 MPI_Datatype dtype, MPI_Op op,MPI_Comm comm));
99 /** \ingroup MPI scatter
100 * \brief The list of all available allgather collectives
102 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_scatter_description[];
103 XBT_PUBLIC_DATA(int (*mpi_coll_scatter_fun)
104 (void *sendbuf, int sendcount, MPI_Datatype sendtype,
105 void *recvbuf, int recvcount, MPI_Datatype recvtype,
106 int root, MPI_Comm comm));
108 /** \ingroup MPI barrier
109 * \brief The list of all available allgather collectives
111 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_barrier_description[];
112 XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)
116 XBT_PUBLIC(void) coll_help(const char *category,
117 s_mpi_coll_description_t * table);
118 XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table,
120 #endif /* _SMPI_INTERFAC_H */