MPI_CALL(XBT_PUBLIC(int), MPI_Testall, (int count, MPI_Request* requests, int* flag, MPI_Status* statuses));
MPI_CALL(XBT_PUBLIC(int), MPI_Op_create, (MPI_User_function * function, int commute, MPI_Op * op));
MPI_CALL(XBT_PUBLIC(int), MPI_Op_free, (MPI_Op * op));
+MPI_CALL(XBT_PUBLIC(int), MPI_Op_commutative, (MPI_Op op, int *commute));
MPI_CALL(XBT_PUBLIC(int), MPI_Group_free, (MPI_Group * group));
MPI_CALL(XBT_PUBLIC(int), MPI_Group_size, (MPI_Group group, int *size));
WRAPPED_PMPI_CALL(int,MPI_Keyval_free,(int* keyval) ,(keyval))
WRAPPED_PMPI_CALL(int,MPI_Op_create,(MPI_User_function * function, int commute, MPI_Op * op),(function, commute, op))
WRAPPED_PMPI_CALL(int,MPI_Op_free,(MPI_Op * op),(op))
+WRAPPED_PMPI_CALL(int,MPI_Op_commutative,(MPI_Op op, int *commute), (op, commute))
WRAPPED_PMPI_CALL(int,MPI_Pack_size,(int incount, MPI_Datatype datatype, MPI_Comm comm, int* size) ,(incount, datatype, comm, size))
WRAPPED_PMPI_CALL(int,MPI_Pack,(void* inbuf, int incount, MPI_Datatype type, void* outbuf, int outcount, int* position, MPI_Comm comm) ,(inbuf, incount, type, outbuf, outcount, position, comm))
WRAPPED_PMPI_CALL(int,MPI_Probe,(int source, int tag, MPI_Comm comm, MPI_Status* status) ,(source, tag, comm, status))
}
}
+int PMPI_Op_commutative(MPI_Op op, int* commute){
+ if (op == MPI_OP_NULL) {
+ return MPI_ERR_OP;
+ } else if (commute==nullptr){
+ return MPI_ERR_ARG;
+ } else {
+ *commute = op->is_commutative();
+ return MPI_SUCCESS;
+ }
+}
+
int PMPI_Group_free(MPI_Group * group)
{
if (group == nullptr) {
# add_executable(opband opband.c)
# add_executable(opbor opbor.c)
# add_executable(opbxor opbxor.c)
-# add_executable(op_commutative op_commutative.c)
+ add_executable(op_commutative op_commutative.c)
# add_executable(opland opland.c)
# add_executable(oplor oplor.c)
# add_executable(oplxor oplxor.c)
# target_link_libraries(opband simgrid mtest_c)
# target_link_libraries(opbor simgrid mtest_c)
# target_link_libraries(opbxor simgrid mtest_c)
-# target_link_libraries(op_commutative simgrid mtest_c)
+ target_link_libraries(op_commutative simgrid mtest_c)
# target_link_libraries(opland simgrid mtest_c)
# target_link_libraries(oplor simgrid mtest_c)
# target_link_libraries(oplxor simgrid mtest_c)
reduce_mpich 5
reduce_mpich 10
reduce_local 2 mpiversion=2.2
-#op_commutative 2
+op_commutative 2
red3 10
red4 10
alltoall1 8