X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/45c3f1cfee86fb48c96d53f8267f99b6db6e3d7a..546b5bb1d5ca203fc0c212124bedc9b4673b6f50:/src/smpi/smpi_mpi_dt.c diff --git a/src/smpi/smpi_mpi_dt.c b/src/smpi/smpi_mpi_dt.c index 8be8134291..ee348b8eb9 100644 --- a/src/smpi/smpi_mpi_dt.c +++ b/src/smpi/smpi_mpi_dt.c @@ -1489,6 +1489,11 @@ void smpi_op_destroy(MPI_Op op) void smpi_op_apply(MPI_Op op, void *invec, void *inoutvec, int *len, MPI_Datatype * datatype) { + if(smpi_privatize_global_variables){ //we need to switch here, as the called function may silently touch global variables + XBT_VERB("Applying operation, switch to the right data frame "); + switch_data_segment(smpi_process_index()); + } + if(!_xbt_replay_is_active()) op->func(invec, inoutvec, len, datatype); }