#include "src/kernel/activity/CommImpl.hpp"
#include "src/mc/mc_replay.h"
#include "SmpiHost.hpp"
-#include "private.h"
#include "private.hpp"
#include "smpi_comm.hpp"
#include "smpi_datatype.hpp"
namespace simgrid{
namespace smpi{
-Request::Request(void *buf, int count, MPI_Datatype datatype, int src, int dst, int tag, MPI_Comm comm, unsigned flags) : buf_(buf), old_type_(datatype), src_(src), dst_(dst), tag_(tag), comm_(comm), flags_(flags)
+Request::Request(void* buf, int count, MPI_Datatype datatype, int src, int dst, int tag, MPI_Comm comm, unsigned flags)
+ : buf_(buf), old_type_(datatype), src_(src), dst_(dst), tag_(tag), comm_(comm), flags_(flags)
{
void *old_buf = nullptr;
// FIXME Handle the case of a partial shared malloc.
if (not(old_type_->flags() & DT_FLAG_DERIVED)) {
oldbuf = buf_;
if (not process->replaying() && oldbuf != nullptr && size_ != 0) {
- if((smpi_privatize_global_variables != 0)
- && (static_cast<char*>(buf_) >= smpi_start_data_exe)
- && (static_cast<char*>(buf_) < smpi_start_data_exe + smpi_size_data_exe )){
+ if ((smpi_privatize_global_variables != 0) && (static_cast<char*>(buf_) >= smpi_data_exe_start) &&
+ (static_cast<char*>(buf_) < smpi_data_exe_start + smpi_data_exe_size)) {
XBT_DEBUG("Privatization : We are sending from a zone inside global memory. Switch data segment ");
smpi_switch_data_segment(src_);
}
(datatype->flags() & DT_FLAG_DERIVED)) { // && (not smpi_is_shared(req->old_buf_))){
if (not smpi_process()->replaying()) {
- if( smpi_privatize_global_variables != 0 && (static_cast<char*>(req->old_buf_) >= smpi_start_data_exe)
- && ((char*)req->old_buf_ < smpi_start_data_exe + smpi_size_data_exe )){
- XBT_VERB("Privatization : We are unserializing to a zone in global memory Switch data segment ");
- smpi_switch_data_segment(smpi_process()->index());
+ if (smpi_privatize_global_variables != 0 && (static_cast<char*>(req->old_buf_) >= smpi_data_exe_start) &&
+ ((char*)req->old_buf_ < smpi_data_exe_start + smpi_data_exe_size)) {
+ XBT_VERB("Privatization : We are unserializing to a zone in global memory Switch data segment ");
+ smpi_switch_data_segment(smpi_process()->index());
}
}