X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2807fde4fd1f59c230d69a934634c5dfb77905f2..f685334597e6b8bcdfe353d69be908914eed4dd6:/src/smpi/internals/smpi_memory.cpp diff --git a/src/smpi/internals/smpi_memory.cpp b/src/smpi/internals/smpi_memory.cpp index 8719bd57a5..3556def61b 100644 --- a/src/smpi/internals/smpi_memory.cpp +++ b/src/smpi/internals/smpi_memory.cpp @@ -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(dest); + simgrid::smpi::Process* process = smpi_process_remote(simgrid::s4u::Actor::byPid(dest+1)); int current = process->privatized_region()->file_descriptor; XBT_DEBUG("Switching data frame to the one of process %d", dest); void* tmp = @@ -134,8 +134,11 @@ int smpi_is_privatization_file(char* file) return buffer_path.compare(0, std::string::npos, file, buffer_path.length()) == 0; } -// TODO: cheinrich: The behavior changed; this now only makes a backup of the -// data segment. I think the function should be renamed. +/** + * @brief Makes a backup of the segment in memory that stores the global variables of a process. + * This backup is then used to initialize the global variables for every single + * process that is added, regardless of the progress of the simulation. + */ void smpi_backup_global_memory_segment() { #if HAVE_PRIVATIZATION