Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI] Add errno and strerror to SMPI memory error msg
authorChristian Heinrich <franz-christian.heinrich@inria.fr>
Wed, 26 Apr 2017 11:27:56 +0000 (13:27 +0200)
committerChristian Heinrich <franz-christian.heinrich@inria.fr>
Tue, 2 May 2017 09:11:42 +0000 (11:11 +0200)
src/smpi/smpi_memory.cpp

index f21f5dc..8091464 100644 (file)
@@ -101,7 +101,7 @@ void smpi_really_switch_data_segment(int dest)
   void* tmp =
       mmap(TOPAGE(smpi_start_data_exe), smpi_size_data_exe, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, current, 0);
   if (tmp != TOPAGE(smpi_start_data_exe))
-    xbt_die("Couldn't map the new region");
+    xbt_die("Couldn't map the new region (errno %d): %s", errno, strerror(errno));
   smpi_loaded_page = dest;
 #endif
 }