X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fa639bf413129dbedfa57a6856c9522460870e43..0ef47f951954678fed8c57bb97ab52147eee52f4:/src/smpi/internals/smpi_global.cpp diff --git a/src/smpi/internals/smpi_global.cpp b/src/smpi/internals/smpi_global.cpp index 1dbef70751..f4347e5902 100644 --- a/src/smpi/internals/smpi_global.cpp +++ b/src/smpi/internals/smpi_global.cpp @@ -585,17 +585,17 @@ static void smpi_init_privatization_dlopen(std::string executable) }; } -static void smpi_init_privatization_no_dlopen(const char* executable) +static void smpi_init_privatization_no_dlopen(std::string executable) { if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP) smpi_prepare_global_memory_segment(); // Load the dynamic library and resolve the entry point: - void* handle = dlopen(executable, RTLD_LAZY | RTLD_LOCAL); + void* handle = dlopen(executable.c_str(), RTLD_LAZY | RTLD_LOCAL); if (handle == nullptr) - xbt_die("dlopen failed for %s: %s (errno: %d -- %s)", executable, dlerror(), errno, strerror(errno)); + xbt_die("dlopen failed for %s: %s (errno: %d -- %s)", executable.c_str(), dlerror(), errno, strerror(errno)); smpi_entry_point_type entry_point = smpi_resolve_function(handle); if (not entry_point) - xbt_die("main not found in %s", executable); + xbt_die("main not found in %s", executable.c_str()); if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP) smpi_backup_global_memory_segment(); @@ -618,7 +618,7 @@ int smpi_main(const char* executable, int argc, char* argv[]) TRACE_global_init(); SIMIX_global_init(&argc, argv); - MSG_init(&argc, argv); + MSG_init(&argc, argv); // FIXME Remove this MSG call. Once it's removed, we can remove the msg header include as well SMPI_switch_data_segment = &smpi_switch_data_segment;