Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Fix mmap bug
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 15 Mar 2018 09:49:58 +0000 (10:49 +0100)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Thu, 15 Mar 2018 09:50:35 +0000 (10:50 +0100)
The wrong actor was used (the +1 was from the transition to the
pid-based approach) and that one wasn't initialized yet

src/smpi/internals/smpi_memory.cpp

index 3556def..a6ca132 100644 (file)
@@ -117,7 +117,7 @@ void smpi_really_switch_data_segment(int dest)
 
 #if HAVE_PRIVATIZATION
   // FIXME, cross-process support (mmap across process when necessary)
-  simgrid::smpi::Process* process = smpi_process_remote(simgrid::s4u::Actor::byPid(dest+1));
+  simgrid::smpi::Process* process = smpi_process_remote(simgrid::s4u::Actor::byPid(dest));
   int current                     = process->privatized_region()->file_descriptor;
   XBT_DEBUG("Switching data frame to the one of process %d", dest);
   void* tmp =