Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / include / smpi / smpi_interface.h
index 0030870..e2ea5c5 100644 (file)
@@ -1,20 +1,16 @@
+/* Copyright (c) 2012-2015. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #ifndef _SMPI_INTERFACE_H
 #define _SMPI_INTERFACE_H
 #include "smpi/smpi.h"
 
-/********** Tracing **********/
-/* from smpi_instr.c */
-void TRACE_smpi_alloc(void);
-void TRACE_smpi_release(void);
-void TRACE_smpi_ptp_in(int rank, int src, int dst, const char *operation, int size);
-void TRACE_smpi_ptp_out(int rank, int src, int dst, const char *operation);
-void TRACE_smpi_send(int rank, int src, int dst, int size);
-void TRACE_smpi_recv(int rank, int src, int dst);
-void TRACE_smpi_init(int rank);
-void TRACE_smpi_finalize(int rank);
-
-/** \brief MPI collective description
- */
+SG_BEGIN_DECL()
+
+/** \brief MPI collective description */
 
 typedef struct mpi_coll_description {
   const char *name;
@@ -22,102 +18,84 @@ typedef struct mpi_coll_description {
   void *coll;
 } s_mpi_coll_description_t, *mpi_coll_description_t;
 
-
 /** \ingroup MPI gather
  *  \brief The list of all available allgather collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_gather_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_gather_fun)
-                (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
-                 int, MPI_Comm));
+XBT_PUBLIC_DATA(int (*mpi_coll_gather_fun)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, int, MPI_Comm));
                  
 /** \ingroup MPI allgather
  *  \brief The list of all available allgather collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgather_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun)
-                (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
-                 MPI_Comm));
+XBT_PUBLIC_DATA(int (*mpi_coll_allgather_fun) (void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm));
 
 /** \ingroup MPI allgather
  *  \brief The list of all available allgather collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allgatherv_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_allgatherv_fun)
-                (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype,
-                 MPI_Comm));
-
+XBT_PUBLIC_DATA(int (*mpi_coll_allgatherv_fun) (void *, int, MPI_Datatype, void *, int*, int*, MPI_Datatype, MPI_Comm));
 
 /** \ingroup MPI allreduce
  *  \brief The list of all available allgather collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_allreduce_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun)
-                (void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype,
-                 MPI_Op op, MPI_Comm comm));
-
+XBT_PUBLIC_DATA(int (*mpi_coll_allreduce_fun)(void *sbuf, void *rbuf, int rcount, MPI_Datatype dtype,MPI_Op op,
+                MPI_Comm comm));
 
 /** \ingroup MPI alltoall
  *  \brief The list of all available alltoall collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoall_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun)
-                (void *, int, MPI_Datatype, void *, int, MPI_Datatype,
-                 MPI_Comm));
+XBT_PUBLIC_DATA(int (*mpi_coll_alltoall_fun)(void *, int, MPI_Datatype, void *, int, MPI_Datatype, MPI_Comm));
 
 /** \ingroup MPI alltoallv
  *  \brief The list of all available alltoallv collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_alltoallv_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun)
-                (void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype,
-                 MPI_Comm));
-
+XBT_PUBLIC_DATA(int (*mpi_coll_alltoallv_fun)(void *, int*, int*, MPI_Datatype, void *, int*, int*, MPI_Datatype,
+                MPI_Comm));
 
 /** \ingroup MPI bcast
  *  \brief The list of all available bcast collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_bcast_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun)
-                (void *buf, int count, MPI_Datatype datatype, int root,
-                 MPI_Comm com));
-
+XBT_PUBLIC_DATA(int (*mpi_coll_bcast_fun)(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm com));
 
 /** \ingroup MPI reduce
  *  \brief The list of all available reduce collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun)
-                (void *buf, void *rbuf, int count, MPI_Datatype datatype,
-                 MPI_Op op, int root, MPI_Comm comm));
+XBT_PUBLIC_DATA(int (*mpi_coll_reduce_fun)(void *buf, void *rbuf, int count, MPI_Datatype datatype,
+                MPI_Op op, int root, MPI_Comm comm));
 
 /** \ingroup MPI reduce_scatter
  *  \brief The list of all available allgather collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_reduce_scatter_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_reduce_scatter_fun)
-                (void *sbuf, void *rbuf, int *rcounts,
+XBT_PUBLIC_DATA(int (*mpi_coll_reduce_scatter_fun) (void *sbuf, void *rbuf, int *rcounts,
                  MPI_Datatype dtype, MPI_Op op,MPI_Comm comm));
 
 /** \ingroup MPI scatter
  *  \brief The list of all available allgather collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_scatter_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_scatter_fun)
-                (void *sendbuf, int sendcount, MPI_Datatype sendtype,
-                void *recvbuf, int recvcount, MPI_Datatype recvtype,
-                int root, MPI_Comm comm));
+XBT_PUBLIC_DATA(int (*mpi_coll_scatter_fun)(void *sendbuf, int sendcount, MPI_Datatype sendtype,
+                void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm));
 
 /** \ingroup MPI barrier
  *  \brief The list of all available allgather collectives
  */
 XBT_PUBLIC_DATA(s_mpi_coll_description_t) mpi_coll_barrier_description[];
-XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)
-                (MPI_Comm comm));
+XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)(MPI_Comm comm));
+
+XBT_PUBLIC(void) coll_help(const char *category, s_mpi_coll_description_t * table);
+XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, char *name, const char *desc);
+
+extern XBT_PRIVATE double smpi_wtime_sleep;
+extern XBT_PRIVATE double smpi_iprobe_sleep;
+extern XBT_PRIVATE double smpi_test_sleep;
 
+SG_END_DECL()
 
-XBT_PUBLIC(void) coll_help(const char *category,
-                           s_mpi_coll_description_t * table);
-XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table,
-                                      char *name);
 #endif                          /* _SMPI_INTERFAC_H */