* under the terms of the license (GNU LGPL) which comes with this package. */
#include "private.h"
+#include "simgrid/sg_config.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi,
"Logging specific to SMPI (mpi)");
int MPI_Init(int *argc, char ***argv)
{
+ int allgather_id = find_coll_description(mpi_coll_allgather_description,
+ sg_cfg_get_string("smpi/allgather"));
+ mpi_coll_allgather_fun = (int (*)(void *, int, MPI_Datatype,
+ void*, int, MPI_Datatype, MPI_Comm))
+ mpi_coll_allgather_description[allgather_id].coll;
+
+ int allreduce_id = find_coll_description(mpi_coll_allreduce_description,
+ sg_cfg_get_string("smpi/allreduce"));
+ mpi_coll_allreduce_fun = (int (*)(void *sbuf, void *rbuf, int rcount, \
+ MPI_Datatype dtype, MPI_Op op, MPI_Comm comm))
+ mpi_coll_allreduce_description[allreduce_id].coll;
+
+ int alltoall_id = find_coll_description(mpi_coll_alltoall_description,
+ sg_cfg_get_string("smpi/alltoall"));
+ mpi_coll_alltoall_fun = (int (*)(void *, int, MPI_Datatype,
+ void*, int, MPI_Datatype, MPI_Comm))
+ mpi_coll_alltoall_description[alltoall_id].coll;
+
+ int bcast_id = find_coll_description(mpi_coll_bcast_description,
+ sg_cfg_get_string("smpi/bcast"));
+ mpi_coll_bcast_fun = (int (*)(void *buf, int count, MPI_Datatype datatype, \
+ int root, MPI_Comm com))
+ mpi_coll_bcast_description[bcast_id].coll;
+
+ int reduce_id = find_coll_description(mpi_coll_reduce_description,
+ sg_cfg_get_string("smpi/reduce"));
+ mpi_coll_reduce_fun = (int (*)(void *buf, void *rbuf, int count, MPI_Datatype datatype, \
+ MPI_Op op, int root, MPI_Comm comm))
+ mpi_coll_reduce_description[reduce_id].coll;
+
return PMPI_Init(argc, argv);
}
return PMPI_Wtime();
}
+double MPI_Wtick(void)
+{
+ return PMPI_Wtick();
+}
+
int MPI_Address(void *location, MPI_Aint * address)
{
return PMPI_Address(location, address);
return PMPI_Type_free(datatype);
}
+int MPI_Pcontrol(const int level )
+{
+ return PMPI_Pcontrol(level);
+}
+
int MPI_Type_size(MPI_Datatype datatype, int *size)
{
return PMPI_Type_size(datatype, size);
return PMPI_Comm_size(comm, size);
}
+int MPI_Comm_get_attr (MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag)
+{
+ return PMPI_Comm_get_attr (comm, comm_keyval, attribute_val, flag);
+}
+
int MPI_Comm_get_name (MPI_Comm comm, char* name, int* len)
{
return PMPI_Comm_get_name(comm, name, len);
return PMPI_Comm_free(comm);
}
+int MPI_Comm_disconnect(MPI_Comm * comm)
+{
+ return PMPI_Comm_disconnect(comm);
+}
+
int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm* comm_out)
{
return PMPI_Comm_split(comm, color, key, comm_out);