-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "smpi_host.hpp"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/activity/CommImpl.hpp"
+#include "src/mc/mc_replay.hpp"
#include "src/smpi/include/smpi_actor.hpp"
#include "xbt/config.hpp"
#include "xbt/file.hpp"
/* nothing done in this version */
}
-int smpi_enabled() {
- return MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED;
-}
-
static void smpi_init_papi()
{
#if HAVE_PAPI
stat(executable.c_str(), &fdin_stat);
off_t fdin_size = fdin_stat.st_size;
- std::string libnames = simgrid::config::get_value<std::string>("smpi/privatize-libs");
- if (not libnames.empty()) {
+ if (std::string libnames = simgrid::config::get_value<std::string>("smpi/privatize-libs"); not libnames.empty()) {
// split option
std::vector<std::string> privatize_libs;
boost::split(privatize_libs, libnames, boost::is_any_of(";"));
return smpi_exit_status;
}
+int SMPI_is_inited()
+{
+ return MPI_COMM_WORLD != MPI_COMM_UNINITIALIZED;
+}
+
// Called either directly from the user code, or from the code called by smpirun
void SMPI_init(){
smpi_init_options_internal(false);
smpi_init_fortran_types();
if(_smpi_init_sleep > 0)
simgrid::s4u::this_actor::sleep_for(_smpi_init_sleep);
- if (not MC_is_active()) {
+ if (not MC_is_active() && not MC_record_replay_is_active()) {
smpi_deployment_startup_barrier(smpi_process()->get_instance_id());
}
}