Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more informative msg when the dlopen of mmap priv fails
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 20 Apr 2017 22:34:58 +0000 (00:34 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 20 Apr 2017 22:35:02 +0000 (00:35 +0200)
as it appears to be the case on freebsd

src/smpi/smpi_global.cpp

index 9b6cb53..ff7c129 100644 (file)
@@ -617,7 +617,7 @@ int smpi_main(const char* executable, int argc, char *argv[])
     // Load the dynamic library and resolve the entry point:
     void* handle = dlopen(executable, RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
     if (handle == nullptr)
-      xbt_die("dlopen failed for %s", executable);
+      xbt_die("dlopen failed for %s: %s (errno: %d -- %s)", executable, dlerror(), errno, strerror(errno));
     smpi_entry_point_type entry_point = smpi_resolve_function(handle);
     if (!entry_point)
       xbt_die("main not found in %s", executable);