X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6fd166d6132c999bfa781b58a5372c7cbdfe36b2..77b1286ea2fbc5c4dd502da81961599504f01000:/src/smpi/smpi_op.cpp diff --git a/src/smpi/smpi_op.cpp b/src/smpi/smpi_op.cpp index 8251f94263..5ef10681d2 100644 --- a/src/smpi/smpi_op.cpp +++ b/src/smpi/smpi_op.cpp @@ -188,6 +188,10 @@ static void replace_func(void *a, void *b, int *length, MPI_Datatype * datatype) memcpy(b, a, *length * (*datatype)->size()); } +static void no_func(void *a, void *b, int *length, MPI_Datatype * datatype) +{ +} + #define CREATE_MPI_OP(name, func) \ static SMPI_Op mpi_##name (&(func) /* func */, true ); \ MPI_Op name = &mpi_##name; @@ -205,6 +209,7 @@ CREATE_MPI_OP(MPI_BXOR, bxor_func); CREATE_MPI_OP(MPI_MAXLOC, maxloc_func); CREATE_MPI_OP(MPI_MINLOC, minloc_func); CREATE_MPI_OP(MPI_REPLACE, replace_func); +CREATE_MPI_OP(MPI_NO_OP, no_func); namespace simgrid{ namespace smpi{ @@ -234,13 +239,14 @@ void Op::apply(void *invec, void *inoutvec, int *len, MPI_Datatype datatype) { if(smpi_privatize_global_variables){//we need to switch as the called function may silently touch global variables XBT_DEBUG("Applying operation, switch to the right data frame "); - smpi_switch_data_segment(smpi_process_index()); + smpi_switch_data_segment(smpi_process()->index()); } - if(!smpi_process_get_replaying()){ + if(!smpi_process()->replaying()){ if(! is_fortran_op_) this->func_(invec, inoutvec, len, &datatype); else{ + XBT_DEBUG("Applying operation of length %d from %p and from/to %p", *len, invec, inoutvec); int tmp = datatype->c2f(); /* Unfortunately, the C and Fortran version of the MPI standard do not agree on the type here, thus the reinterpret_cast. */