* @{
*/
-XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_config<int>") XBT_PUBLIC
+XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_value<int>") XBT_PUBLIC
int xbt_cfg_get_int(const char* name);
-XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_config<double>") XBT_PUBLIC
+XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_value<double>") XBT_PUBLIC
double xbt_cfg_get_double(const char* name);
-XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_config<bool>") XBT_PUBLIC
+XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_value<bool>") XBT_PUBLIC
int xbt_cfg_get_boolean(const char* name);
/** @} */
// Get config
-template <class T> XBT_PUBLIC T const& get_config(const char* name);
+template <class T> XBT_PUBLIC T const& get_value(const char* name);
-extern template XBT_PUBLIC int const& get_config<int>(const char* name);
-extern template XBT_PUBLIC double const& get_config<double>(const char* name);
-extern template XBT_PUBLIC bool const& get_config<bool>(const char* name);
-extern template XBT_PUBLIC std::string const& get_config<std::string>(const char* name);
+extern template XBT_PUBLIC int const& get_value<int>(const char* name);
+extern template XBT_PUBLIC double const& get_value<double>(const char* name);
+extern template XBT_PUBLIC bool const& get_value<bool>(const char* name);
+extern template XBT_PUBLIC std::string const& get_value<std::string>(const char* name);
// Register:
}
}
-XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_config<std::string>") XBT_PUBLIC std::string
+XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_value<std::string>") XBT_PUBLIC std::string
xbt_cfg_get_string(const char* name);
#endif
/* init the tracing module to generate the right output */
/* open the trace file(s) */
- std::string format = simgrid::config::get_config<std::string>(OPT_TRACING_FORMAT);
+ std::string format = simgrid::config::get_value<std::string>(OPT_TRACING_FORMAT);
XBT_DEBUG("Tracing format %s\n", format.c_str());
if (format == "Paje") {
TRACE_paje_start();
delete root_type;
/* close the trace files */
- std::string format = simgrid::config::get_config<std::string>(OPT_TRACING_FORMAT);
+ std::string format = simgrid::config::get_value<std::string>(OPT_TRACING_FORMAT);
XBT_DEBUG("Tracing format %s\n", format.c_str());
if (format == "Paje") {
TRACE_paje_end();
std::string TRACE_get_comment()
{
- return simgrid::config::get_config<std::string>(OPT_TRACING_COMMENT);
+ return simgrid::config::get_value<std::string>(OPT_TRACING_COMMENT);
}
std::string TRACE_get_comment_file()
{
- return simgrid::config::get_config<std::string>(OPT_TRACING_COMMENT_FILE);
+ return simgrid::config::get_value<std::string>(OPT_TRACING_COMMENT_FILE);
}
int TRACE_precision ()
{
- return simgrid::config::get_config<int>(OPT_TRACING_PRECISION);
+ return simgrid::config::get_value<int>(OPT_TRACING_PRECISION);
}
std::string TRACE_get_filename()
{
- return simgrid::config::get_config<std::string>(OPT_TRACING_FILENAME);
+ return simgrid::config::get_value<std::string>(OPT_TRACING_FILENAME);
}
void TRACE_global_init()
prefix = xbt_os_time();
}
- if (not simgrid::config::get_config<bool>("tracing/smpi/format/ti-one-file") || ti_unique_file == nullptr) {
+ if (not simgrid::config::get_value<bool>("tracing/smpi/format/ti-one-file") || ti_unique_file == nullptr) {
std::string folder_name = TRACE_get_filename() + "_files";
std::string filename = folder_name + "/" + std::to_string(prefix) + "_" + name_ + ".txt";
#ifdef WIN32
XBT_DEBUG("Dump %s", stream.str().c_str());
fprintf(tracing_file, "%s\n", stream.str().c_str());
} else if (trace_format == simgrid::instr::TraceFormat::Ti) {
- if (not simgrid::config::get_config<bool>("tracing/smpi/format/ti-one-file") || tracing_files.size() == 1) {
+ if (not simgrid::config::get_value<bool>("tracing/smpi/format/ti-one-file") || tracing_files.size() == 1) {
fclose(tracing_files.at(this));
}
tracing_files.erase(this);
: PajeEvent::PajeEvent(container, type, SIMIX_get_clock(), event_type), value(value), extra_(extra)
{
#if HAVE_SMPI
- if (simgrid::config::get_config<bool>("smpi/trace-call-location")) {
+ if (simgrid::config::get_value<bool>("smpi/trace-call-location")) {
smpi_trace_call_location_t* loc = smpi_trace_get_call_location();
filename = loc->filename;
linenumber = loc->linenumber;
stream_ << " " << ((extra_ != nullptr) ? extra_->display_size() : 0);
#if HAVE_SMPI
- if (simgrid::config::get_config<bool>("smpi/trace-call-location")) {
+ if (simgrid::config::get_value<bool>("smpi/trace-call-location")) {
stream_ << " \"" << filename << "\" " << linenumber;
}
#endif
fprintf(tracing_file, "%% Value string\n");
if (size) fprintf(tracing_file, "%% Size int\n");
#if HAVE_SMPI
- if (simgrid::config::get_config<bool>("smpi/trace-call-location")) {
+ if (simgrid::config::get_value<bool>("smpi/trace-call-location")) {
/**
* paje currently (May 2016) uses "Filename" and "Linenumber" as
* reserved words. We cannot use them...
MC_ignore_heap(&(msg_global->sent_msg), sizeof(msg_global->sent_msg));
}
- if (simgrid::config::get_config<bool>("clean-atexit"))
+ if (simgrid::config::get_value<bool>("clean-atexit"))
atexit(MSG_exit);
}
surf_init(argc, argv);
xbt_cfg_setdefault_string("host/model", "ptask_L07");
- if (simgrid::config::get_config<bool>("clean-atexit"))
+ if (simgrid::config::get_value<bool>("clean-atexit"))
atexit(SD_exit);
if (_sg_cfg_exit_asap) {
exit(0);
#endif
#if HAVE_SMPI && (defined(__APPLE__) || defined(__NetBSD__))
- std::string priv = simgrid::config::get_config<std::string>("smpi/privatization");
+ std::string priv = simgrid::config::get_value<std::string>("smpi/privatization");
if (context_factory_name == "thread" && (priv == "dlopen" || priv == "yes" || priv == "default" || priv == "1")) {
XBT_WARN("dlopen+thread broken on Apple and BSD. Switching to raw contexts.");
context_factory_name = "raw";
#endif
#if HAVE_SMPI && defined(__FreeBSD__)
- if (context_factory_name == "thread" && simgrid::config::get_config<std::string>("smpi/privatization") != "no") {
+ if (context_factory_name == "thread" && simgrid::config::get_value<std::string>("smpi/privatization") != "no") {
XBT_WARN("mmap broken on FreeBSD, but dlopen+thread broken too. Switching to dlopen+raw contexts.");
context_factory_name = "raw";
}
});
}
- if (simgrid::config::get_config<bool>("clean-atexit"))
+ if (simgrid::config::get_value<bool>("clean-atexit"))
atexit(SIMIX_clean);
if (_sg_cfg_exit_asap)
}
#define SET_COLL(coll) \
- name = simgrid::config::get_config<std::string>("smpi/" #coll); \
+ name = simgrid::config::get_value<std::string>("smpi/" #coll); \
if (name.empty()) \
name = selector_name; \
set_##coll(name);
void Colls::set_collectives(){
- std::string selector_name = simgrid::config::get_config<std::string>("smpi/coll-selector");
+ std::string selector_name = simgrid::config::get_value<std::string>("smpi/coll-selector");
if (selector_name.empty())
selector_name = "default";
if (orecv_string != nullptr) {
orecv_parsed_values = parse_factor(orecv_string);
} else {
- orecv_parsed_values = parse_factor(simgrid::config::get_config<std::string>("smpi/or"));
+ orecv_parsed_values = parse_factor(simgrid::config::get_value<std::string>("smpi/or"));
}
const char* osend_string = host->getProperty("smpi/os");
if (osend_string != nullptr) {
osend_parsed_values = parse_factor(osend_string);
} else {
- osend_parsed_values = parse_factor(simgrid::config::get_config<std::string>("smpi/os"));
+ osend_parsed_values = parse_factor(simgrid::config::get_value<std::string>("smpi/os"));
}
const char* oisend_string = host->getProperty("smpi/ois");
if (oisend_string != nullptr) {
oisend_parsed_values = parse_factor(oisend_string);
} else {
- oisend_parsed_values = parse_factor(simgrid::config::get_config<std::string>("smpi/ois"));
+ oisend_parsed_values = parse_factor(simgrid::config::get_value<std::string>("smpi/ois"));
}
}
return;
#if HAVE_PAPI
- if (not simgrid::config::get_config<std::string>("smpi/papi-events").empty()) {
+ if (not simgrid::config::get_value<std::string>("smpi/papi-events").empty()) {
int event_set = smpi_process()->papi_event_set();
// PAPI_start sets everything to 0! See man(3) PAPI_start
if (PAPI_LOW_LEVEL_INITED == PAPI_is_initialized()) {
* An MPI function has been called and now is the right time to update
* our PAPI counters for this process.
*/
- if (simgrid::config::get_config<std::string>("smpi/papi-events")[0] != '\0') {
+ if (simgrid::config::get_value<std::string>("smpi/papi-events")[0] != '\0') {
papi_counter_t& counter_data = smpi_process()->papi_counters();
int event_set = smpi_process()->papi_event_set();
std::vector<long long> event_values = std::vector<long long>(counter_data.size());
}
// Maybe we need to artificially speed up or slow down our computation based on our statistical analysis.
- if (simgrid::config::get_config<std::string>("smpi/comp-adjustment-file")[0] != '\0') {
+ if (simgrid::config::get_value<std::string>("smpi/comp-adjustment-file")[0] != '\0') {
smpi_trace_call_location_t* loc = smpi_process()->call_location();
std::string key = loc->get_composed_key();
}
// Simulate the benchmarked computation unless disabled via command-line argument
- if (simgrid::config::get_config<bool>("smpi/simulate-computation")) {
+ if (simgrid::config::get_value<bool>("smpi/simulate-computation")) {
smpi_execute(xbt_os_timer_elapsed(timer)/speedup);
}
#if HAVE_PAPI
- if (simgrid::config::get_config<std::string>("smpi/papi-events")[0] != '\0' && TRACE_smpi_is_enabled()) {
+ if (simgrid::config::get_value<std::string>("smpi/papi-events")[0] != '\0' && TRACE_smpi_is_enabled()) {
container_t container =
new simgrid::instr::Container(std::string("rank-") + std::to_string(simgrid::s4u::this_actor::get_pid()));
papi_counter_t& counter_data = smpi_process()->papi_counters();
{
//check correctness of MPI parameters
- xbt_assert(simgrid::config::get_config<int>("smpi/async-small-thresh") <=
- simgrid::config::get_config<int>("smpi/send-is-detached-thresh"));
+ xbt_assert(simgrid::config::get_value<int>("smpi/async-small-thresh") <=
+ simgrid::config::get_value<int>("smpi/send-is-detached-thresh"));
if (xbt_cfg_is_default_value("smpi/host-speed")) {
XBT_INFO("You did not set the power of the host running the simulation. "
"Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.");
}
- xbt_assert(simgrid::config::get_config<double>("smpi/cpu-threshold") >= 0,
+ xbt_assert(simgrid::config::get_value<double>("smpi/cpu-threshold") >= 0,
"The 'smpi/cpu-threshold' option cannot have negative values [anymore]. If you want to discard "
"the simulation of any computation, please use 'smpi/simulate-computation:no' instead.");
}
xbt_os_walltimer_start(global_timer);
}
- std::string filename = simgrid::config::get_config<std::string>("smpi/comp-adjustment-file");
+ std::string filename = simgrid::config::get_value<std::string>("smpi/comp-adjustment-file");
if (not filename.empty()) {
std::ifstream fstream(filename);
if (not fstream.is_open()) {
// and the (computed) event_set.
std::map</* computation unit name */ std::string, papi_process_data> units2papi_setup;
- if (not simgrid::config::get_config<std::string>("smpi/papi-events").empty()) {
+ if (not simgrid::config::get_value<std::string>("smpi/papi-events").empty()) {
if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT)
XBT_ERROR("Could not initialize PAPI library; is it correctly installed and linked?"
" Expected version is %i",
typedef boost::tokenizer<boost::char_separator<char>> Tokenizer;
boost::char_separator<char> separator_units(";");
- std::string str = simgrid::config::get_config<std::string>("smpi/papi-events");
+ std::string str = simgrid::config::get_value<std::string>("smpi/papi-events");
Tokenizer tokens(str, separator_units);
// Iterate over all the computational units. This could be processes, hosts, threads, ranks... You name it.
return;
simgrid::smpi::Colls::set_collectives();
simgrid::smpi::Colls::smpi_coll_cleanup_callback = nullptr;
- smpi_cpu_threshold = simgrid::config::get_config<double>("smpi/cpu-threshold");
- smpi_host_speed = simgrid::config::get_config<double>("smpi/host-speed");
+ smpi_cpu_threshold = simgrid::config::get_value<double>("smpi/cpu-threshold");
+ smpi_host_speed = simgrid::config::get_value<double>("smpi/host-speed");
xbt_assert(smpi_host_speed >= 0, "You're trying to set the host_speed to a negative value (%f)", smpi_host_speed);
- std::string smpi_privatize_option = simgrid::config::get_config<std::string>("smpi/privatization");
+ std::string smpi_privatize_option = simgrid::config::get_value<std::string>("smpi/privatization");
if (smpi_privatize_option == "no" || smpi_privatize_option == "0")
smpi_privatize_global_variables = SmpiPrivStrategies::None;
else if (smpi_privatize_option == "yes" || smpi_privatize_option == "1")
if (smpi_cpu_threshold < 0)
smpi_cpu_threshold = DBL_MAX;
- std::string val = simgrid::config::get_config<std::string>("smpi/shared-malloc");
+ std::string val = simgrid::config::get_value<std::string>("smpi/shared-malloc");
if ((val == "yes") || (val == "1") || (val == "on") || (val == "global")) {
smpi_cfg_shared_malloc = shmalloc_global;
} else if (val == "local") {
// Load the copy and resolve the entry point:
void* handle = dlopen(target_executable.c_str(), RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
int saved_errno = errno;
- if (simgrid::config::get_config<bool>("smpi/keep-temps") == false)
+ if (simgrid::config::get_value<bool>("smpi/keep-temps") == false)
unlink(target_executable.c_str());
if (handle == nullptr)
xbt_die("dlopen failed: %s (errno: %d -- %s)", dlerror(), saved_errno, strerror(saved_errno));
SIMIX_run();
xbt_os_walltimer_stop(global_timer);
- if (simgrid::config::get_config<bool>("smpi/display-timing")) {
+ if (simgrid::config::get_value<bool>("smpi/display-timing")) {
double global_time = xbt_os_timer_elapsed(global_timer);
XBT_INFO("Simulated time: %g seconds. \n\n"
"The simulation took %g seconds (after parsing and platform setup)\n"
MC_ignore_heap(timer_, xbt_os_timer_size());
#if HAVE_PAPI
- if (simgrid::config::get_config<std::string>("smpi/papi-events")[0] != '\0') {
+ if (simgrid::config::get_value<std::string>("smpi/papi-events")[0] != '\0') {
// TODO: Implement host/process/thread based counters. This implementation
// just always takes the values passed via "default", like this:
// "default:COUNTER1:COUNTER2:COUNTER3;".
void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int nb_shared_blocks)
{
- std::string huge_page_mount_point = simgrid::config::get_config<std::string>("smpi/shared-malloc-hugepage");
+ std::string huge_page_mount_point = simgrid::config::get_value<std::string>("smpi/shared-malloc-hugepage");
bool use_huge_page = not huge_page_mount_point.empty();
#ifndef MAP_HUGETLB /* If the system header don't define that mmap flag */
xbt_assert(not use_huge_page,
"Huge pages are not available on your system, you cannot use the smpi/shared-malloc-hugepage option.");
#endif
smpi_shared_malloc_blocksize =
- static_cast<unsigned long>(simgrid::config::get_config<double>("smpi/shared-malloc-blocksize"));
+ static_cast<unsigned long>(simgrid::config::get_value<double>("smpi/shared-malloc-blocksize"));
void* mem;
size_t allocated_size;
if(use_huge_page) {
simgrid::smpi::Process* process = smpi_process_remote(simgrid::s4u::Actor::by_pid(dst_));
- int async_small_thresh = simgrid::config::get_config<int>("smpi/async-small-thresh");
+ int async_small_thresh = simgrid::config::get_value<int>("smpi/async-small-thresh");
xbt_mutex_t mut = process->mailboxes_mutex();
if (async_small_thresh != 0 || (flags_ & RMA) != 0)
void* buf = buf_;
if ((flags_ & SSEND) == 0 &&
((flags_ & RMA) != 0 ||
- static_cast<int>(size_) < simgrid::config::get_config<int>("smpi/send-is-detached-thresh"))) {
+ static_cast<int>(size_) < simgrid::config::get_value<int>("smpi/send-is-detached-thresh"))) {
void *oldbuf = nullptr;
detached_ = 1;
XBT_DEBUG("Send request %p is detached", this);
XBT_DEBUG("sending size of %zu : sleep %f ", size_, sleeptime);
}
- int async_small_thresh = simgrid::config::get_config<int>("smpi/async-small-thresh");
+ int async_small_thresh = simgrid::config::get_value<int>("smpi/async-small-thresh");
xbt_mutex_t mut=process->mailboxes_mutex();
nsleeps=1;//reset the number of sleeps we will do next time
if (*request != MPI_REQUEST_NULL && ((*request)->flags_ & PERSISTENT) == 0)
*request = MPI_REQUEST_NULL;
- } else if (simgrid::config::get_config<bool>("smpi/grow-injected-times")) {
+ } else if (simgrid::config::get_value<bool>("smpi/grow-injected-times")) {
nsleeps++;
}
}
// This can speed up the execution of certain applications by an order of magnitude, such as HPL
static int nsleeps = 1;
double speed = simgrid::s4u::Actor::self()->get_host()->getSpeed();
- double maxrate = simgrid::config::get_config<double>("smpi/iprobe-cpu-usage");
+ double maxrate = simgrid::config::get_value<double>("smpi/iprobe-cpu-usage");
MPI_Request request = new Request(nullptr, 0, MPI_CHAR,
source == MPI_ANY_SOURCE ? MPI_ANY_SOURCE : comm->group()->actor(source)->get_pid(),
simgrid::s4u::this_actor::get_pid(), tag, comm, PERSISTENT | RECV);
request->print_request("New iprobe");
// We have to test both mailboxes as we don't know if we will receive one one or another
- if (simgrid::config::get_config<int>("smpi/async-small-thresh") > 0) {
+ if (simgrid::config::get_value<int>("smpi/async-small-thresh") > 0) {
mailbox = smpi_process()->mailbox_small();
XBT_DEBUG("Trying to probe the perm recv mailbox");
request->action_ = simcall_comm_iprobe(mailbox, 0, &match_recv, static_cast<void*>(request));
}
else {
*flag = 0;
- if (simgrid::config::get_config<bool>("smpi/grow-injected-times"))
+ if (simgrid::config::get_value<bool>("smpi/grow-injected-times"))
nsleeps++;
}
unref(&request);
CpuCas01Model::CpuCas01Model(kernel::resource::Model::UpdateAlgo algo) : simgrid::surf::CpuModel(algo)
{
- bool select = simgrid::config::get_config<bool>("cpu/maxmin-selective-update");
+ bool select = simgrid::config::get_value<bool>("cpu/maxmin-selective-update");
if (algo == Model::UpdateAlgo::Lazy) {
xbt_assert(select || xbt_cfg_is_default_value("cpu/maxmin-selective-update"),
namespace resource {
NetworkCm02Model::NetworkCm02Model(kernel::lmm::System* (*make_new_lmm_system)(bool))
- : NetworkModel(simgrid::config::get_config<std::string>("network/optim") == "Full" ? Model::UpdateAlgo::Full
- : Model::UpdateAlgo::Lazy)
+ : NetworkModel(simgrid::config::get_value<std::string>("network/optim") == "Full" ? Model::UpdateAlgo::Full
+ : Model::UpdateAlgo::Lazy)
{
- std::string optim = simgrid::config::get_config<std::string>("network/optim");
- bool select = simgrid::config::get_config<bool>("network/maxmin-selective-update");
+ std::string optim = simgrid::config::get_value<std::string>("network/optim");
+ bool select = simgrid::config::get_value<bool>("network/maxmin-selective-update");
if (optim == "Lazy") {
xbt_assert(select || xbt_cfg_is_default_value("network/maxmin-selective-update"),
NetworkIBModel::NetworkIBModel() : NetworkSmpiModel()
{
- std::string IB_factors_string = simgrid::config::get_config<std::string>("smpi/IB-penalty-factors");
+ std::string IB_factors_string = simgrid::config::get_value<std::string>("smpi/IB-penalty-factors");
std::vector<std::string> radical_elements;
boost::split(radical_elements, IB_factors_string, boost::is_any_of(";"));
double NetworkSmpiModel::bandwidthFactor(double size)
{
if (smpi_bw_factor.empty())
- smpi_bw_factor = parse_factor(simgrid::config::get_config<std::string>("smpi/bw-factor"));
+ smpi_bw_factor = parse_factor(simgrid::config::get_value<std::string>("smpi/bw-factor"));
double current = 1.0;
for (auto const& fact : smpi_bw_factor) {
double NetworkSmpiModel::latencyFactor(double size)
{
if (smpi_lat_factor.empty())
- smpi_lat_factor = parse_factor(simgrid::config::get_config<std::string>("smpi/lat-factor"));
+ smpi_lat_factor = parse_factor(simgrid::config::get_value<std::string>("smpi/lat-factor"));
double current = 1.0;
for (auto const& fact : smpi_lat_factor) {
void init()
{
const char* local_sampling_rate_config = host_->getProperty(property_sampling_rate);
- double global_sampling_rate_config = simgrid::config::get_config<double>(property_sampling_rate);
+ double global_sampling_rate_config = simgrid::config::get_value<double>(property_sampling_rate);
if (local_sampling_rate_config != nullptr) {
sampling_rate = std::stod(local_sampling_rate_config);
} else {
dvfs_governor = std::string(daemon_proc->get_host()->getProperty(property_governor));
boost::algorithm::to_lower(dvfs_governor);
} else {
- dvfs_governor = simgrid::config::get_config<std::string>(property_governor);
+ dvfs_governor = simgrid::config::get_value<std::string>(property_governor);
boost::algorithm::to_lower(dvfs_governor);
}
/* Pick the right models for CPU, net and host, and call their model_init_preparse */
static void surf_config_models_setup()
{
- std::string host_model_name = simgrid::config::get_config<std::string>("host/model");
- std::string network_model_name = simgrid::config::get_config<std::string>("network/model");
- std::string cpu_model_name = simgrid::config::get_config<std::string>("cpu/model");
- std::string storage_model_name = simgrid::config::get_config<std::string>("storage/model");
+ std::string host_model_name = simgrid::config::get_value<std::string>("host/model");
+ std::string network_model_name = simgrid::config::get_value<std::string>("network/model");
+ std::string cpu_model_name = simgrid::config::get_value<std::string>("cpu/model");
+ std::string storage_model_name = simgrid::config::get_value<std::string>("storage/model");
/* The compound host model is needed when using non-default net/cpu models */
if ((not xbt_cfg_is_default_value("network/model") || not xbt_cfg_is_default_value("cpu/model")) &&
}
}
-// ***** get_config *****
+// ***** get_value *****
-template <class T> XBT_PUBLIC T const& get_config(const char* name)
+template <class T> XBT_PUBLIC T const& get_value(const char* name)
{
return (*simgrid_config)[name].get_value<T>();
}
-template XBT_PUBLIC int const& get_config<int>(const char* name);
-template XBT_PUBLIC double const& get_config<double>(const char* name);
-template XBT_PUBLIC bool const& get_config<bool>(const char* name);
-template XBT_PUBLIC std::string const& get_config<std::string>(const char* name);
+template XBT_PUBLIC int const& get_value<int>(const char* name);
+template XBT_PUBLIC double const& get_value<double>(const char* name);
+template XBT_PUBLIC bool const& get_value<bool>(const char* name);
+template XBT_PUBLIC std::string const& get_value<std::string>(const char* name);
// ***** alias *****
{
/* get_single_value */
xbt_cfg_set_parse("peername:toto:42 speed:42");
- int ival = simgrid::config::get_config<int>("speed");
+ int ival = simgrid::config::get_value<int>("speed");
if (ival != 42)
xbt_test_fail("Speed value = %d, I expected 42", ival);
}
XBT_LOG(prio, "%s %s: %s", context, name.get(), exception.what());
// Do we have a backtrace?
- if (with_context != nullptr && not simgrid::config::get_config<bool>("exception/cutpath")) {
+ if (with_context != nullptr && not simgrid::config::get_value<bool>("exception/cutpath")) {
auto backtrace = simgrid::xbt::resolveBacktrace(
with_context->backtrace().data(), with_context->backtrace().size());
for (std::string const& s : backtrace)
static void showBacktrace(std::vector<xbt_backtrace_location_t>& bt)
{
- if (simgrid::config::get_config<bool>("exception/cutpath")) {
+ if (simgrid::config::get_value<bool>("exception/cutpath")) {
XBT_LOG(xbt_log_priority_critical, "Display of current backtrace disabled by --cfg=exception/cutpath.");
return;
}