#include "private.h"
#include "smpi_mpi_dt_private.h"
#include "mc/mc.h"
+#include "xbt/replay.h"
#include "simgrid/modelchecker.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi_dt, smpi,
count = sendcount < recvcount ? sendcount : recvcount;
if(sendtype->has_subtype == 0 && recvtype->has_subtype == 0) {
- memcpy(recvbuf, sendbuf, count);
+ if(!_xbt_replay_is_active()) memcpy(recvbuf, sendbuf, count);
}
else if (sendtype->has_subtype == 0)
{
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);
}