X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1847d1441271d076b3de449c8853031ea208ce8f..172a73b13fe909117c7fbf3d69d4ce5e87efdbc6:/src/smpi/mpi/smpi_request.cpp diff --git a/src/smpi/mpi/smpi_request.cpp b/src/smpi/mpi/smpi_request.cpp index 4f57f6d864..10a6da27aa 100644 --- a/src/smpi/mpi/smpi_request.cpp +++ b/src/smpi/mpi/smpi_request.cpp @@ -9,7 +9,6 @@ #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" @@ -32,7 +31,8 @@ extern void (*smpi_comm_copy_data_callback) (smx_activity_t, void*, size_t); 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. @@ -401,9 +401,8 @@ void Request::start() 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(buf_) >= smpi_start_data_exe) - && (static_cast(buf_) < smpi_start_data_exe + smpi_size_data_exe )){ + if ((smpi_privatize_global_variables != 0) && (static_cast(buf_) >= smpi_data_exe_start) && + (static_cast(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_); } @@ -508,8 +507,8 @@ int Request::test(MPI_Request * request, MPI_Status * status) { if (flag) { finish_wait(request,status); nsleeps=1;//reset the number of sleeps we will do next time - if (*request != MPI_REQUEST_NULL && ((*request)->flags_ & PERSISTENT)==0) - *request = MPI_REQUEST_NULL; + if (*request != MPI_REQUEST_NULL && ((*request)->flags_ & PERSISTENT) == 0) + *request = MPI_REQUEST_NULL; } else if (xbt_cfg_get_boolean("smpi/grow-injected-times")){ nsleeps++; } @@ -694,10 +693,10 @@ void Request::finish_wait(MPI_Request* request, MPI_Status * status) (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(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(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()); } } @@ -885,7 +884,7 @@ int Request::waitsome(int incount, MPI_Request requests[], int *indices, MPI_Sta status[index] = *pstat; } if (requests[index] != MPI_REQUEST_NULL && (requests[index]->flags_ & NON_PERSISTENT)) - requests[index]=MPI_REQUEST_NULL; + requests[index] = MPI_REQUEST_NULL; }else{ return MPI_UNDEFINED; }