Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Remove sg_platf_bypass{,AS}Route_cb
[simgrid.git] / src / include / smpi / smpi_interface.h
1 /* Copyright (c) 2012-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #ifndef _SMPI_INTERFACE_H
8 #define _SMPI_INTERFACE_H
9 #include "smpi/smpi.h"
10
11
12
13 /** \brief MPI collective description
14  */
15
16 typedef struct mpi_coll_description {
17   const char *name;
18   const char *description;
19   void *coll;
20 } s_mpi_coll_description_t, *mpi_coll_description_t;
21
22
23 /** \ingroup MPI gather
24  *  \brief The list of all available allgather collectives
25  */
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,
29                  int, MPI_Comm));
30                  
31 /** \ingroup MPI allgather
32  *  \brief The list of all available allgather collectives
33  */
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,
37                  MPI_Comm));
38
39 /** \ingroup MPI allgather
40  *  \brief The list of all available allgather collectives
41  */
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,
45                  MPI_Comm));
46
47
48 /** \ingroup MPI allreduce
49  *  \brief The list of all available allgather collectives
50  */
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));
55
56
57 /** \ingroup MPI alltoall
58  *  \brief The list of all available alltoall collectives
59  */
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,
63                  MPI_Comm));
64
65 /** \ingroup MPI alltoallv
66  *  \brief The list of all available alltoallv collectives
67  */
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,
71                  MPI_Comm));
72
73
74 /** \ingroup MPI bcast
75  *  \brief The list of all available bcast collectives
76  */
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,
80                  MPI_Comm com));
81
82
83 /** \ingroup MPI reduce
84  *  \brief The list of all available reduce collectives
85  */
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));
90
91 /** \ingroup MPI reduce_scatter
92  *  \brief The list of all available allgather collectives
93  */
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));
98
99 /** \ingroup MPI scatter
100  *  \brief The list of all available allgather collectives
101  */
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));
107
108 /** \ingroup MPI barrier
109  *  \brief The list of all available allgather collectives
110  */
111 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_barrier_description[];
112 XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)
113                 (MPI_Comm comm));
114
115
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,
119                                       char *name, const char *desc);
120
121
122 extern XBT_PRIVATE double smpi_wtime_sleep;
123 extern XBT_PRIVATE double smpi_iprobe_sleep;
124 extern XBT_PRIVATE double smpi_test_sleep;
125
126 #endif                          /* _SMPI_INTERFAC_H */