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 typedef struct mpi_coll_description {
17 const char *description;
19 } s_mpi_coll_description_t, *mpi_coll_description_t;
21 /** \ingroup MPI gather
22 * \brief The list of all available allgather collectives
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));
27 /** \ingroup MPI allgather
28 * \brief The list of all available allgather collectives
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));
33 /** \ingroup MPI allgather
34 * \brief The list of all available allgather collectives
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));
39 /** \ingroup MPI allreduce
40 * \brief The list of all available allgather collectives
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,
46 /** \ingroup MPI alltoall
47 * \brief The list of all available alltoall collectives
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));
52 /** \ingroup MPI alltoallv
53 * \brief The list of all available alltoallv collectives
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,
59 /** \ingroup MPI bcast
60 * \brief The list of all available bcast collectives
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));
65 /** \ingroup MPI reduce
66 * \brief The list of all available reduce collectives
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));
72 /** \ingroup MPI reduce_scatter
73 * \brief The list of all available allgather collectives
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));
79 /** \ingroup MPI scatter
80 * \brief The list of all available allgather collectives
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));
86 /** \ingroup MPI barrier
87 * \brief The list of all available allgather collectives
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));
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);
95 extern XBT_PRIVATE double smpi_wtime_sleep;
96 extern XBT_PRIVATE double smpi_iprobe_sleep;
97 extern XBT_PRIVATE double smpi_test_sleep;
101 #endif /* _SMPI_INTERFAC_H */