1 /* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved. */
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. */
6 #ifndef SMPI_INTERFACE_H
7 #define SMPI_INTERFACE_H
12 /** \brief MPI collective description */
14 struct mpi_coll_description {
16 const char *description;
19 typedef struct mpi_coll_description s_mpi_coll_description_t;
20 typedef struct mpi_coll_description* mpi_coll_description_t;
22 /** \ingroup MPI gather
23 * \brief The list of all available allgather collectives
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));
28 /** \ingroup MPI allgather
29 * \brief The list of all available allgather collectives
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));
34 /** \ingroup MPI allgather
35 * \brief The list of all available allgather collectives
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));
40 /** \ingroup MPI allreduce
41 * \brief The list of all available allgather collectives
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,
47 /** \ingroup MPI alltoall
48 * \brief The list of all available alltoall collectives
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));
53 /** \ingroup MPI alltoallv
54 * \brief The list of all available alltoallv collectives
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,
60 /** \ingroup MPI bcast
61 * \brief The list of all available bcast collectives
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));
66 /** \ingroup MPI reduce
67 * \brief The list of all available reduce collectives
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));
73 /** \ingroup MPI reduce_scatter
74 * \brief The list of all available allgather collectives
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));
80 /** \ingroup MPI scatter
81 * \brief The list of all available allgather collectives
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));
87 /** \ingroup MPI barrier
88 * \brief The list of all available allgather collectives
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));
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);
96 XBT_PUBLIC_DATA(void) (*smpi_coll_cleanup_callback)();
97 XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2(void);
101 #endif /* SMPI_INTERFACE_H */