It was wrongly removed in commit
6a046487fb Make smpi_switch_data_segment check if a switch is needed, and return true when it occurs.
XBT_PUBLIC MPI_Info smpi_process_info_env();
XBT_PUBLIC void* smpi_process_get_user_data();
XBT_PUBLIC void smpi_process_set_user_data(void*);
+XBT_PUBLIC void smpi_init_options();
XBT_PUBLIC void smpi_execute_flops(double flops);
XBT_PUBLIC void smpi_execute_flops_benched(double flops);
xbt_assert(not simix_global->has_context_factory());
#if HAVE_SMPI && (defined(__APPLE__) || defined(__NetBSD__))
- smpi_init_options();
+ smpi_init_options_internal(false);
std::string priv = simgrid::config::get_value<std::string>("smpi/privatization");
if (context_factory_name == "thread" && (priv == "dlopen" || priv == "yes" || priv == "default" || priv == "1")) {
XBT_WARN("dlopen+thread broken on Apple and BSD. Switching to raw contexts.");
#endif
#if HAVE_SMPI && defined(__FreeBSD__)
- smpi_init_options();
+ smpi_init_options_internal(false);
if (context_factory_name == "thread" && simgrid::config::get_value<std::string>("smpi/privatization") != "no") {
XBT_WARN("mmap broken on FreeBSD, but dlopen+thread broken too. Switching to dlopen+raw contexts.");
context_factory_name = "raw";
XBT_PRIVATE bool smpi_cfg_display_alloc();
// utilities
-XBT_PUBLIC void smpi_init_options(bool called_by_smpimain = false);
+XBT_PRIVATE void smpi_init_options_internal(bool called_by_smpimain);
extern XBT_PRIVATE char* smpi_data_exe_start; // start of the data+bss segment of the executable
extern XBT_PRIVATE size_t smpi_data_exe_size; // size of the data+bss segment of the executable
return _smpi_cfg_auto_shared_malloc_thresh;
}
-void smpi_init_options(bool called_by_smpimain)
+// public version declared in smpi.h (without parameter, and with C linkage)
+void smpi_init_options()
+{
+ smpi_init_options_internal(false);
+}
+
+void smpi_init_options_internal(bool called_by_smpimain)
{
// return if already called
if(_smpi_options_initialized)
return 0;
}
- smpi_init_options(true);
+ smpi_init_options_internal(true);
simgrid::instr::init();
SIMIX_global_init(&argc, argv);
// Called either directly from the user code, or from the code called by smpirun
void SMPI_init(){
- smpi_init_options();
+ smpi_init_options_internal(false);
simgrid::s4u::Actor::on_creation.connect([](simgrid::s4u::Actor& actor) {
if (not actor.is_daemon())
actor.extension_set<simgrid::smpi::ActorExt>(new simgrid::smpi::ActorExt(&actor));