}
int smpi_process_index(){
- return simgrid::s4u::this_actor::getPid();
+ return simgrid::s4u::this_actor::get_pid();
}
void * smpi_process_get_user_data(){
};
}
else {
+ 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);
if (handle == nullptr)
smpi_entry_point_type entry_point = smpi_resolve_function(handle);
if (not entry_point)
xbt_die("main not found in %s", executable);
- // TODO, register the executable for SMPI privatization
+ if (smpi_privatize_global_variables == SmpiPrivStrategies::Mmap)
+ smpi_backup_global_memory_segment();
// Execute the same entry point for each simulated process:
simix_global->default_function = [entry_point](std::vector<std::string> args) {
smpi_check_options();
TRACE_smpi_alloc();
simgrid::s4u::onSimulationEnd.connect(TRACE_smpi_release);
- if (smpi_privatize_global_variables == SmpiPrivStrategies::Mmap)
- smpi_backup_global_memory_segment();
}
void SMPI_finalize(){