From cf6eca29ed0c04dd6f2e5d1efdac635c64006ff1 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 20 Apr 2017 14:35:52 +0200 Subject: [PATCH] be more verbose when dlopen fails --- src/smpi/smpi_global.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/smpi/smpi_global.cpp b/src/smpi/smpi_global.cpp index 5910e15e82..3ba9c79794 100644 --- a/src/smpi/smpi_global.cpp +++ b/src/smpi/smpi_global.cpp @@ -463,7 +463,7 @@ static void smpi_init_options(){ smpi_privatize_global_variables = SMPI_PRIVATIZE_NONE; else - xbt_die("Invalid value for smpi/privatization: %s", smpi_privatize_option); + xbt_die("Invalid value for smpi/privatization: '%s'", smpi_privatize_option); if (smpi_cpu_threshold < 0) smpi_cpu_threshold = DBL_MAX; @@ -603,7 +603,7 @@ int smpi_main(const char* executable, int argc, char *argv[]) void* handle = dlopen(target_executable.c_str(), RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND); unlink(target_executable.c_str()); if (handle == nullptr) - xbt_die("dlopen failed"); + xbt_die(bprintf("dlopen failed. Errno: %d (%s)", errno, strerror(errno))); smpi_entry_point_type entry_point = smpi_resolve_function(handle); if (!entry_point) xbt_die("Could not resolve entry point"); -- 2.20.1