1 /* Copyright (c) 2012-2015. 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 */
15 struct mpi_coll_description {
17 const char *description;
20 typedef struct mpi_coll_description s_mpi_coll_description_t;
21 typedef struct mpi_coll_description* 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)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, int, MPI_Comm));
29 /** \ingroup MPI allgather
30 * \brief The list of all available allgather collectives
32 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgather_description[];
33 XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun) (void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm));
35 /** \ingroup MPI allgather
36 * \brief The list of all available allgather collectives
38 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgatherv_description[];
39 XBT_PUBLIC_DATA(int (*mpi_coll_allgatherv_fun) (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype, MPI_Comm));
41 /** \ingroup MPI allreduce
42 * \brief The list of all available allgather collectives
44 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allreduce_description[];
45 XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun)(void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype,MPI_Op op,
48 /** \ingroup MPI alltoall
49 * \brief The list of all available alltoall collectives
51 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoall_description[];
52 XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm));
54 /** \ingroup MPI alltoallv
55 * \brief The list of all available alltoallv collectives
57 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoallv_description[];
58 XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun)(void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype,
61 /** \ingroup MPI bcast
62 * \brief The list of all available bcast collectives
64 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_bcast_description[];
65 XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun)(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm com));
67 /** \ingroup MPI reduce
68 * \brief The list of all available reduce collectives
70 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_description[];
71 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun)(void *buf, void *rbuf, int count, MPI_Datatype datatype,
72 MPI_Op op, int root, MPI_Comm comm));
74 /** \ingroup MPI reduce_scatter
75 * \brief The list of all available allgather collectives
77 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_scatter_description[];
78 XBT_PUBLIC_DATA(int (*mpi_coll_reduce_scatter_fun) (void *sbuf, void *rbuf, int *rcounts,
79 MPI_Datatype dtype, MPI_Op op,MPI_Comm comm));
81 /** \ingroup MPI scatter
82 * \brief The list of all available allgather collectives
84 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_scatter_description[];
85 XBT_PUBLIC_DATA(int (*mpi_coll_scatter_fun)(void *sendbuf, int sendcount, MPI_Datatype sendtype,
86 void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
88 /** \ingroup MPI barrier
89 * \brief The list of all available allgather collectives
91 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_barrier_description[];
92 XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)(MPI_Comm comm));
94 XBT_PUBLIC(void) coll_help(const char *category, s_mpi_coll_description_t * table);
95 XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, char *name, const char *desc);
97 XBT_PUBLIC_DATA(void) (*smpi_coll_cleanup_callback)(void);
98 XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2(void);
102 #endif /* _SMPI_INTERFAC_H */