Dirty, as this will call smpi_init_options twice, so add a return for the second call.
xbt_dict_t samples = nullptr; /* Allocated on first use */
-double smpi_cpu_threshold;
+double smpi_cpu_threshold = -1;
double smpi_host_speed;
shared_malloc_type smpi_cfg_shared_malloc = shmalloc_global;
}
static void smpi_init_options(){
-
+ //return if already called
+ if(smpi_cpu_threshold!=-1)
+ return;
simgrid::smpi::Colls::set_collectives();
simgrid::smpi::Colls::smpi_coll_cleanup_callback=nullptr;
smpi_cpu_threshold = xbt_cfg_get_double("smpi/cpu-threshold");
static std::size_t rank = 0;
+ smpi_init_options();
+
if (smpi_privatize_global_variables == SMPI_PRIVATIZE_DLOPEN) {
std::string executable_copy = executable;