XBT_LOG_NEW_DEFAULT_CATEGORY(java, "MSG for Java(TM)");
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
JavaContextFactory::JavaContextFactory() : ContextFactory()
{
simgrid::ForcefulKillException::do_throw(); // clean RAII variables with the dedicated exception
}
-}}} // namespace simgrid::kernel::context
+} // namespace simgrid::kernel::context
#include "jmsg.hpp"
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
class JavaContext;
class JavacontextFactory;
XBT_PRIVATE ContextFactory* java_factory();
XBT_PRIVATE void java_main_jprocess(jobject process);
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#endif /* SIMGRID_JAVA_JAVA_CONTEXT_HPP */
run_jprocess(env, context->jprocess_);
}
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
/** Run the Java org.simgrid.msg.Process */
void java_main_jprocess(jobject jprocess)
run_jprocess(env, context->jprocess_);
}
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
static YY_BUFFER_STATE input_buffer;
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
static std::vector<ActivityPtr> result;
static std::map<std::string, ExecPtr, std::less<>> jobs;
"Please install graphviz, graphviz-dev, and libgraphviz-dev (and erase CMakeCache.txt) before recompiling.");
}
#endif
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
void STag_dax__adag()
{
XBT_LOG_EXTERNAL_CATEGORY(xbt_parmap);
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
/** @addtogroup XBT_parmap
* @ingroup XBT_misc
}
/** @} */
-}
-}
+} // namespace simgrid::xbt
#endif
" within the same Autonomous System (AS).");
}
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
static bool trace_active = false;
TraceFormat trace_format = TraceFormat::Paje;
int trace_precision;
s4u::Engine::on_deadlock_cb(on_simulation_end);
s4u::Engine::on_simulation_end_cb(on_simulation_end);
}
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
instr_user_variable(time, link->get_cname(), variable, "LINK", value, what, "", &user_link_variables);
}
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
/* for host variables */
/** @brief Declare a new user variable associated to hosts.
*
return created_categories;
}
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
static xbt_dynar_t instr_set_to_dynar(const std::set<std::string, std::less<>>& filter) // XBT_ATTRIB_DEPRECATED_v334
{
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_containers, instr, "Paje tracing event system (containers)");
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
Container* Container::root_container_ = nullptr; /* the root container */
std::map<std::string, Container*, std::less<>> Container::all_containers_; /* all created containers indexed by name */
on_creation(*this);
}
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
#include "src/instr/instr_private.hpp"
#include <string>
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
class Type;
class LinkType;
class StateType;
public:
HostContainer(s4u::Host const& host, NetZoneContainer* parent);
};
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_events, instr, "Paje tracing event system (events)");
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
PajeEvent::PajeEvent(Container* container, Type* type, double timestamp, PajeEventType eventType)
: container_(container), type_(type), timestamp_(timestamp), eventType_(eventType)
THROW_IMPOSSIBLE;
}
}
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
#include <sstream>
#include <string>
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
class EntityValue;
class TIData;
}
void print() override;
};
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
#endif
#include "xbt/virtu.h" /* xbt::cmdline */
extern std::ofstream tracing_file;
-namespace simgrid {
-namespace instr {
-namespace paje {
+namespace simgrid::instr::paje {
void dump_generator_version()
{
tracing_file << "% Value string" << std::endl;
tracing_file << "%EndEventDef" << std::endl;
}
-} // namespace paje
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr::paje
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_paje_trace, instr, "tracing event system");
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
static std::vector<PajeEvent*> buffer;
double last_timestamp_to_dump = 0;
buffer.insert(i.base(), this);
}
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_types, instr, "Paje tracing event system (types)");
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
long long int new_paje_id()
{
} else
return static_cast<LinkType*>(it->second.get());
}
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
#include <string>
#include <vector>
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
class ContainerType;
class EventType;
void pop_event();
void pop_event(TIData* extra);
};
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
#endif
#include "src/instr/instr_private.hpp"
#include <string>
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
class EntityValue {
long long int id_ = new_paje_id();
std::string get_color() const { return color_; }
Type* get_parent() const { return parent_; }
};
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
#endif
recursiveNewValueForUserStateType(type_name, value, color, simgrid::instr::Container::get_root()->get_type());
}
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
/** @brief Creates a file with the topology of the platform file used for the simulator.
*
[](s4u::Host const& host) { Container::by_name(host.get_name())->remove_from_parent(); });
}
}
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
#include <sstream>
#include <string>
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
namespace paje {
void dump_generator_version();
}
std::string display_size() override { return "NA"; }
};
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
XBT_PRIVATE std::string instr_pid(simgrid::s4u::Actor const& proc);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_resource, instr, "tracing (un)-categorized resource utilization");
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
void resource_set_utilization(const char* type, const char* name, const char* resource, const std::string& category,
double value, double now, double delta)
{
container->get_variable(name)->instr_event(now, delta, resource, value);
}
}
-} // namespace instr
-} // namespace simgrid
+} // namespace simgrid::instr
XBT_LOG_NEW_DEFAULT_CATEGORY(ker_engine, "Logging specific to Engine (kernel)");
-namespace simgrid {
-namespace kernel {
+namespace simgrid::kernel {
double EngineImpl::now_ = 0.0;
EngineImpl* EngineImpl::instance_ = nullptr; /* That singleton is awful too. */
(std::string("Possible values: ") + contexts_list()).c_str(),
context_factories.begin()->first);
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel
XBT_ATTRIB_NORETURN static void inthandler(int)
{
#endif /* _WIN32 */
-namespace simgrid {
-namespace kernel {
+namespace simgrid::kernel {
EngineImpl::~EngineImpl()
{
{
return now_;
}
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel
#include <unordered_map>
#include <vector>
-namespace simgrid {
-namespace kernel {
+namespace simgrid::kernel {
class EngineImpl {
std::unordered_map<std::string, routing::NetPoint*> netpoints_;
static double get_clock();
};
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_activity, kernel, "Kernel activity-related synchronization");
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
ActivityImpl::~ActivityImpl()
{
delete activity;
}
}
-}
-}
-} // namespace simgrid::kernel::activity::
+} // namespace simgrid::kernel::activity
#include <simgrid/kernel/resource/Action.hpp>
#include <simgrid/simix.hpp>
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
XBT_DECLARE_ENUM_CLASS(State, WAITING, READY, RUNNING, DONE, CANCELED, FAILED, SRC_HOST_FAILURE, DST_HOST_FAILURE,
TIMEOUT, SRC_TIMEOUT, DST_TIMEOUT, LINK_FAILURE);
const std::string& get_tracing_category() const { return tracing_category_; }
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif /* SIMGRID_KERNEL_ACTIVITY_ACTIVITYIMPL_HPP */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_barrier, ker_synchro, "Barrier kernel-space implementation");
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
/* -------- Acquisition -------- */
bool BarrierAcquisitionImpl::test(actor::ActorImpl*)
return res;
}
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include "src/kernel/actor/ActorImpl.hpp"
#include "src/kernel/actor/SynchroObserver.hpp"
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
/** Barrier Acquisition: the act / process of acquiring the barrier.
*
* This is the asynchronous activity associated to Barriers. See the doc of MutexImpl for more details on the rationnal.
return xbt::string_printf("Barrier %u: %zu of %u", id_, ongoing_acquisitions_.size(), expected_actors_);
}
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif
simgrid::s4u::Comm::copy_pointer_callback(comm, buff, buff_size);
}
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
xbt::signal<void(CommImpl const&)> CommImpl::on_start;
xbt::signal<void(CommImpl const&)> CommImpl::on_completion;
}
}
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include "src/kernel/actor/ActorImpl.hpp"
#include "src/kernel/actor/CommObserver.hpp"
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
enum class CommImplType { SEND, RECEIVE };
static xbt::signal<void(CommImpl const&)> on_start;
static xbt::signal<void(CommImpl const&)> on_completion;
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif
/********************************* Condition **********************************/
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
/**
* @brief Signalizes a condition.
delete cond;
}
}
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include "src/kernel/actor/ActorImpl.hpp"
#include <boost/intrusive/list.hpp>
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
class XBT_PUBLIC ConditionVariableImpl {
MutexImpl* mutex_ = nullptr;
void signal();
void wait(MutexImpl* mutex, double timeout, actor::ActorImpl* issuer);
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_cpu, kernel, "Kernel cpu-related synchronization");
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
ExecImpl::ExecImpl()
{
*************/
xbt::signal<void(ExecImpl const&, s4u::Host*)> ExecImpl::on_migration;
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include "src/kernel/activity/ActivityImpl.hpp"
#include "src/kernel/context/Context.hpp"
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
class XBT_PUBLIC ExecImpl : public ActivityImpl_T<ExecImpl> {
std::unique_ptr<resource::Action, std::function<void(resource::Action*)>> timeout_detector_{
static xbt::signal<void(ExecImpl const&, s4u::Host*)> on_migration;
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_io, kernel, "Kernel io-related synchronization");
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
IoImpl::IoImpl()
{
}
}
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include "src/kernel/activity/ActivityImpl.hpp"
#include <simgrid/s4u/Io.hpp>
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
class XBT_PUBLIC IoImpl : public ActivityImpl_T<IoImpl> {
resource::DiskImpl* disk_ = nullptr;
void set_exception(actor::ActorImpl* issuer) override;
void finish() override;
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif
/* Rendez-Vous Points */
/******************************************************************************/
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
unsigned MailboxImpl::next_id_ = 0;
comm_queue.erase(iter);
return comm_cpy;
}
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include "src/kernel/activity/CommImpl.hpp"
#include "src/kernel/actor/ActorImpl.hpp"
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
/** @brief Implementation of the s4u::Mailbox */
bool has_some_done_comm() const { return not done_comm_queue_.empty(); }
CommImplPtr done_front() const { return done_comm_queue_.front(); }
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_mutex, ker_synchro, "Mutex kernel-space implementation");
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
/* -------- Acquisition -------- */
XBT_OUT();
}
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include "src/kernel/actor/ActorImpl.hpp"
#include <boost/intrusive/list.hpp>
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
/** Mutex Acquisition: the act / process of acquiring the mutex.
*
s4u::Mutex& mutex() { return piface_; }
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_semaphore, ker_synchro, "Semaphore kernel-space implementation");
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
/* -------- Acquisition -------- */
}
}
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include "src/kernel/actor/ActorImpl.hpp"
#include "src/kernel/actor/SynchroObserver.hpp"
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
/** Semaphore Acquisition: the act / process of acquiring the semaphore.
*
unsigned get_id() const { return id_; }
s4u::Semaphore& sem() { return piface_; }
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif /* SIMGRID_KERNEL_ACTIVITY_SEMAPHOREIMPL_HPP */
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_actor);
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
SleepImpl& SleepImpl::set_host(s4u::Host* host)
{
}
}
}
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include "src/kernel/activity/ActivityImpl.hpp"
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
class XBT_PUBLIC SleepImpl : public ActivityImpl_T<SleepImpl> {
sg_host_t host_ = nullptr;
void finish() override;
SleepImpl* start();
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_synchro, kernel,
"Kernel synchronization activity (lock/acquire on a mutex, semaphore or condition)");
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
SynchroImpl& SynchroImpl::set_host(s4u::Host* host)
{
simcall->issuer_->simcall_answer();
}
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#include <functional>
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
/** Used to implement mutexes, semaphores and conditions */
class XBT_PUBLIC SynchroImpl : public ActivityImpl_T<SynchroImpl> {
void set_exception(actor::ActorImpl* issuer) override;
void finish() override;
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif
return simgrid::kernel::actor::ActorImpl::self();
}
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
/*------------------------- [ ActorIDTrait ] -------------------------*/
unsigned long ActorIDTrait::maxpid_ = 0;
engine->set_maestro(maestro);
}
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
/* needs to be public and without simcall because it is called by exceptions and logging events */
const char* SIMIX_process_self_get_name() // XBT_ATTRIB_DEPRECATED_v333
#include <map>
#include <memory>
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
class ProcessArg;
/*------------------------- [ ActorIDTrait ] -------------------------*/
XBT_PUBLIC void create_maestro(const std::function<void()>& code);
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(obs_comm, mc_observer, "Logging specific to the Communication simcalls observation");
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
ActivityTestanySimcall::ActivityTestanySimcall(ActorImpl* actor, const std::vector<activity::ActivityImpl*>& activities)
: ResultingSimcall(actor, -1), activities_(activities)
XBT_DEBUG("RecvObserver comm:%p mbox:%u buff:%p tag:%d", comm_, mbox_->get_id(), dst_buff_, tag_);
}
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#include <string>
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
class ActivityTestSimcall final : public ResultingSimcall<bool> {
activity::ActivityImpl* const activity_;
auto const& get_copy_data_fun() const { return copy_data_fun_; }
};
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_simcall, kernel, "transmuting from user request into kernel handlers");
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
/** @private
* @brief (in kernel mode) unpack the simcall and activate the handler
}
}
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#include "xbt/utility.hpp"
/********************************* Simcalls *********************************/
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
/**
* @brief Represents a simcall to the kernel.
const char* get_cname() const;
};
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_observer, mc, "Logging specific to MC simcall observation");
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
void SimcallObserver::serialize(std::stringstream& stream) const
{
}
return true;
}
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#include <string>
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
class SimcallObserver {
ActorImpl* const issuer_;
double get_timeout() const { return timeout_; }
};
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(obs_mutex, mc_observer, "Logging specific to mutex simcalls observation");
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
MutexObserver::MutexObserver(ActorImpl* actor, mc::Transition::Type type, activity::MutexImpl* mutex)
: SimcallObserver(actor), type_(type), mutex_(mutex)
(type_ == mc::Transition::Type::BARRIER_WAIT && acquisition_ != nullptr && acquisition_->granted_);
}
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#include <string>
-namespace simgrid {
-namespace kernel {
-namespace actor {
+namespace simgrid::kernel::actor {
/* All the observers of Mutex transitions are very similar, so implement them all together in this class */
class MutexObserver final : public SimcallObserver {
double get_timeout() const { return timeout_; }
};
-} // namespace actor
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::actor
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_context, kernel, "Context switching mechanism");
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
std::function<ContextFactory*(void)> ContextFactory::initializer;
}
AttachContext::~AttachContext() = default;
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#include <csignal>
#include <functional>
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
extern unsigned stack_size;
extern unsigned guard_size;
XBT_PUBLIC void set_nthreads(int nb_threads);
XBT_PUBLIC void set_parallel_mode(e_xbt_parmap_mode_t mode);
XBT_PUBLIC e_xbt_parmap_mode_t get_parallel_mode();
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#endif
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_context);
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
// BoostContextFactory
BoostContext* BoostContextFactory::create_context(std::function<void()>&& code, actor::ActorImpl* actor)
XBT_VERB("Using Boost contexts. Welcome to the 21th century.");
return new BoostContextFactory();
}
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#include "src/internal_config.h"
#include "src/kernel/context/ContextSwapped.hpp"
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
/** @brief Userspace context switching implementation based on Boost.Context */
class BoostContext : public SwappedContext {
public:
BoostContext* create_context(std::function<void()>&& code, actor::ActorImpl* actor) override;
};
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#endif
// ***** Method definitions
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
// RawContextFactory
XBT_VERB("Using raw contexts. Because the glibc is just not good enough for us.");
return new RawContextFactory();
}
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#include "src/kernel/context/ContextSwapped.hpp"
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
/** @brief Fast context switching inspired from SystemV ucontexts.
*
public:
RawContext* create_context(std::function<void()>&& code, actor::ActorImpl* actor) override;
};
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#endif
THROW_IMPOSSIBLE;
}
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
/* thread-specific storage for the worker's context */
thread_local SwappedContext* SwappedContext::worker_context_ = nullptr;
this->swap_into(next_context);
}
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#include <memory>
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
class SwappedContext;
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
/* Use extern "C" to make sure that this symbol is easy to recognize by name, even on exotic platforms */
extern "C" XBT_ATTRIB_NORETURN void smx_ctx_wrapper(simgrid::kernel::context::SwappedContext* context);
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
class SwappedContextFactory : public ContextFactory {
friend SwappedContext; // Reads whether we are in parallel mode
#endif
}
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#endif
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_context);
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
// ThreadContextFactory
XBT_VERB("Activating thread context factory");
return new ThreadContextFactory();
}
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#include <thread>
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
class XBT_PUBLIC ThreadContext : public AttachContext {
public:
private:
ThreadContext* create_context(std::function<void()>&& code, actor::ActorImpl* actor, bool maestro);
};
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#endif
}
}
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
// UContextFactory
UContext* UContextFactory::create_context(std::function<void()>&& code, actor::ActorImpl* actor)
XBT_VERB("Activating SYSV context factory");
return new UContextFactory();
}
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#include "src/internal_config.h"
#include "src/kernel/context/ContextSwapped.hpp"
-namespace simgrid {
-namespace kernel {
-namespace context {
+namespace simgrid::kernel::context {
class UContext : public SwappedContext {
public:
public:
UContext* create_context(std::function<void()>&& code, actor::ActorImpl* actor) override;
};
-} // namespace context
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::context
#endif
double sg_surf_precision = 1E-9; /* Change this with --cfg=surf/precision:VALUE */
int sg_concurrency_limit = -1; /* Change this with --cfg=maxmin/concurrency-limit:VALUE */
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
int Variable::next_rank_ = 1;
int Constraint::next_rank_ = 1;
dyn_constraint_cb_ = cb;
}
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
#include <memory>
#include <vector>
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
/** @addtogroup SURF_lmm
* @details
};
/** @} */
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
#endif
simgrid::config::Flag<double> cfg_bmf_precision{"bmf/precision",
"Numerical precision used when computing resource sharing", 1E-12};
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
AllocationGenerator::AllocationGenerator(Eigen::MatrixXd A) : A_(std::move(A)), alloc_(A_.cols(), 0)
{
}
}
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
#include <unordered_set>
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
/** @brief Generate all combinations of valid allocation */
class XBT_PUBLIC AllocationGenerator {
std::unordered_map<const Constraint*, int> cnst2idx_; //!< Conversely map constraint to index
};
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
#endif
#include "src/kernel/lmm/System.hpp"
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
class XBT_PUBLIC FairBottleneck : public System {
public:
void do_solve() final;
};
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
#endif
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_lmm);
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
using dyn_light_t = std::vector<int>;
} while (cnst_light_num > 0);
}
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid::kernel::lmm
#include "src/kernel/lmm/System.hpp"
-namespace simgrid {
-namespace kernel {
-namespace lmm {
+namespace simgrid::kernel::lmm {
class XBT_PUBLIC MaxMin : public System {
public:
dyn_light_t saturated_constraints;
};
-} // namespace lmm
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::lmm
#endif
XBT_LOG_NEW_CATEGORY(kernel, "SimGrid internals");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_resource, kernel, "Resources, modeling the platform performance");
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
Action::Action(Model* model, double cost, bool failed) : Action(model, cost, failed, nullptr) {}
return action;
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_cpu, ker_resource, "CPU resource, fueling execution activites");
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/*********
* Model *
return retlist;
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#include <list>
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/***********
* Classes *
void suspend() override;
void resume() override;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* CPU_IMPL_HPP_ */
"Set linear equations solver used by disk model", "maxmin",
&simgrid::kernel::lmm::System::validate_solver);
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
xbt::signal<void(DiskAction const&, Action::State, Action::State)> DiskAction::on_state_change;
on_state_change(*this, previous_state, new_state);
}
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
* Model *
*********/
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/***********
* Classes *
***********/
void set_state(simgrid::kernel::resource::Action::State state) override;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* DISK_IMPL_HPP_ */
#include "src/kernel/resource/Resource.hpp"
#include "xbt/PropertyHolder.hpp"
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/************
* Resource *
virtual void set_concurrency_limit(int limit) const = 0;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* SIMGRID_KERNEL_RESOURCE_LINKIMPL_HPP */
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_resource);
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
Model::Model(const std::string& name) : name_(name)
{
THROW_UNIMPLEMENTED;
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
* Model *
*********/
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/** @brief Command-line option 'network/TCP-gamma' -- see @ref options_model_network_gamma */
config::Flag<double> NetworkModel::cfg_tcp_gamma(
add_latency(links, latency);
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* NETWORK_INTERFACE_CPP_ */
#include <list>
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/*********
* Model *
void insert_link_latency(std::vector<StandardLinkImpl*>& result, const std::vector<StandardLinkImpl*>& links,
double* latency);
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* SIMGRID_KERNEL_RESOURCE_NETWORKMODEL_HPP */
#include <string>
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/** @ingroup SURF_interface
* @brief SURF resource interface class
bool is_used() const override { return model_->get_maxmin_system()->constraint_used(constraint_); }
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
namespace std {
template <> class hash<simgrid::kernel::resource::Resource> {
* Model *
*********/
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
SplitDuplexLinkImpl::SplitDuplexLinkImpl(const std::string& name, StandardLinkImpl* link_up,
StandardLinkImpl* link_down)
link_down_->set_concurrency_limit(limit);
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#include "src/kernel/resource/LinkImpl.hpp"
#include "src/kernel/resource/StandardLinkImpl.hpp"
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/************
* Resource *
void set_concurrency_limit(int limit) const override;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* SIMGRID_KERNEL_RESOURCE_SDLINKIMPL_HPP */
* Model *
*********/
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
StandardLinkImpl::StandardLinkImpl(const std::string& name) : LinkImpl(name), piface_(this)
{
get_constraint()->set_concurrency_limit(limit);
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
* Classes *
***********/
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/************
* Resource *
************/
void set_concurrency_limit(int limit) const override;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* SIMGRID_KERNEL_RESOURCE_STANDARDLINKIMPL_HPP */
namespace simgrid {
template class xbt::Extendable<kernel::resource::VirtualMachineImpl>;
-namespace kernel {
-namespace resource {
+namespace kernel::resource {
/*********
* Model *
s4u::VirtualMachine::on_creation(*get_iface());
}
-} // namespace resource
-} // namespace kernel
+} // namespace kernel::resource
} // namespace simgrid
extern template class XBT_PUBLIC xbt::Extendable<kernel::resource::VirtualMachineImpl>;
-namespace kernel {
-namespace resource {
+namespace kernel::resource {
/************
* Resource *
return nullptr;
};
};
-} // namespace resource
-} // namespace kernel
+} // namespace kernel::resource
} // namespace simgrid
#endif /* VM_INTERFACE_HPP_ */
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/************
* Resource *
{
xbt_assert(value == 0, "Latency cannot be set for WiFi Links.");
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
* Classes *
***********/
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
class XBT_PRIVATE WifiLinkAction;
WifiLinkImpl* get_dst_link() const { return dst_wifi_link_; }
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif
#include "simgrid/forward.h"
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
class Event {
public:
resource::Resource* resource;
bool free_me;
};
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
/**
* @brief Free a trace event structure
*
#include "src/kernel/resource/profile/Event.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
simgrid::kernel::profile::FutureEvtSet future_evt_set; // FIXME: singleton antipattern
return event;
}
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
#include "simgrid/forward.h"
#include <queue>
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
/** @brief Future Event Set (collection of iterators over the traces)
* That's useful to quickly know which is the next occurring event in a set of traces. */
// FIXME: kill that singleton
extern XBT_PRIVATE simgrid::kernel::profile::FutureEvtSet future_evt_set;
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
#endif
static std::unordered_map<std::string, simgrid::kernel::profile::Profile*> trace_list;
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
/** @brief Register this profile for that resource onto that FES,
* and get an iterator over the integrated trace */
get_enough_events(0);
}
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
void tmgr_finalize()
{
#include <vector>
#include <string>
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
/** @brief A profile is a set of timed values, encoding the value that a variable takes at what time
*
}
};
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
/** Module finalizer: frees all profiles */
XBT_PUBLIC void tmgr_finalize();
#include <sstream>
#include <string_view>
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
bool DatedValue::operator==(DatedValue const& e2) const
{
return new Profile(name, cb, repeat_delay);
}
-
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
#include "xbt/random.hpp"
#include <math.h>
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
double StochasticDatedValue::draw(Distribution law, std::vector<double> params)
{
(e2.date_params == date_params);
}
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
#include "simgrid/kernel/ProfileBuilder.hpp"
#include <vector>
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
enum class Distribution { EXP, NORM, UNIF, DET };
static double draw(Distribution law, std::vector<double> params);
};
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
#endif
/* This routing is specifically setup to represent clusters, aka homogeneous sets of machines
* Note that a router is created, easing the interconnection with the rest of the world. */
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
void ClusterBase::set_loopback()
{
*node_netpoint = netpoint;
}
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_dijkstra, ker_routing, "Kernel Dijkstra Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
class GraphNodeData {
public:
// Finally add it
xbt_graph_new_edge(route_graph_.get(), src, dst, route);
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
NetZone* create_dijkstra_zone(const std::string& name, bool cache)
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_dragonfly, ker_routing, "Kernel Dragonfly Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
DragonflyZone::DragonflyZone(const std::string& name) : ClusterBase(name) {}
route->gw_src_ = get_gateway(src->id());
route->gw_dst_ = get_gateway(dst->id());
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
DragonflyParams::DragonflyParams(const std::pair<unsigned int, unsigned int>& groups,
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_none, ker_routing, "Kernel No Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
void EmptyZone::get_graph(const s_xbt_graph_t* /*graph*/, std::map<std::string, xbt_node_t, std::less<>>* /*nodes*/,
std::map<std::string, xbt_edge_t, std::less<>>* /*edges*/)
{
xbt_die("No routing no graph");
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
NetZone* create_empty_zone(const std::string& name)
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_fat_tree, ker_routing, "Kernel Fat-Tree Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
bool FatTreeZone::is_in_sub_tree(const FatTreeNode* root, const FatTreeNode* node) const
{
file << "}";
file.close();
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
FatTreeParams::FatTreeParams(unsigned int n_levels, const std::vector<unsigned int>& down_links,
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_floyd, ker_routing, "Kernel Floyd Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
void FloydZone::init_tables(unsigned int table_size)
{
}
}
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
NetZone* create_floyd_zone(const std::string& name)
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_full, ker_routing, "Kernel Full Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
void FullZone::check_routing_table()
{
new_extended_route(get_hierarchy(), gw_src, gw_dst, get_link_list_impl(link_list, true), false));
}
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
NetZone* create_full_zone(const std::string& name)
template class xbt::Extendable<kernel::routing::NetPoint>;
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
simgrid::xbt::signal<void(NetPoint&)> NetPoint::on_creation;
new vivaldi::Coords(this, coords);
return this;
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
} // namespace simgrid
/** @brief Retrieve a netpoint from its name
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing, kernel, "Kernel routing-related information");
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
/* Pick the right models for CPU, net and host, and call their model_init_preparse */
static void surf_config_models_setup()
return std::any_of(begin(children_), end(children_),
[netpoint](const auto* child) { return child->is_component_recursive(netpoint); });
}
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
return elm->second;
}
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
RoutedZone::RoutedZone(const std::string& name) : NetZoneImpl(name) {}
NetZoneImpl::on_route_creation(symmetrical, gw_src, gw_dst, gw_src, gw_dst, get_link_list_impl(link_list, false));
}
}
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_star, ker_routing, "Kernel Star Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
StarZone::StarZone(const std::string& name) : ClusterZone(name) {}
void StarZone::add_links_to_route(const std::vector<resource::StandardLinkImpl*>& links, Route* route, double* latency,
}
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
NetZone* create_star_zone(const std::string& name)
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_torus, ker_routing, "Kernel Torus Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel ::routing {
void TorusZone::create_torus_links(unsigned long id, int rank, unsigned long position)
{
route->gw_dst_ = get_gateway(dst->id());
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_vivaldi, ker_routing, "Kernel Vivaldi Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
namespace vivaldi {
}
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
NetZone* create_vivaldi_zone(const std::string& name)
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_wifi, ker_routing, "Kernel Wifi Routing");
namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace kernel::routing {
void WifiZone::do_seal()
{
wifi_link_->set_sharing_policy(s4u::Link::SharingPolicy::WIFI, {});
return wifi_link_;
}
-} // namespace routing
-} // namespace kernel
+} // namespace kernel::routing
namespace s4u {
NetZone* create_wifi_zone(const std::string& name)
#include <simgrid/kernel/Timer.hpp>
#include <simgrid/s4u/Engine.hpp>
-namespace simgrid {
-namespace kernel {
-namespace timer {
+namespace simgrid::kernel::timer {
Timer* Timer::set(double date, xbt::Task<void()>&& callback)
{
return result;
}
-} // namespace timer
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::timer
#include "src/mc/mc_forward.hpp"
#include "src/mc/remote/RemotePtr.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** Options for read operations
*
}
};
-}
-}
+} // namespace simgrid::mc
#endif
# define WAITPID_CHECKED_FLAGS 0
#endif
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
ModelChecker::ModelChecker(std::unique_ptr<RemoteProcess> remote_simulation, int sockfd)
: checker_side_(sockfd), remote_process_(std::move(remote_simulation))
xbt_assert(checker_side_.get_channel().receive(answer) != -1, "Could not receive answer to FINALIZE");
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <memory>
#include <set>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** State of the model-checker (global variables for the model checker)
*/
void handle_waitpid();
};
-}
-}
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_Session, mc, "Model-checker session");
XBT_LOG_EXTERNAL_CATEGORY(mc_global);
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
template <class Code> void run_child_process(int socket, Code code)
{
throw DeadlockError();
}
}
-}
-}
+} // namespace simgrid::mc
#include <functional>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** A model-checking session
*
bool actor_is_enabled(aid_t pid) const;
};
-}
-}
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_VisitedState, mc, "Logging specific to state equality detection mechanisms");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** @brief Save the current state */
VisitedState::VisitedState(unsigned long state_number) : num(state_number)
return nullptr;
}
-}
-}
+} // namespace simgrid::mc
#include <cstddef>
#include <memory>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class XBT_PRIVATE VisitedState {
public:
void prune();
};
-}
-}
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(Api, mc, "Logging specific to MC Facade APIs ");
XBT_LOG_EXTERNAL_CATEGORY(mc_global);
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
simgrid::mc::Exploration* Api::initialize(char** argv, simgrid::mc::ExplorationAlgorithm algo)
{
return transition->dst;
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include "xbt/automaton.hpp"
#include "xbt/base.h"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
XBT_DECLARE_ENUM_CLASS(ExplorationAlgorithm, Safety, UDPOR, Liveness, CommDeterminism);
xbt_automaton_state_t get_automaton_transition_dst(xbt_dynar_t const& dynar, int index) const;
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_state, mc, "Logging specific to MC states");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
long State::expended_states_ = 0;
transition_.reset(mc_model_checker->handle_simcall(aid, times_considered, true));
mc_model_checker->wait_for_requests();
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include "src/mc/sosp/Snapshot.hpp"
#include "src/mc/transition/Transition.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/* A node in the exploration graph (kind-of) */
class XBT_PRIVATE State : public xbt::Extendable<State> {
/* Returns the total amount of states created so far (for statistics) */
static long get_expanded_states() { return expended_states_; }
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, mc, "Logging specific to mc_compare in mc");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/*********************************** Heap comparison ***********************************/
/***************************************************************************************/
void match_equals(const HeapLocationPairs* list);
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
/************************************************************************************/
[block](auto const& stack) { return stack.block == block; });
}
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
void StateComparator::match_equals(const HeapLocationPairs* list)
{
state.match_equals(previous);
return false;
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
/************************** Snapshot comparison *******************************/
/******************************************************************************/
return false;
}
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
bool snapshot_equal(const Snapshot* s1, const Snapshot* s2)
{
return true;
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_comm_determinism, mc, "Logging specific to MC communication determinism detection");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
enum class CallType { NONE, SEND, RECV, WAIT, WAITANY };
enum class CommPatternDifference { NONE, TYPE, MBOX, TAG, SRC_PROC, DST_PROC, DATA_SIZE };
return new DFSExplorer(session);
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_dfs, mc, "DFS exploration algorithm of the model-checker");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
xbt::signal<void()> DFSExplorer::on_exploration_start_signal;
xbt::signal<void()> DFSExplorer::on_backtracking_signal;
return new DFSExplorer(session);
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <string>
#include <vector>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class XBT_PRIVATE DFSExplorer : public Exploration {
ReductionMode reductionMode_ = ReductionMode::unset;
std::unique_ptr<VisitedState> visited_state_;
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#include "src/mc/api.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** A model-checking exploration algorithm
*
XBT_PUBLIC Exploration* create_communication_determinism_checker(Session* session);
XBT_PUBLIC Exploration* create_udpor_checker(Session* session);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
/********* Static functions *********/
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
VisitedPair::VisitedPair(int pair_num, xbt_automaton_state_t automaton_state,
std::shared_ptr<const std::vector<int>> atomic_propositions,
return new LivenessChecker(session);
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <memory>
#include <vector>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class XBT_PRIVATE Pair {
public:
std::string previous_request_;
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_udpor, mc, "Logging specific to MC safety verification ");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
UdporChecker::UdporChecker(Session* session) : Exploration(session) {}
return new UdporChecker(session);
}
-} // namespace mc
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid::mc
#include "src/mc/explo/Exploration.hpp"
#include "src/mc/mc_record.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class XBT_PRIVATE UdporChecker : public Exploration {
public:
void log_state() override;
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#include "src/mc/inspect/mc_dwarf.hpp"
#include "src/mc/mc_private.hpp"
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
void execute(const Dwarf_Op* ops, std::size_t n, const ExpressionContext& context, ExpressionStack& stack)
{
}
}
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
* Evaluation of DWARF location expressions.
*/
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
/** A DWARF expression
*
execute(expression.data(), expression.size(), context, stack);
}
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
#endif
#include "src/mc/inspect/Frame.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
void* Frame::frame_base(unw_cursor_t& unw_cursor) const
{
xbt_die("Unexpected location type");
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include "src/mc/inspect/Variable.hpp"
#include "src/mc/mc_forward.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** Debug information about a given function or scope within a function */
class Frame {
void* frame_base(unw_cursor_t& unw_cursor) const;
void remove_variable(char* name);
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(mc_dwarf);
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
/** Resolve a location expression */
Location resolve(simgrid::dwarf::DwarfExpression const& expression, simgrid::mc::ObjectInformation* object_info,
return locations;
}
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
#include <cstdint>
#include <vector>
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
/** A DWARF expression with optional validity constraints */
class LocationListEntry {
XBT_PRIVATE
simgrid::dwarf::LocationList location_list(const simgrid::mc::ObjectInformation& info, Dwarf_Attribute& attr);
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
#endif
#include "src/mc/mc_private.hpp"
#include "xbt/file.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/* For an executable object, addresses are virtual address (there is no offset) i.e.
* \f$\text{virtual address} = \{dwarf address}\f$
xbt_assert(result->start_exec || result->start_rw || result->start_ro);
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include "src/smpi/include/private.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** An entry in the functions index
*
/** Augment the current module with information about the other ones */
XBT_PRIVATE void postProcessObjectInformation(const simgrid::mc::RemoteProcess* process,
simgrid::mc::ObjectInformation* info);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#include "src/mc/inspect/LocationList.hpp"
#include "src/mc/mc_forward.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** A member of a structure, union
*
simgrid::mc::Type* full_type = nullptr; // The same (but more complete) type
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#include "src/mc/inspect/LocationList.hpp"
#include "src/mc/mc_forward.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** A variable (global or local) in the model-checked program */
class Variable {
simgrid::mc::ObjectInformation* object_info = nullptr;
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
*/
static std::uint64_t MC_dwarf_at_type(Dwarf_Die* die);
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
enum class TagClass { Unknown, Type, Subprogram, Variable, Scope, Namespace };
return tagname(dwarf_tag(die));
}
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
// ***** Attributes
}
}
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
void ObjectInformation::ensure_dwarf_loaded()
{
}
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
/** Convert a DWARF register into a libunwind register
*
#endif
}
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
#include "src/mc/mc_forward.hpp"
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
XBT_PRIVATE const char* attrname(int attr);
XBT_PRIVATE const char* tagname(int tag);
XBT_PRIVATE
int dwarf_register_to_libunwind(int dwarf_register);
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
#endif
};
}
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
/** @brief Get the name of an attribute (DW_AT_*) from its code
*
return name == attrname_map.end() ? "DW_AT_unknown" : name->second;
}
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
};
}
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
/** @brief Get the name of a dwarf tag (DW_TAG_*) from its code
*
return name == tagname_map.end() ? "DW_TAG_unknown" : name->second;
}
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
#include "src/mc/inspect/mc_dwarf.hpp"
#include "src/mc/mc_private.hpp"
-namespace simgrid {
-namespace dwarf {
+namespace simgrid::dwarf {
/** Resolve snapshot in the process address space
*
return (void*)stack.top();
}
-} // namespace dwarf
-} // namespace simgrid
+} // namespace simgrid::dwarf
#include <libunwind.h>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
// ***** Implementation
return cursor;
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <cstdio>
#include <libunwind.h>
-namespace simgrid {
-namespace unw {
+namespace simgrid::unw {
XBT_PRIVATE unw_addr_space_t create_addr_space();
XBT_PRIVATE void* create_context(unw_addr_space_t as, pid_t pid);
-} // namespace unw
-} // namespace simgrid
+} // namespace simgrid::unw
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class UnwindContext {
simgrid::mc::AddressSpace* address_space_ = nullptr;
};
void dumpStack(FILE* file, unw_cursor_t* cursor);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
return 0;
}
-namespace simgrid {
-namespace unw {
+namespace simgrid::unw {
unw_addr_space_t create_addr_space()
{
return _UPT_create(pid);
}
-} // namespace unw
-} // namespace simgrid
+} // namespace simgrid::unw
return simgrid::kernel::actor::simcall_answered([&observer] { return observer.get_value(); }, &observer);
}
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
void execute_actors()
{
return false;
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include "simgrid/forward.h"
#include <vector>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** Execute everything which is invisible
*
/** Check if the given simcall is visible */
XBT_PRIVATE bool request_is_visible(const kernel::actor::Simcall* req);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#endif
#if SIMGRID_HAVE_MC
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/* Configuration support */
simgrid::mc::ReductionMode reduction_mode = simgrid::mc::ReductionMode::unset;
-}
-}
+} // namespace simgrid::mc
#else
#define _sg_do_model_check 0
#endif
constexpr int SIMGRID_MC_EXIT_ERROR = 63;
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class XBT_PUBLIC DeadlockError : public std::exception {
};
class XBT_PUBLIC TerminationError : public std::exception {
};
class XBT_PUBLIC LivenessError : public std::exception {
};
-}
-}
+} // namespace simgrid::mc
#endif
#ifndef SIMGRID_MC_FORWARD_HPP
#define SIMGRID_MC_FORWARD_HPP
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class PageStore;
class ChunkedData;
class Session;
class Exploration;
-}
-}
+} // namespace simgrid::mc
// TODO, try to get rid of the global ModelChecker variable
extern simgrid::mc::ModelChecker* mc_model_checker;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc, "Logging specific to MC (global)");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
std::vector<double> processes_time;
-}
}
#if SIMGRID_HAVE_MC
"digraph graphname{\n fixedsize=true; rankdir=TB; ranksep=.25; edge [fontsize=12]; node [fontsize=10, shape=circle,width=.5 ]; graph [resolution=20, fontsize=10];\n");
}
-
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/* Liveness */
xbt_automaton_t property_automaton = nullptr;
} while (unw_step(cursor));
}
-}
-}
+} // namespace simgrid::mc
#endif
double MC_process_clock_get(const simgrid::kernel::actor::ActorImpl* process)
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_hash, mc, "Logging specific to mc_hash");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
namespace {
return hash.value();
}
-}
-}
+} // namespace simgrid::mc
#include "xbt/base.h"
#include "src/mc/mc_forward.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
using hash_type = std::uint64_t;
XBT_PRIVATE hash_type hash(simgrid::mc::Snapshot const& snapshot);
-}
-}
+} // namespace simgrid::mc
#endif
/** Number of bits of addresses inside a given page, log2(xbt_pagesize). */
extern "C" int xbt_pagebits;
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc::mmu {
// TODO, do not depend on xbt_pagesize/xbt_pagebits but our own chunk size
-namespace mmu {
/** @brief How many memory pages are necessary to store size bytes?
*
{
return (a >> xbt_pagebits) == (b >> xbt_pagebits);
}
-}
-}
-}
+} // namespace simgrid::mc::mmu
#endif
#include "src/kernel/activity/CommImpl.hpp"
#include "src/mc/remote/RemotePtr.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/* On every state, each actor has an entry of the following type.
* This represents both the actor and its transition because
void set_done() { this->state_ = InterleavingType::done; }
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_PRIVATE extern FILE* dot_output;
/********************************** Miscellaneous **********************************/
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
XBT_PRIVATE void find_object_address(std::vector<simgrid::xbt::VmMap> const& maps,
simgrid::mc::ObjectInformation* result);
// Move is somewhere else (in the LivenessChecker class, in the Session class?):
extern XBT_PRIVATE xbt_automaton_t property_automaton;
-}
-}
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_record, mc, "Logging specific to MC record/replay facility");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
void RecordTrace::replay() const
{
#endif
-}
-}
+} // namespace simgrid::mc
#include <string>
#include <vector>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class RecordTrace {
std::vector<Transition*> transitions_;
static void replay(const std::string& trace);
};
-}
-}
+} // namespace simgrid::mc
#endif
#include "xbt/base.h"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
enum class ReductionMode {
unset,
};
extern XBT_PRIVATE simgrid::mc::ReductionMode reduction_mode;
-}
-}
+} // namespace simgrid::mc
#endif
}
::operator delete(data);
}
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
void RemoteProcess::refresh_simix()
{
this->cache_flags_ |= RemoteProcess::cache_simix_processes;
}
-}
-}
+} // namespace simgrid::mc
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_client, mc, "MC client logic");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
std::unique_ptr<AppSide> AppSide::instance_;
message.stack_region = region;
xbt_assert(channel_.send(message) == 0, "Could not send STACK_REGION to model-checker");
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <memory>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** Model-checked-side of the communication protocol
*
static AppSide* initialize(xbt_dynar_t actors_addr);
static AppSide* get() { return instance_.get(); }
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_Channel, mc, "MC interprocess communication");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
Channel::~Channel()
{
XBT_ERROR("Channel::receive failure: %s", strerror(errno));
return res;
}
-}
-}
+} // namespace simgrid::mc
#include <type_traits>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** A channel for exchanging messages between model-checker and model-checked app
*
int get_socket() const { return socket_; }
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#include <csignal>
#include <sys/wait.h>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
void CheckerSide::start(void (*handler)(int, short, void*), ModelChecker* mc)
{
event_base_loopbreak(base_.get());
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <functional>
#include <memory>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class CheckerSide {
std::unique_ptr<event_base, decltype(&event_base_free)> base_{nullptr, &event_base_free};
void break_loop() const;
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc, "MC process information");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
// ***** Helper stuff
_UPT_destroy(context);
unw_destroy_addr_space(as);
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <libunwind.h>
#include <vector>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class ActorInformation {
public:
/** Open a FD to a remote process memory (`/dev/$pid/mem`) */
XBT_PRIVATE int open_vm(pid_t pid, int flags);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#include "src/kernel/actor/ActorImpl.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** HACK, A value from another process
*
{
return RemotePtr<T>(p);
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#include <xbt/utility.hpp>
// ***** Messages
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
XBT_DECLARE_ENUM_CLASS(MessageType, NONE, INITIAL_ADDRESSES, CONTINUE, IGNORE_HEAP, UNIGNORE_HEAP, IGNORE_MEMORY,
STACK_REGION, REGISTER_SYMBOL, DEADLOCK_CHECK, DEADLOCK_CHECK_REPLY, WAITING, SIMCALL_EXECUTE,
SIMCALL_EXECUTE_ANSWER, ASSERTION_FAILED, ACTOR_ENABLED, ACTOR_ENABLED_REPLY, FINALIZE);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
constexpr unsigned MC_MESSAGE_LENGTH = 512;
constexpr unsigned SIMCALL_SERIALIZATION_BUFFER_SIZE = 2048;
#include "src/mc/AddressSpace.hpp"
#include "src/mc/sosp/ChunkedData.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** Take a per-page snapshot of a region
*
}
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include "src/mc/remote/RemotePtr.hpp"
#include "src/mc/sosp/PageStore.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** A byte-string represented as a sequence of chunks from a PageStore
*
ChunkedData(PageStore& store, const AddressSpace& as, RemotePtr<void> addr, std::size_t page_count);
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#include <cstring> // memcpy, memcmp
#include <unistd.h>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** @brief Compute a hash for the given memory page
*
return pageno;
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#define XBT_ALWAYS_INLINE inline __attribute__((always_inline))
#endif
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** @brief Storage for snapshot memory pages
*
return this->capacity_;
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#define MAP_POPULATE MAP_PREFAULT_READ
#endif
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
Region::Region(RegionType region_type, void* start_addr, size_t size)
: region_type_(region_type), start_addr_(start_addr), size_(size)
return target;
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
/** Compare memory between snapshots (with known regions)
*
#include <memory>
#include <vector>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
enum class RegionType { Heap = 1, Data = 2 };
void* read(void* target, const void* addr, std::size_t size) const;
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
int MC_snapshot_region_memcmp(const void* addr1, const simgrid::mc::Region* region1, const void* addr2,
const simgrid::mc::Region* region2, std::size_t size);
#include <cstddef> /* std::size_t */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_snapshot, mc, "Taking and restoring snapshots");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/************************************* Take Snapshot ************************************/
/****************************************************************************************/
process->clear_cache();
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
using mc_snapshot_stack_t = s_mc_snapshot_stack_t*;
using const_mc_snapshot_stack_t = const s_mc_snapshot_stack_t*;
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class XBT_PRIVATE Snapshot final : public AddressSpace {
public:
void snapshot_regions(RemoteProcess* process);
void snapshot_stacks(RemoteProcess* process);
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_transition, mc, "Logging specific to MC transitions");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
unsigned long Transition::executed_transitions_ = 0;
unsigned long Transition::replayed_transitions_ = 0;
#endif
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <sstream>
#include <string>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
/** An element in the recorded path
*
/** Make a new transition from serialized description */
Transition* deserialize_transition(aid_t issuer, int times_considered, std::stringstream& stream);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans_any, mc_transition, "Logging specific to MC WaitAny / TestAny transitions");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
TestAnyTransition::TestAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream)
: Transition(Type::TESTANY, issuer, times_considered)
return transitions_[times_considered_]->depends(other);
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <sstream>
#include <string>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class TestAnyTransition : public Transition {
std::vector<Transition*> transitions_;
Transition* get_current_transition() const { return transitions_.at(times_considered_); }
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans_comm, mc_transition,
"Logging specific to MC transitions about communications");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
CommWaitTransition::CommWaitTransition(aid_t issuer, int times_considered, std::stringstream& stream)
: Transition(Type::COMM_WAIT, issuer, times_considered)
return false; // Comm transitions are INDEP with non-comm transitions
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <sstream>
#include <string>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class CommRecvTransition;
class CommSendTransition;
/** Make a new transition from serialized description */
Transition* deserialize_transition(aid_t issuer, int times_considered, std::stringstream& stream);
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans_rand, mc_transition, "Logging specific to MC Random transitions");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
std::string RandomTransition::to_string(bool verbose) const
{
return xbt::string_printf("Random([%d;%d] ~> %d)", min_, max_, times_considered_);
xbt_assert(stream >> min_ >> max_);
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include "src/mc/transition/Transition.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class RandomTransition : public Transition {
int min_;
bool depends(const Transition* other) const override { return false; } // Independent with any other transition
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_trans_synchro, mc_transition, "Logging specific to MC synchronization transitions");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
std::string BarrierTransition::to_string(bool verbose) const
{
return false; // semaphores are INDEP with non-semaphore transitions
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include "src/mc/transition/Transition.hpp"
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class BarrierTransition : public Transition {
unsigned bar_;
bool depends(const Transition* other) const override;
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_udpor_global, mc, "udpor_global");
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
EventSet EvtSetTools::makeUnion(const EventSet& s1, const EventSet& s2)
{
return std::any_of(events.begin(), events.end(), [e](const UnfoldingEvent* evt) { return *evt == *e; });
}
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#include <queue>
#include <string_view>
-namespace simgrid {
-namespace mc {
+namespace simgrid::mc {
class UnfoldingEvent;
using EventSet = std::deque<UnfoldingEvent*>;
bool transition_is_ISend(const UnfoldingEvent* testedEvt, const UnfoldingEvent* SdRcEvt) const;
bool check_tr_concern_same_comm(bool& chk1, bool& chk2, UnfoldingEvent* evt1, UnfoldingEvent* evt2) const;
};
-} // namespace mc
-} // namespace simgrid
+} // namespace simgrid::mc
#endif
#include "src/instr/instr_private.hpp"
#include "src/msg/msg_private.hpp"
-namespace simgrid {
-namespace msg {
+namespace simgrid::msg {
bool Comm::test()
{
return status_;
}
-} // namespace msg
-} // namespace simgrid
+} // namespace simgrid::msg
/**
* @brief Checks whether a communication is done, and if yes, finalizes it.
XBT_LOG_NEW_CATEGORY(producer_consumer, "Producer-Consumer plugin logging category");
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
unsigned long pc_id = 0;
}
-}
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host_dvfs, kernel, "Logging specific to the HostDvfs plugin");
-namespace simgrid {
-namespace plugin {
-
-namespace dvfs {
+namespace simgrid::plugin::dvfs {
/**
* Add this to your host tag:
void update() override {}
};
#endif
-} // namespace dvfs
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin::dvfs
/* **************************** events callback *************************** */
static void on_host_added(simgrid::s4u::Host& host)
// Forwards declaration needed to make this function a friend (because friends have external linkage by default)
static void on_simulation_end();
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
class PowerRange {
public:
has_pstate_power_values_ = true;
}
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
using simgrid::plugin::HostEnergy;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host_load, kernel, "Logging specific to the HostLoad plugin");
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
static const double activity_uninitialized_remaining_cost = -1;
current_flops_ = host_->get_load();
current_speed_ = host_->get_speed();
}
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
using simgrid::plugin::HostLoad;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_energy, kernel, "Logging specific to the LinkEnergy plugin");
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
class LinkEnergy {
s4u::Link* link_{};
kernel::actor::simcall_answered(std::bind(&LinkEnergy::update, this));
return this->total_energy_;
}
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
using simgrid::plugin::LinkEnergy;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_energy_wifi, kernel, "Logging specific to the link energy wifi plugin");
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
class XBT_PRIVATE LinkEnergyWifi {
// associative array keeping size of data already sent for a given flow (required for interleaved actions)
}
}
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
using simgrid::plugin::LinkEnergyWifi;
/* **************************** events callback *************************** */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_load, kernel, "Logging specific to the LinkLoad plugin");
-namespace simgrid {
-namespace plugin {
+namespace simgrid::plugin {
class LinkLoad {
s4u::Link* link_{}; /*< The link onto which this data is attached*/
return 0;
}
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin
using simgrid::plugin::LinkLoad;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(vm_live_migration, s4u, "S4U virtual machines live migration");
-namespace simgrid {
-namespace plugin {
-namespace vm {
+namespace simgrid::plugin::vm {
xbt::Extension<s4u::Host, VmMigrationExt> VmMigrationExt::EXTENSION_ID;
void VmMigrationExt::ensureVmMigrationExtInstalled()
// effectively the VM on the DST node.
XBT_DEBUG("mig: tx_done");
}
-} // namespace vm
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin::vm
using simgrid::plugin::vm::VmMigrationExt;
#ifndef VM_LIVE_MIGRATION_HPP_
#define VM_LIVE_MIGRATION_HPP_
-namespace simgrid {
-namespace plugin {
-namespace vm {
+namespace simgrid::plugin::vm {
class VmMigrationExt {
public:
s4u::ActorPtr issuer_ = nullptr;
void operator()();
sg_size_t sendMigrationData(sg_size_t size, int stage, int stage2_round, double mig_speed, double timeout);
};
-} // namespace vm
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin::vm
#endif
#include "src/kernel/activity/ExecImpl.hpp"
#include "src/kernel/resource/VirtualMachineImpl.hpp"
-namespace simgrid {
-namespace plugin {
-namespace vm {
+namespace simgrid::plugin::vm {
class DirtyPageTrackingExt {
bool dp_tracking_ = false;
std::map<kernel::activity::ExecImpl const*, double> dp_objs_;
return total;
}
-} // namespace vm
-} // namespace plugin
-} // namespace simgrid
+} // namespace simgrid::plugin::vm
using simgrid::plugin::vm::DirtyPageTrackingExt;
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_barrier, s4u, "S4U barrier");
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
/** @brief Create a new barrier
*
{
intrusive_ptr_release(barrier->pimpl_);
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_comm, s4u_activity, "S4U asynchronous communications");
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
xbt::signal<void(Comm const&)> Comm::on_send;
xbt::signal<void(Comm const&)> Comm::on_recv;
}
return comms.size();
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
void sg_comm_detach(sg_comm_t comm, void (*clean_function)(void*))
{
#include <mutex>
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
ConditionVariablePtr ConditionVariable::create()
{
intrusive_ptr_release(cond->pimpl_);
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
sg_cond_t sg_cond_init()
static simgrid::kernel::actor::ActorCode maestro_code;
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
xbt::signal<void()> Engine::on_platform_creation;
xbt::signal<void()> Engine::on_platform_created;
xbt::signal<void()> Engine::on_simulation_start;
return this;
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
void simgrid_init(int* argc, char** argv)
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_exec, s4u_activity, "S4U asynchronous executions");
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
xbt::signal<void(Exec const&)> Exec::on_start;
Exec::Exec(kernel::activity::ExecImplPtr pimpl)
{
return not boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_)->get_hosts().empty();
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
void sg_exec_set_bound(sg_exec_t exec, double bound)
#include "src/kernel/actor/ActorImpl.hpp"
#include "src/kernel/actor/SimcallObserver.hpp"
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
xbt::signal<void(Io const&)> Io::on_start;
Io::Io(kernel::activity::IoImplPtr pimpl)
return boost::static_pointer_cast<kernel::activity::IoImpl>(pimpl_)->get_disk() != nullptr;
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
XBT_LOG_EXTERNAL_CATEGORY(s4u);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_channel, s4u, "S4U Communication Mailboxes");
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
const xbt::string& Mailbox::get_name() const
{
kernel::actor::simcall_answered([this]() { this->pimpl_->clear(); });
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
sg_mailbox_t sg_mailbox_by_name(const char* alias)
#include "src/kernel/actor/SynchroObserver.hpp"
#include "src/mc/mc_replay.hpp"
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
/** @brief Blocks the calling actor until the mutex can be obtained */
void Mutex::lock()
intrusive_ptr_release(mutex->pimpl_);
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
sg_mutex_t sg_mutex_init()
#include "src/kernel/resource/NetworkModel.hpp"
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
xbt::signal<void(NetZone const&)> NetZone::on_creation;
xbt::signal<void(NetZone const&)> NetZone::on_seal;
kernel::resource::NetworkModelIntf* model = pimpl_->get_network_model().get();
return model;
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
#include "src/kernel/actor/SynchroObserver.hpp"
#include "src/mc/mc_replay.hpp"
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
SemaphorePtr Semaphore::create(unsigned int initial_capacity)
{
intrusive_ptr_release(sem->pimpl_);
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
/** @brief creates a semaphore object of the given initial capacity */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_vm, s4u, "S4U virtual machines");
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
xbt::signal<void(VirtualMachine&)> VirtualMachine::on_creation;
xbt::signal<void(VirtualMachine const&)> VirtualMachine::on_start;
xbt::signal<void(VirtualMachine const&)> VirtualMachine::on_started;
pimpl_vm_->end_migration();
}
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
/* **************************** Public C interface *************************** */
#include <xbt/base.h>
-namespace simgrid {
-namespace util {
+namespace simgrid::util {
/** Find a pointer to a value stores in a map (or nullptr) */
template<typename C, typename K>
return &i->second;
}
-} // namespace util
-} // namespace simgrid
+} // namespace simgrid::util
#endif
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int
allgather__2dmesh(const void *send_buff, int send_count, MPI_Datatype
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* follows "simple"
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int allgather__3dmesh(const void *send_buff, int send_count,
MPI_Datatype send_type, void *recv_buff,
return MPI_SUCCESS;
}
-
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
// Allgather - gather/bcast algorithm
int allgather__GB(const void *send_buff, int send_count,
MPI_Datatype send_type, void *recv_buff,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
// Allgather-Non-Topology-Specific-Logical-Ring algorithm
int
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
// Allgather-Non-Topology-Specific-Logical-Ring algorithm
int
return MPI_SUCCESS;
}
-
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int allgather__SMP_NTS(const void *sbuf, int scount,
MPI_Datatype stype, void *rbuf,
return MPI_SUCCESS;
}
-
-}
-}
+} // namespace simgrid::smpi
* Ahmad Faraj.
****************************************************************************/
-namespace simgrid{
-namespace smpi{
-
-
+namespace simgrid::smpi {
int allgather__bruck(const void *send_buff, int send_count,
MPI_Datatype send_type, void *recv_buff,
return MPI_SUCCESS;
}
-
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int allgather__loosely_lr(const void *sbuf, int scount,
MPI_Datatype stype, void *rbuf,
return MPI_SUCCESS;
}
-
-}
-}
+} // namespace simgrid::smpi
* See COPYRIGHT in top-level directory.
*/
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allgather__mvapich2_smp(const void *sendbuf,int sendcnt, MPI_Datatype sendtype,
void *recvbuf, int recvcnt,MPI_Datatype recvtype,
return mpi_errno;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
allgather__ompi_neighborexchange(const void *sbuf, int scount,
return err;
}
-
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int
allgather__pair(const void *send_buff, int send_count,
return MPI_SUCCESS;
}
-
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
#include "smpi_status.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
allgather__rdb(const void *sbuf, int send_count,
return success;
}
-
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
// now only work with power of two processes
return MPI_SUCCESS;
}
-
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int
allgather__ring(const void *send_buff, int send_count,
return MPI_SUCCESS;
}
-
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int allgather__smp_simple(const void *send_buf, int scount,
MPI_Datatype stype, void *recv_buf,
return MPI_SUCCESS;
}
-
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int
allgather__spreading_simple(const void *send_buff, int send_count,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
// Allgather - gather/bcast algorithm
int allgatherv__GB(const void *send_buff, int send_count,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "smpi_status.hpp"
#include <algorithm>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allgatherv__mpich_rdb(
const void *sendbuf,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* comm: communication
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allgatherv__mpich_ring(const void *sendbuf, int sendcount,
MPI_Datatype send_type, void *recvbuf,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* [6] [6] [6] [6] [6] [6] [6]
*/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int allgatherv__ompi_bruck(const void *sbuf, int scount,
MPI_Datatype sdtype,
}
-
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
allgatherv__ompi_neighborexchange(const void *sbuf, int scount,
return err;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
allgatherv__pair(const void *send_buff, int send_count,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
allgatherv__ring(const void *send_buff, int send_count,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
*/
//#include <star-reduction.c>
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int allreduce__lr(const void *sbuf, void *rbuf, int rcount,
MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
{
return 0;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
#include <algorithm>
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int allreduce__mvapich2_rs(const void *sendbuf,
void *recvbuf,
int count,
}
-}
-}
+} // namespace simgrid::smpi
MPI_Datatype datatype,
MPI_Op op, MPI_Comm comm);
-
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
static int MPIR_Allreduce_reduce_p2p_MV2(const void *sendbuf,
void *recvbuf,
int count,
return (mpi_errno);
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int allreduce__ompi_ring_segmented(const void *sbuf, void *rbuf, int count,
MPI_Datatype dtype,
MPI_Op op,
smpi_free_tmp_buffer(inbuf[1]);
return ret;
}
-}
-}
+} // namespace simgrid::smpi
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__rab_rdb(const void *sbuff, void *rbuff, int count,
MPI_Datatype dtype, MPI_Op op,
MPI_Comm comm)
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
//#include <star-reduction.c>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
// NP pow of 2 for now
int allreduce__rab1(const void *sbuff, void *rbuff,
int count, MPI_Datatype dtype,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
//#include <star-reduction.c>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
// this requires that count >= NP
int allreduce__rab2(const void *sbuff, void *rbuff,
int count, MPI_Datatype dtype,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
//#include <star-reduction.c>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__rdb(const void *sbuff, void *rbuff, int count,
MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
{
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__redbcast(const void *buf, void *buf2, int count,
MPI_Datatype datatype, MPI_Op op,
MPI_Comm comm)
colls::bcast(buf2, count, datatype, 0, comm);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
3) binomial_tree bcast intra-communication between root of each SMP node
4) binomial_tree bcast inside each SMP node
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__smp_binomial_pipeline(const void *send_buf,
void *recv_buf, int count,
MPI_Datatype dtype,
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
3) binomial_tree bcast intra-communication between root of each SMP node
4) binomial_tree bcast inside each SMP node
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__smp_binomial(const void *send_buf, void *recv_buf,
int count, MPI_Datatype dtype,
MPI_Op op, MPI_Comm comm)
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
2) Recursive doubling intra-communication between root of each SMP node
3) binomial_tree bcast inside each SMP node
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__smp_rdb(const void *send_buf, void *recv_buf, int count,
MPI_Datatype dtype, MPI_Op op,
MPI_Comm comm)
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
3) allgather - inter between root of each SMP node
4) binomial_tree bcast inside each SMP node
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__smp_rsag_lr(const void *send_buf, void *recv_buf,
int count, MPI_Datatype dtype,
MPI_Op op, MPI_Comm comm)
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
3) allgather - inter between root of each SMP node
4) binomial_tree bcast inside each SMP node
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__smp_rsag_rab(const void *sbuf, void *rbuf, int count,
MPI_Datatype dtype, MPI_Op op,
MPI_Comm comm)
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
3) allgather - inter between root of each SMP node
4) binomial_tree bcast inside each SMP node
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__smp_rsag(const void *send_buf, void *recv_buf,
int count, MPI_Datatype dtype, MPI_Op op,
MPI_Comm comm)
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
}
return 0;
}
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoall__2dmesh(const void *send_buff, int send_count,
MPI_Datatype send_type,
smpi_free_tmp_buffer(tmp_buff2);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
}
return 0;
}
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoall__3dmesh(const void *send_buff, int send_count,
MPI_Datatype send_type,
void *recv_buff, int recv_count,
smpi_free_tmp_buffer(tmp_buff2);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
/*Naive and simple basic alltoall implementation. */
-
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int alltoall__basic_linear(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm)
return err;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
-
+namespace simgrid::smpi {
int
alltoall__bruck(const void *send_buff, int send_count,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#define MV2_ALLTOALL_THROTTLE_FACTOR 4
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoall__mvapich2_scatter_dest(const void *sendbuf,
int sendcount,
MPI_Datatype sendtype,
return (mpi_errno);
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
alltoall__pair_light_barrier(const void *send_buff, int send_count,
MPI_Datatype send_type,
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
alltoall__pair_mpi_barrier(const void *send_buff, int send_count,
MPI_Datatype send_type,
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
alltoall__pair_one_barrier(const void *send_buff, int send_count,
MPI_Datatype send_type,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoall__pair_rma(const void *send_buff, int send_count, MPI_Datatype send_type,
void *recv_buff, int recv_count, MPI_Datatype recv_type,
MPI_Comm comm)
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: MPICH / slightly modified by Ahmad Faraj.
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoall__rdb(const void *send_buff, int send_count,
MPI_Datatype send_type,
void *recv_buff, int recv_count,
smpi_free_tmp_buffer(tmp_buff);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
alltoall__ring_light_barrier(const void *send_buff, int send_count,
MPI_Datatype send_type,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
alltoall__ring_mpi_barrier(const void *send_buff, int send_count,
MPI_Datatype send_type,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int
alltoall__ring_one_barrier(const void *send_buff, int send_count,
MPI_Datatype send_type,
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int alltoall__ring(const void *send_buff, int send_count,
MPI_Datatype send_type, void *recv_buff,
int recv_count, MPI_Datatype recv_type,
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* FIXME: uh, check smpi_pmpi again, but this routine is called for > 12, not
* less...
**/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoallv__bruck(const void *sendbuf, const int *sendcounts, const int *senddisps,
MPI_Datatype sendtype, void *recvbuf,
const int *recvcounts,const int *recvdisps, MPI_Datatype recvtype,
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* differently and so will not have to duplicate code.
* GEF Oct05 after asking Jeff.
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoallv__ompi_basic_linear(const void *sbuf, const int *scounts, const int *sdisps,
MPI_Datatype sdtype,
void *rbuf, const int *rcounts, const int *rdisps,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int alltoallv__pair_light_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
MPI_Datatype send_type,
void *recv_buff, const int *recv_counts, const int *recv_disps,
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int alltoallv__pair_mpi_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
MPI_Datatype send_type,
void *recv_buff, const int *recv_counts, const int *recv_disps,
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoallv__pair_one_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
MPI_Datatype send_type,
void *recv_buff, const int *recv_counts, const int *recv_disps, MPI_Datatype recv_type, MPI_Comm comm)
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int alltoallv__pair(const void *send_buff, const int *send_counts, const int *send_disps,
MPI_Datatype send_type,
void *recv_buff, const int *recv_counts, const int *recv_disps,
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoallv__ring_light_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
MPI_Datatype send_type,
void *recv_buff, const int *recv_counts, const int *recv_disps,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoallv__ring_mpi_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
MPI_Datatype send_type,
void *recv_buff, const int *recv_counts, const int *recv_disps,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoallv__ring_one_barrier(const void *send_buff, const int *send_counts, const int *send_disps,
MPI_Datatype send_type,
void *recv_buff, const int *recv_counts, const int *recv_disps,
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: Ahmad Faraj
****************************************************************************/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int alltoallv__ring(const void* send_buff, const int* send_counts, const int* send_disps, MPI_Datatype send_type,
void* recv_buff, const int* recv_counts, const int* recv_disps, MPI_Datatype recv_type,
MPI_Comm comm)
}
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../coll_tuned_topo.hpp"
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int barrier__mpich_smp(MPI_Comm comm)
{
int mpi_errno = MPI_SUCCESS;
return mpi_errno;
}
-}
-}
-
+} // namespace simgrid::smpi
#include "../coll_tuned_topo.hpp"
#include "../colls_private.hpp"
#include "smpi_actor.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int barrier__mvapich2_pair(MPI_Comm comm)
{
}
-}
-}
+} // namespace simgrid::smpi
* synchronous guarantee made by last ring of sends are synchronous
*
*/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int barrier__ompi_doublering(MPI_Comm comm)
{
int rank, size;
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
int bcast_NTSB_segment_size_in_byte = 8192;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int bcast__NTSB(void *buf, int count, MPI_Datatype datatype,
int root, MPI_Comm comm)
{
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
/* Non-topology-specific pipelined linear-bcast function
0->1, 1->2 ,2->3, ....., ->last node : in a pipeline fashion
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int bcast__NTSL_Isend(void *buf, int count, MPI_Datatype datatype,
int root, MPI_Comm comm)
{
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
/* Non-topology-specific pipelined linear-bcast function
0->1, 1->2 ,2->3, ....., ->last node : in a pipeline fashion
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int bcast__NTSL(void *buf, int count, MPI_Datatype datatype,
int root, MPI_Comm comm)
{
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
int bcast_SMP_binary_segment_byte = 8192;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int bcast__SMP_binary(void *buf, int count,
MPI_Datatype datatype, int root,
MPI_Comm comm)
return 1;
}
-}
-}
+} // namespace simgrid::smpi
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int bcast__SMP_binomial(void *buf, int count,
MPI_Datatype datatype, int root,
MPI_Comm comm)
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
int bcast_SMP_linear_segment_byte = 8192;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int bcast__SMP_linear(void *buf, int count,
MPI_Datatype datatype, int root,
MPI_Comm comm)
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#ifndef BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE
#define BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE 128
#endif
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
/* Non-topology-specific pipelined linear-bcast function */
int bcast__arrival_pattern_aware_wait(void *buf, int count,
MPI_Datatype datatype,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#define HEADER_SIZE 1024
#define MAX_NODE 1024
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
/* Non-topology-specific pipelined linear-bcast function */
int bcast__arrival_pattern_aware(void *buf, int count,
MPI_Datatype datatype, int root,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#ifndef BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE
#define BCAST_ARRIVAL_PATTERN_AWARE_MAX_NODE 128
#endif
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
/* Non-topology-specific pipelined linear-bcast function */
int bcast__arrival_scatter(void *buf, int count,
MPI_Datatype datatype, int root,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* Author: MPIH / modified by Ahmad Faraj
****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int bcast__binomial_tree(void *buff, int count,
MPI_Datatype data_type, int root,
MPI_Comm comm)
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
int flattree_segment_in_byte = 8192;
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int bcast__flattree_pipeline(void *buff, int count,
MPI_Datatype data_type, int root,
MPI_Comm comm)
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "../colls_private.hpp"
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int bcast__flattree(void *buff, int count, MPI_Datatype data_type,
int root, MPI_Comm comm)
{
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#define mv2_bcast_large_msg 512*1024
#define mv2_knomial_intra_node_threshold 131072
#define mv2_scatter_rd_inter_leader_bcast 1
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int bcast__mvapich2_inter_node(void *buffer,
int count,
MPI_Datatype datatype,
}
-}
-}
+} // namespace simgrid::smpi
#define MAXTREEFANOUT 32
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int bcast__ompi_pipeline( void* buffer,
int original_count,
MPI_Datatype datatype,
return (MPI_SUCCESS);
}
-}
-}
+} // namespace simgrid::smpi
#include "../coll_tuned_topo.hpp"
#include "../colls_private.hpp"
#define MAXTREEFANOUT 32
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int bcast__ompi_split_bintree( void* buffer,
int count,
}
-}
-}
-
+} // namespace simgrid::smpi
* Author: MPIH / modified by Ahmad Faraj
****************************************************************************/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int bcast__scatter_LR_allgather(void *buff, int count,
MPI_Datatype data_type, int root,
MPI_Comm comm)
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
#include "smpi_status.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
static int scatter_for_bcast(
int root,
return mpi_errno;
}
-}
-}
+} // namespace simgrid::smpi
#define TEMP_BUF_HAS_NO_DATA (false)
#define TEMP_BUF_HAS_DATA (true)
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
/* sendbuf - (in) sender's buffer
* sendcnt - (in) sender's element count
return (mpi_errno);
}
-}
-}
-
+} // namespace simgrid::smpi
#include "../coll_tuned_topo.hpp"
#include "../colls_private.hpp"
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int gather__ompi_binomial(const void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
MPI_Datatype rdtype, int root, MPI_Comm comm)
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
/* Non-topology-specific pipelined linear-bcast function
0->1, 1->2 ,2->3, ....., ->last node : in a pipeline fashion
*/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int reduce__NTSL(const void *buf, void *rbuf, int count,
MPI_Datatype datatype, MPI_Op op, int root,
MPI_Comm comm)
smpi_free_tmp_buffer(tmp_buf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#ifndef MAX_NODE
#define MAX_NODE 1024
#endif
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
/* Non-topology-specific pipelined linear-reduce function */
int reduce__arrival_pattern_aware(const void *buf, void *rbuf,
int count,
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include <algorithm>
//#include <star-reduction.c>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int reduce__binomial(const void *sendbuf, void *recvbuf, int count,
MPI_Datatype datatype, MPI_Op op, int root,
MPI_Comm comm)
return 0;
}
-}
-}
+} // namespace simgrid::smpi
#include "../colls_private.hpp"
//#include <star-reduction.c>
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int reduce__flat_tree(const void *sbuf, void *rbuf, int count,
MPI_Datatype dtype, MPI_Op op,
int root, MPI_Comm comm)
/* All done */
return 0;
}
-}
-}
+} // namespace simgrid::smpi
return 0;
}
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int reduce__mvapich2_knomial(
const void *sendbuf,
void *recvbuf,
return mpi_errno;
}
-}
-}
+} // namespace simgrid::smpi
int count,
MPI_Datatype datatype,
MPI_Op op, int root, MPI_Comm comm);
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int reduce__mvapich2_two_level( const void *sendbuf,
void *recvbuf,
int count,
fn_exit:
return mpi_errno;
}
-}
-}
+} // namespace simgrid::smpi
#include "../coll_tuned_topo.hpp"
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int smpi_coll_tuned_ompi_reduce_generic(const void* sendbuf, void* recvbuf, int original_count,
MPI_Datatype datatype, MPI_Op op,
/* copied function (with appropriate renaming) ends here */
-
-}
-}
+} // namespace simgrid::smpi
}
REDUCE_LIMITS
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
static int MPI_I_anyReduce(const void* Sendbuf, void* Recvbuf, int count, MPI_Datatype mpi_datatype, MPI_Op mpi_op,
int root, MPI_Comm comm, bool is_all)
{
{
return MPI_I_anyReduce(Sendbuf, Recvbuf, count, datatype, op, -1, comm, true);
}
-}
-}
+} // namespace simgrid::smpi
reduce
Author: MPICH
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int reduce__scatter_gather(const void *sendbuf, void *recvbuf,
int count, MPI_Datatype datatype,
MPI_Op op, int root, MPI_Comm comm)
return 0;
}
-}
-}
+} // namespace simgrid::smpi
return retval;
}
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int reduce_scatter__mpich_pair(const void *sendbuf, void *recvbuf, const int recvcounts[],
MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
smpi_free_tmp_buffer(tmp_recvbuf);
smpi_free_tmp_buffer(tmp_results);
return MPI_SUCCESS;
- }
-}
}
-
+} // namespace simgrid::smpi
* Returns: - MPI_SUCCESS or error code
* Limitation: - Works only for commutative operations.
*/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int reduce_scatter__ompi_basic_recursivehalving(const void *sbuf,
void *rbuf,
const int *rcounts,
free(tmpbuf[1]);
return err;
}
-}
-}
+} // namespace simgrid::smpi
void *recvbuf, int recvcount, MPI_Datatype recvtype,
int root, MPI_Comm comm);
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int scatter__mvapich2_two_level_direct(const void *sendbuf,
int sendcnt,
return (mpi_errno);
}
-}
-}
-
+} // namespace simgrid::smpi
#include "../coll_tuned_topo.hpp"
#include "../colls_private.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int scatter__ompi_binomial(const void* sbuf, int scount, MPI_Datatype sdtype, void* rbuf, int rcount,
MPI_Datatype rdtype, int root, MPI_Comm comm)
return err;
}
-}
-}
+} // namespace simgrid::smpi
return (min_coll != -1) ? MPI_SUCCESS : MPI_ERR_INTERN; \
}
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLGATHERV_SIG, (send_buff, send_count, send_type, recv_buff, recv_count, recv_disps, recv_type, comm))
COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_ALLREDUCE_SIG, (sbuf, rbuf, rcount, dtype, op, comm))
COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_SCATTER_SIG ,(sendbuf, sendcount, sendtype,recvbuf, recvcount, recvtype,root, comm))
COLL_APPLY(AUTOMATIC_COLL_BENCH, COLL_BARRIER_SIG,(comm))
-}
-}
+} // namespace simgrid::smpi
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_coll, smpi, "Logging specific to SMPI collectives.");
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
std::map<std::string, std::vector<s_mpi_coll_description_t>, std::less<>> smpi_coll_descriptions(
{{std::string("gather"),
return Request::wait(&request, MPI_STATUS_IGNORE);
}
-}
-}
+} // namespace simgrid::smpi
#include "colls_private.hpp"
#include "src/smpi/include/smpi_actor.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int bcast__default(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
{
return Request::wait(&request, MPI_STATUS_IGNORE);
}
-}
-}
-
+} // namespace simgrid::smpi
as Shumilin's ring algorithm is unknown, default to ring'
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int (*intel_allreduce_functions_table[])(const void *sendbuf,
void *recvbuf,
COLL_APPLY(IMPI_COLL_SELECT, COLL_SCATTER_SIG ,(sendbuf, sendcount, sendtype,recvbuf, recvcount, recvtype,root, comm))
COLL_APPLY(IMPI_COLL_SELECT, COLL_BARRIER_SIG,(comm))
-}
-}
+} // namespace simgrid::smpi
End Algorithm: MPI_Allreduce
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__mpich(const void *sbuf, void *rbuf, int count,
MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
{
}
return scatter__ompi_binomial(sbuf, scount, sdtype, rbuf, rcount, rdtype, root, comm);
}
-}
-}
-
+} // namespace simgrid::smpi
#include "smpi_mvapich2_selector_stampede.hpp"
-namespace simgrid {
-namespace smpi {
-
+namespace simgrid::smpi {
int alltoall__mvapich2( const void *sendbuf, int sendcount,
MPI_Datatype sendtype,
return (mpi_errno);
}
-}
-}
+} // namespace simgrid::smpi
void smpi_coll_cleanup_mvapich2()
{
#include "colls_private.hpp"
#include "src/smpi/include/smpi_actor.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int colls::ibarrier(MPI_Comm comm, MPI_Request* request, int external)
{
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#include <memory>
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int allreduce__ompi(const void *sbuf, void *rbuf, int count,
MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
return funcs[alg-1](sbuf, scount, sdtype, rbuf, rcount, rdtype, root, comm);
}
-}
-}
+} // namespace simgrid::smpi
#include "xbt/xbt_os_time.h"
#include <string_view>
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
class ActorExt {
double simulated_ = 0 /* Used to time with simulated_start/elapsed */;
int set_bsend_buffer(void* buf, int size);
};
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
#endif
#define COLL_BARRIER_SIG barrier, int, \
(MPI_Comm comm)
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
struct s_mpi_coll_description_t {
std::string name;
int barrier__impi(MPI_Comm comm);
int barrier__automatic(MPI_Comm comm);
-}
-}
+} // namespace simgrid::smpi
#endif
#include "smpi_topo.hpp"
#include "smpi_config.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Comm : public F2C, public Keyval{
friend Topo;
void increment_collectives_count();
};
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
#endif
int64_t index;
};
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Datatype_contents {
public:
int combiner_;
static Datatype* f2c(int id);
};
-}
-}
+} // namespace simgrid::smpi
#endif
#include "smpi_datatype.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Type_Contiguous: public Datatype {
int block_count_;
void unserialize(const void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op) override;
};
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
#endif
#include "smpi_f2c.hpp"
#include <smpi/smpi.h>
-
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Errhandler: public F2C {
private:
static void unref(Errhandler* errhandler);
static Errhandler* f2c(int id);
};
-}
-}
+} // namespace simgrid::smpi
#endif
#include <unordered_map>
#include <string>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class F2C {
private:
const std::string& call_location() const { return call_location_; }
};
-}
-}
+} // namespace simgrid::smpi
#endif
XBT_LOG_EXTERNAL_CATEGORY(smpi_pmpi);
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class File : public F2C{
MPI_Comm comm_;
int flags_;
smpi_free_tmp_buffer(sendbuf);
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
#endif
#include <map>
#include <vector>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Group : public F2C{
/* This is actually a map from int to aid_t. We could use std::map here, but looking up a value there costs
static Group* f2c(int id);
};
-}
-}
+} // namespace simgrid::smpi
#endif
#include <vector>
#include <xbt/Extendable.hpp>
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
class Host {
std::vector<s_smpi_factor_t> orecv_parsed_values;
double oisend(size_t size, s4u::Host* src, s4u::Host* dst);
};
-}
-}
+} // namespace simgrid::smpi
#endif
#include <string>
#include <map>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Info : public F2C{
std::map<std::string, std::string, std::less<>> map_;
static Info* f2c(int id);
};
-}
-}
+} // namespace simgrid::smpi
#endif
bool delete_attr; // if true, xbt_free(attr) on delete: used by Fortran bindings
};
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Keyval{
private:
attributes().clear();
}
-}
-}
+} // namespace simgrid::smpi
#endif
#include "smpi_info.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Op : public F2C{
MPI_User_function* func_;
static void unref(MPI_Op* op);
};
-}
-}
+} // namespace simgrid::smpi
#endif
XBT_PRIVATE void log_timed_action(const simgrid::xbt::ReplayAction& action, double clock);
-namespace simgrid {
-namespace smpi {
-namespace replay {
+namespace simgrid::smpi::replay {
extern MPI_Datatype MPI_DEFAULT_TYPE;
class RequestStorage; // Forward decl
void kernel(xbt::ReplayAction& action) override;
};
-} // namespace replay
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi::replay
#endif
#include <memory>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
struct smpi_mpi_generalized_request_funcs_t {
MPI_Grequest_query_function *query_fn;
static Request* f2c(int);
};
-
-}
-}
+} // namespace simgrid::smpi
#endif
#include "smpi/smpi.h"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
//Status has to stay in C, as its fields are public.
//So status class only defines static methods to handle the C struct.
static int get_count(const MPI_Status* status, const Datatype* datatype);
};
-
-}
-}
+} // namespace simgrid::smpi
#endif
using MPI_Topology = std::shared_ptr<SMPI_Topology>;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Topo {
MPI_Comm comm_ = MPI_COMM_NULL;
std::vector<int> out_weights_;
};
-}
-}
-
+} // namespace simgrid::smpi
#endif
std::vector<double> values;
};
-namespace simgrid {
-namespace smpi {
-namespace utils {
+namespace simgrid::smpi::utils {
XBT_PUBLIC std::vector<s_smpi_factor_t> parse_factor(const std::string& smpi_coef_string);
XBT_PUBLIC void add_benched_time(double time);
XBT_PUBLIC void account_free(const void* ptr);
XBT_PUBLIC int check_collectives_ordering(MPI_Comm comm, const std::string& call);
-} // namespace utils
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi::utils
#endif
#include <vector>
#include <list>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
class Win : public F2C, public Keyval {
void* base_;
void set_errhandler( MPI_Errhandler errhandler);
};
-
-}
-}
+} // namespace simgrid::smpi
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_process, smpi, "Logging specific to SMPI (kernel)");
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
simgrid::xbt::Extension<simgrid::s4u::Actor, ActorExt> ActorExt::EXTENSION_ID;
ActorExt::ActorExt(s4u::Actor* actor) : actor_(actor)
return MPI_SUCCESS;
}
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi);
-namespace simgrid {
-namespace smpi {
-namespace app {
+namespace simgrid::smpi::app {
static int universe_size = 0;
unsigned int finalized_ranks_ = 0;
MPI_Comm comm_world_;
};
-}
-}
-}
+} // namespace simgrid::smpi::app
using simgrid::smpi::app::Instance;
cost_cbs.clear();
}
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
xbt::Extension<s4u::Host, smpi::Host> Host::EXTENSION_ID;
}
}
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
return i < action.size() ? simgrid::smpi::Datatype::decode(action[i]) : simgrid::smpi::replay::MPI_DEFAULT_TYPE;
}
-namespace simgrid {
-namespace smpi {
-
-namespace replay {
+namespace simgrid::smpi::replay {
MPI_Datatype MPI_DEFAULT_TYPE;
class RequestStorage {
TRACE_smpi_comm_out(get_pid());
}
-} // Replay Namespace
-}} // namespace simgrid::smpi
+} // namespace simgrid::smpi::replay
static std::unordered_map<aid_t, simgrid::smpi::replay::RequestStorage> storage;
/** @brief Only initialize the replay, don't do it for real */
extern std::string surf_parsed_filename;
extern int surf_parse_lineno;
-namespace simgrid {
-namespace smpi {
-namespace utils {
+namespace simgrid::smpi::utils {
double total_benched_time=0;
unsigned long total_malloc_size=0;
}
return MPI_SUCCESS;
}
-}
-}
-} // namespace simgrid
+} // namespace simgrid::smpi::utils
/* Support for cartesian topology was added, but there are 2 other types of topology, graph et dist graph. In order to
* support them, we have to add a field SMPI_Topo_type, and replace the MPI_Topology field by an union. */
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
std::unordered_map<int, smpi_key_elem> Comm::keyvals_;
int Comm::keyval_id_=0;
}
}
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
CREATE_MPI_DATATYPE(COUNT, 59, long long, DT_FLAG_MULTILANG)
MPI_Datatype MPI_PTR = &smpi_MPI_PTR;
-
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
std::unordered_map<int, smpi_key_elem> Datatype::keyvals_; // required by the Keyval class implementation
int Datatype::keyval_id_=0; // required by the Keyval class implementation
return static_cast<Datatype*>(F2C::f2c(id));
}
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
#include <array>
#include <cstring>
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
Datatype_contents::Datatype_contents(int combiner, int number_of_integers, const int* integers, int number_of_addresses,
const MPI_Aint* addresses, int number_of_datatypes, const MPI_Datatype* datatypes)
}
}
-}
-}
+} // namespace simgrid::smpi
simgrid::smpi::Errhandler smpi_MPI_ERRORS_RETURN;
simgrid::smpi::Errhandler smpi_MPI_ERRORS_ARE_FATAL;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
MPI_Errhandler Errhandler::f2c(int id) {
if (F2C::lookup() != nullptr && id >= 0) {
}
}
-}
-
-}
+} // namespace simgrid::smpi
int mpi_status_ignore_;
int mpi_statuses_ignore_;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
std::unique_ptr<F2C::f2c_lookup_type> F2C::f2c_lookup_ = nullptr;
int F2C::f2c_id_ = 0;
return nullptr;
}
-}
-}
+} // namespace simgrid::smpi
MPI_Errhandler SMPI_default_File_Errhandler = _smpi_cfg_default_errhandler_is_error ? MPI_ERRORS_ARE_FATAL : MPI_ERRORS_RETURN;;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
File::File(MPI_Comm comm, const char* filename, int amode, MPI_Info info) : comm_(comm), flags_(amode), info_(info)
{
{
return static_cast<File*>(F2C::f2c(id));
}
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
simgrid::smpi::Group smpi_MPI_GROUP_EMPTY;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
Group::Group(const Group* origin)
{
}
}
-}
-}
+} // namespace simgrid::smpi
#include "smpi_comm.hpp"
#include "simgrid/Exception.hpp"
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
Info::Info(const Info* orig)
{
return static_cast<Info*>(F2C::f2c(id));
}
-}
-}
+} // namespace simgrid::smpi
#include "smpi_keyvals.hpp"
#include "xbt/sysdep.h"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
template <> int Keyval::call_deleter<Comm>(Comm* obj, const smpi_key_elem& elem, int keyval, void* value, int* /*flag*/)
{
return ret;
}
-}
-}
+} // namespace simgrid::smpi
CREATE_MPI_OP(REPLACE, replace_func, 0)
CREATE_MPI_OP(NO_OP, no_func, 0)
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
void Op::apply(const void* invec, void* inoutvec, const int* len, MPI_Datatype datatype) const
{
}
}
-}
-}
+} // namespace simgrid::smpi
extern std::function<void(simgrid::kernel::activity::CommImpl*, void*, size_t)> smpi_comm_copy_data_callback;
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
Request::Request(const void* buf, int count, MPI_Datatype datatype, aid_t src, aid_t dst, int tag, MPI_Comm comm,
unsigned flags, MPI_Op op)
{
return nbc_requests_;
}
-}
-}
+} // namespace simgrid::smpi
#include "private.hpp"
#include "smpi_datatype.hpp"
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
void Status::empty(MPI_Status * status)
{
return status->count / datatype->size();
}
-}
-}
+} // namespace simgrid::smpi
static int assignnodes(int ndim, const std::vector<int>& factors, std::vector<int>& dims);
static int getfactors(int num, std::vector<int>& factors);
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
void Topo::setComm(MPI_Comm comm)
{
return MPI_SUCCESS;
}
-}
-}
+} // namespace simgrid::smpi
/*
* assignnodes
return MPI_ERR_WIN; \
}
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
std::unordered_map<int, smpi_key_elem> Win::keyvals_;
int Win::keyval_id_=0;
if (errhandler_ != MPI_ERRHANDLER_NULL)
errhandler_->ref();
}
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi
return result;
}
-namespace simgrid {
-namespace smpi {
-namespace plugin {
-namespace ampi {
+namespace simgrid::smpi::plugin::ampi {
xbt::signal<void(s4u::Actor const&)> on_iteration_in;
xbt::signal<void(s4u::Actor const&)> on_iteration_out;
-} // namespace ampi
-} // namespace plugin
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi::plugin::ampi
/* FIXME The following contains several times "rank() + 1". This works for one
* instance, but we need to find a way to deal with this for several instances and
#include <simgrid/s4u.hpp>
-namespace simgrid {
-namespace smpi {
-namespace plugin {
-namespace ampi {
+namespace simgrid::smpi::plugin::ampi {
extern xbt::signal<void(s4u::Actor const&)> on_iteration_out;
extern xbt::signal<void(s4u::Actor const&)> on_iteration_in;
-} // namespace ampi
-} // namespace plugin
-} // namespace smpi
-} // namespace simgrid
+} // namespace simgrid::smpi::plugin::ampi
#endif
* Callbacks *t
*************/
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/*********
* Model *
for (auto const& [_, vm] : vms_)
vm->seal();
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#include <vector>
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/*********
* Model *
*********/
function(actor);
}
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* HOST_INTERFACE_HPP */
engine->get_netzone_root()->set_cpu_pm_model(cpu_model_pm);
}
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
CpuCas01Model::CpuCas01Model(const std::string& name) : CpuModel(name)
{
model->get_maxmin_system()->expand(constraint, get_variable(), 1.0);
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#include "src/kernel/resource/CpuImpl.hpp"
#include "xbt/base.h"
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/***********
* Classes *
int requested_core() const { return requested_core_; }
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cpu_ti, res_cpu, "CPU resource, Trace Integration model");
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/*********
* Trace *
return get_remains_no_update();
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#include <boost/intrusive/list.hpp>
#include <memory>
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/***********
* Classes *
CpuTiList modified_cpus_;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* SURF_MODEL_CPUTI_HPP_ */
engine->get_netzone_root()->set_disk_model(disk_model);
}
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
DiskImpl* DiskS19Model::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth)
{
{
THROW_IMPOSSIBLE;
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#ifndef DISK_S19_HPP_
#define DISK_S19_HPP_
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/***********
* Classes *
void update_remains_lazy(double now) override;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* DISK_S19_HPP_ */
engine->get_netzone_root()->set_host_model(host_model);
}
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
double HostCLM03Model::next_occurring_event(double /*now*/)
{
return cpu->execution_start(thread_count * flops_amount, thread_count, -1);
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
* Classes *
***********/
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
class XBT_PRIVATE HostCLM03Model : public HostModel {
public:
Action* execute_parallel(const std::vector<s4u::Host*>& host_list, const double* flops_amount,
const double* bytes_amount, double rate) override;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* HOST_CLM03_HPP_ */
engine->get_netzone_root()->set_network_model(net_model);
}
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
NetworkCm02Model::NetworkCm02Model(const std::string& name) : NetworkModel(name)
{
set_last_value(get_rate());
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
* Classes *
***********/
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
class XBT_PRIVATE NetworkCm02Model;
class XBT_PRIVATE NetworkCm02Action;
using NetworkAction::NetworkAction;
void update_remains_lazy(double now) override;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* SURF_NETWORK_CM02_HPP_ */
engine->get_netzone_root()->set_network_model(net_model);
}
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
StandardLinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::vector<double>& /*bandwidth*/)
{
THROW_IMPOSSIBLE;
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#include "src/kernel/resource/NetworkModel.hpp"
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
class NetworkConstantModel : public NetworkModel {
public:
void update_remains_lazy(double now) override;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* NETWORK_CONSTANT_HPP_ */
simgrid::config::set_default<double>("network/weight-S", 8775);
}
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
void NetworkIBModel::IB_create_host_callback(s4u::Host const& host)
{
update_IB_factors_rec(from, updated);
XBT_DEBUG("IB - Finished updating %d", from->id_);
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#include <map>
#include <vector>
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
class XBT_PRIVATE IBNode;
static void IB_action_state_changed_callback(NetworkAction& action, Action::State /*previous*/);
static void IB_comm_start_callback(const activity::CommImpl& comm);
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif
});
namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace kernel::resource {
NetworkNS3Model::NetworkNS3Model(const std::string& name) : NetworkModel(name)
{
THROW_IMPOSSIBLE;
}
-} // namespace resource
-} // namespace kernel
+} // namespace kernel::resource
ns3::Ptr<ns3::Node> get_ns3node_from_sghost(const simgrid::s4u::Host* host)
{
#include "src/kernel/resource/NetworkModel.hpp"
#include "src/kernel/resource/StandardLinkImpl.hpp"
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid ::kernel::resource {
class NetworkNS3Model : public NetworkModel {
public:
double last_sent_ = 0;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* NETWORK_NS3_HPP_ */
simgrid::config::set_default<double>("network/weight-S", 8775);
}
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
void NetworkSmpiModel::check_lat_factor_cb()
{
return current;
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#include "network_cm02.hpp"
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
class XBT_PRIVATE NetworkSmpiModel : public NetworkCm02Model {
public:
void check_lat_factor_cb() override;
void check_bw_factor_cb() override;
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif
engine->get_netzone_root()->set_host_model(host_model);
}
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
HostL07Model::HostL07Model(const std::string& name, lmm::System* sys) : HostModel(name)
{
}
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#ifndef HOST_L07_HPP_
#define HOST_L07_HPP_
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
/***********
* Classes *
void update_latency(double delta, double precision) { double_update(&latency_, delta, precision); }
};
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
#endif /* HOST_L07_HPP_ */
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse);
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
xbt::signal<void(ClusterCreationArgs const&)> on_cluster_creation;
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
static simgrid::kernel::routing::ClusterZoneCreationArgs
zone_cluster; /* temporary store data for irregular clusters, created with <zone routing="Cluster"> */
#include <string>
#include <vector>
-namespace simgrid {
-namespace kernel {
-namespace routing {
+namespace simgrid::kernel::routing {
/* ***************************************** */
/*
* Platform creation functions. Instead of passing 123 arguments to the creation functions
extern XBT_PRIVATE xbt::signal<void(ClusterCreationArgs const&)> on_cluster_creation;
-} // namespace routing
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::routing
/********** Routing **********/
void routing_cluster_add_backbone(std::unique_ptr<simgrid::kernel::routing::LinkCreationArgs> link);
#include <condition_variable>
#include <mutex>
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
class XBT_PUBLIC OsSemaphore {
public:
explicit inline OsSemaphore(unsigned int capa) : capa_(capa) {}
std::mutex mutex_;
std::condition_variable condition_;
};
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
#include <map>
#include <memory>
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
/** @brief Return the property associated to the provided key (or nullptr if not existing) */
const char* PropertyHolder::get_property(const std::string& key) const
template void PropertyHolder::set_properties(const std::map<std::string, std::string, std::less<>>& properties);
template void PropertyHolder::set_properties(const std::unordered_map<std::string, std::string>& properties);
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
simgrid::xbt::Backtrace().display();
}
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
class BacktraceImpl {
#if HAVE_BOOST_STACKTRACE_BACKTRACE || HAVE_BOOST_STACKTRACE_ADDR2LINE
backtrace.empty() ? "(backtrace not set -- did you install Boost.Stacktrace?)" : backtrace.c_str());
}
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
XBT_EXPORT_NO_IMPORT xbt_cfg_t simgrid_config = nullptr;
-namespace simgrid {
-namespace config {
+namespace simgrid::config {
namespace {
{
simgrid_config->help();
}
-}
-}
+} // namespace simgrid::config
/*----[ Setting ]---------------------------------------------------------*/
throw e;
}
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
ImpossibleError::~ImpossibleError() = default;
InitializationError::~InitializationError() = default;
});
}
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
void xbt_throw_impossible(const char* file, int line, const char* func)
{
} else \
((void)0)
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
/**
* \todo This function contains many cases that do not allow for a
return ret;
}
-}
-}
+} // namespace simgrid::xbt
#include <string>
#include <vector>
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
/** An virtual memory map entry from /proc/$pid/maps */
struct VmMap {
};
std::vector<VmMap> get_memory_map(pid_t pid);
-}
-}
+} // namespace simgrid::xbt
#endif
XBT_LOG_EXTERNAL_CATEGORY(xbt);
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_random, xbt, "Random");
-namespace simgrid {
-namespace xbt {
-namespace random {
+namespace simgrid::xbt::random {
bool Random::read_state(const std::string& filename)
{
return default_random->normal(mean, sd);
}
-} // namespace random
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt::random
#include <cstdarg>
#include <cstdio>
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
#if SIMGRID_HAVE_MC
return res;
}
-}
-}
+} // namespace simgrid::xbt
XBT_LOG_NEW_CATEGORY(smpi, "All SMPI categories"); /* lives here even if that's a bit odd to solve linking issues: this is used in xbt_log_file_appender to detect whether SMPI is used (and thus whether we should unbench the writing to disk) */
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
std::string binary_name; /* Name of the system process containing us (mandatory to retrieve neat backtraces) */
std::vector<std::string> cmdline; /* all we got in argv */
-} // namespace xbt
-} // namespace simgrid
+} // namespace simgrid::xbt
int xbt_initialized = 0;
simgrid::config::Flag<bool> cfg_dbg_clean_atexit{
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(replay,xbt,"Replay trace reader");
-namespace simgrid {
-namespace xbt {
+namespace simgrid::xbt {
static std::ifstream action_fs;
}
return 0;
}
-}
-}
+} // namespace simgrid::xbt
/**
* @ingroup XBT_replay