### Maintainer mode
src/dag/dax_dtd.l
-src/surf/xml/simgrid_dtd.l
+src/kernel/xml/simgrid_dtd.l
### Libraries links
[Ss]im[Gg]rid-*.tar.gz
### Generated files
teshsuite/smpi/type-indexed/type-indexed
teshsuite/smpi/type-struct/type-struct
teshsuite/smpi/type-vector/type-vector
-teshsuite/surf/lmm_usage/lmm_usage
-teshsuite/surf/maxmin_bench/maxmin_bench
-teshsuite/surf/surf_usage/surf_usage
-teshsuite/surf/surf_usage2/surf_usage2
+teshsuite/models/lmm_usage/lmm_usage
+teshsuite/models/maxmin_bench/maxmin_bench
+teshsuite/models/core_usage/core_usage
+teshsuite/models/core_usage2/core_usage2
teshsuite/xbt/cmdline/cmdline
teshsuite/xbt/log_large/log_large
teshsuite/xbt/log_usage/log_usage
Files:
src/dag/dax_dtd.c
src/dag/dax_dtd.h
- src/surf/xml/simgrid_dtd.c
- src/surf/xml/simgrid_dtd.h
+ src/kernel/xml/simgrid_dtd.c
+ src/kernel/xml/simgrid_dtd.h
Copyright:
FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
FleXML is Copyright (C) 2003-2013 Martin Quinson. All rights reserved.
include teshsuite/models/cm02-set-lat-bw/cm02-set-lat-bw.tesh
include teshsuite/models/cm02-tcpgamma/cm02-tcpgamma.cpp
include teshsuite/models/cm02-tcpgamma/cm02-tcpgamma.tesh
+include teshsuite/models/core_usage/core_usage.cpp
+include teshsuite/models/core_usage/core_usage.tesh
+include teshsuite/models/core_usage2/core_usage2.cpp
+include teshsuite/models/core_usage2/core_usage2.tesh
include teshsuite/models/issue105/issue105.cpp
include teshsuite/models/issue105/issue105.tesh
+include teshsuite/models/lmm_usage/lmm_usage.cpp
+include teshsuite/models/lmm_usage/lmm_usage.tesh
+include teshsuite/models/maxmin_bench/maxmin_bench.cpp
+include teshsuite/models/maxmin_bench/maxmin_bench_large.tesh
+include teshsuite/models/maxmin_bench/maxmin_bench_medium.tesh
+include teshsuite/models/maxmin_bench/maxmin_bench_small.tesh
include teshsuite/models/ptask-subflows/ptask-subflows.cpp
include teshsuite/models/ptask-subflows/ptask-subflows.tesh
include teshsuite/models/ptask_L07_usage/ptask_L07_usage.cpp
include teshsuite/smpi/type-struct/type-struct.tesh
include teshsuite/smpi/type-vector/type-vector.c
include teshsuite/smpi/type-vector/type-vector.tesh
-include teshsuite/surf/lmm_usage/lmm_usage.cpp
-include teshsuite/surf/lmm_usage/lmm_usage.tesh
-include teshsuite/surf/maxmin_bench/maxmin_bench.cpp
-include teshsuite/surf/maxmin_bench/maxmin_bench_large.tesh
-include teshsuite/surf/maxmin_bench/maxmin_bench_medium.tesh
-include teshsuite/surf/maxmin_bench/maxmin_bench_small.tesh
-include teshsuite/surf/surf_usage/surf_usage.cpp
-include teshsuite/surf/surf_usage/surf_usage.tesh
-include teshsuite/surf/surf_usage2/surf_usage2.cpp
-include teshsuite/surf/surf_usage2/surf_usage2.tesh
include teshsuite/xbt/cmdline/cmdline.c
include teshsuite/xbt/cmdline/cmdline.tesh
include teshsuite/xbt/log_large/log_large.c
include src/include/catch.hpp
include src/include/mc/datatypes.h
include src/include/mc/mc.h
+include src/include/simgrid/math_utils.h
include src/include/simgrid/sg_config.hpp
include src/include/xbt/coverage.h
include src/include/xbt/mmalloc.h
include src/kernel/resource/models/network_ib.hpp
include src/kernel/resource/models/network_ns3.cpp
include src/kernel/resource/models/network_ns3.hpp
+include src/kernel/resource/models/ns3/ns3_simulator.cpp
+include src/kernel/resource/models/ns3/ns3_simulator.hpp
include src/kernel/resource/models/ptask_L07.cpp
include src/kernel/resource/models/ptask_L07.hpp
include src/kernel/resource/profile/Event.hpp
include src/kernel/routing/VivaldiZone.cpp
include src/kernel/routing/WifiZone.cpp
include src/kernel/timer/Timer.cpp
+include src/kernel/xml/platf.hpp
+include src/kernel/xml/platf_private.hpp
+include src/kernel/xml/sg_platf.cpp
+include src/kernel/xml/simgrid.dtd
+include src/kernel/xml/simgrid_dtd.c
+include src/kernel/xml/simgrid_dtd.h
+include src/kernel/xml/surfxml_parseplatf.cpp
+include src/kernel/xml/surfxml_sax_cb.cpp
include src/mc/AddressSpace.hpp
include src/mc/ModelChecker.cpp
include src/mc/ModelChecker.hpp
include src/sthread/sthread.c
include src/sthread/sthread.h
include src/sthread/sthread_impl.cpp
-include src/surf/ns3/ns3_simulator.cpp
-include src/surf/ns3/ns3_simulator.hpp
-include src/surf/sg_platf.cpp
include src/surf/surf_interface.hpp
-include src/surf/xml/platf.hpp
-include src/surf/xml/platf_private.hpp
-include src/surf/xml/simgrid.dtd
-include src/surf/xml/simgrid_dtd.c
-include src/surf/xml/simgrid_dtd.h
-include src/surf/xml/surfxml_parseplatf.cpp
-include src/surf/xml/surfxml_sax_cb.cpp
include src/xbt/OsSemaphore.hpp
include src/xbt/PropertyHolder.cpp
include src/xbt/automaton/automaton.c
include teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt
include teshsuite/smpi/mpich3-test/rma/CMakeLists.txt
include teshsuite/smpi/mpich3-test/topo/CMakeLists.txt
-include teshsuite/surf/CMakeLists.txt
include teshsuite/xbt/CMakeLists.txt
include tools/CMakeLists.txt
include tools/cmake/CTestConfig.cmake
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/privatization' to '1'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/np' to '2'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/hostfile' to '/tmp/host.txt'\n",
- "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'\n",
+ "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'precision/timing' to '1e-9'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to '0'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/display-timing' to 'yes'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/privatization' to '1'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/np' to '2'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/hostfile' to '/tmp/host.txt'\n",
- "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'surf/precision' to '1e-9'\n",
+ "[0.000000] [xbt_cfg/INFO] Configuration change: Set 'precision/timing' to '1e-9'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'SMPI'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/simulate-computation' to '0'\n",
"[0.000000] [xbt_cfg/INFO] Configuration change: Set 'smpi/display-timing' to 'yes'\n",
p This test leads to a deadlock because of a bug somewhere in EngineImpl::solve.
p We should debug this instead of ignoring the issue, but it's utterly
p complex with such an integration test. One day, we will setup a set of
-p unit tests for the surf solver, and such issues will be addressable again.
+p unit tests for the model's solver, and such issues will be addressable again.
p For the time being, I just give up, sorry.
p $ ${bindir:=.}/c-platform-failures --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/../../cpp/platform-failures/s4u-platform-failures_d.xml --cfg=path:${srcdir} --cfg=cpu/optim:TI "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --log=res_cpu.t:verbose
> [145.639041] (1:pinger@Tremblay) Pong time (bandwidth bound): 145.638
> [145.639041] (0:maestro@) Total simulation time: 145.639
-p Testing the surf network constant model
+p Testing the network constant model
$ ${bindir:=.}/s4u-comm-pingpong ${platfdir}/small_platform_routing_none.xml "--cfg=cpu/model:Cas01 network/model:Constant" "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n"
> [ 0.000000] (0:maestro@) Configuration change: Set 'cpu/model' to 'Cas01'
--- /dev/null
+/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef SIMGRID_MATH_UTILS_H_
+#define SIMGRID_MATH_UTILS_H_
+
+#include <xbt/asserts.h>
+#include <xbt/function_types.h>
+
+#include <cfloat>
+#include <math.h>
+
+static inline void double_update(double* variable, double value, double precision)
+{
+ if (false) { // debug
+ fprintf(stderr, "Updating %g -= %g +- %g\n", *variable, value, precision);
+ xbt_assert(value == 0.0 || value > precision);
+ // Check that precision is higher than the machine-dependent size of the mantissa. If not, brutal rounding may
+ // happen, and the precision mechanism is not active...
+ xbt_assert(FLT_RADIX == 2 && *variable < precision * exp2(DBL_MANT_DIG));
+ }
+ *variable -= value;
+ if (*variable < precision)
+ *variable = 0.0;
+}
+
+static inline int double_positive(double value, double precision)
+{
+ return (value > precision);
+}
+
+static inline int double_equals(double value1, double value2, double precision)
+{
+ return (fabs(value1 - value2) < precision);
+}
+
+#endif /* SURF_MODEL_H_ */
#include <simgrid/sg_config.hpp>
#include "mc/mc.h"
+#include "simgrid/math_utils.h"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/resource/StandardLinkImpl.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
+#include "src/kernel/xml/platf.hpp"
#include "src/mc/mc_record.hpp"
#include "src/mc/mc_replay.hpp"
#include "src/smpi/include/smpi_actor.hpp"
-#include "src/surf/xml/platf.hpp"
+#include "src/surf/surf_interface.hpp"
#include "xbt/module.h"
#include "xbt/xbt_modinter.h" /* whether initialization was already done */
{
sg_platf_parser_finalize();
- surf_parse_open(file);
- surf_parse();
- surf_parse_close();
+ simgrid_parse_open(file);
+ simgrid_parse();
+ simgrid_parse_close();
}
void EngineImpl::register_function(const std::string& name, const actor::ActorCodeFactory& code)
XBT_DEBUG("This event invalidates the next_occurring_event() computation of models. Next event set to %f",
time_delta);
}
- // FIXME: I'm too lame to update now_ live, so I change it and restore it so that the real update with surf_min
- // will work
+ // FIXME: I'm too lame to update now_ live, so I change it and restore it so that the real update works
double round_start = now_;
now_ = next_event_date;
/* update state of the corresponding resource to the new value. Does not touch lmm.
#include <simgrid/s4u/Actor.hpp>
#include <simgrid/s4u/Host.hpp>
+#include "src/internal_config.h"
#include "src/kernel/EngineImpl.hpp"
+#include "src/surf/surf_interface.hpp"
#if HAVE_SMPI
#include "src/smpi/include/private.hpp"
#endif
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "simgrid/math_utils.h"
+#include "src/internal_config.h"
#include "src/kernel/lmm/fair_bottleneck.hpp"
#include "src/kernel/lmm/maxmin.hpp"
#if SIMGRID_HAVE_EIGEN3
#include "src/kernel/lmm/bmf.hpp"
#endif
+
#include <boost/core/demangle.hpp>
#include <typeinfo>
#include "simgrid/kernel/resource/Action.hpp"
#include "simgrid/kernel/resource/Model.hpp"
#include "simgrid/s4u/Link.hpp"
-#include "src/surf/surf_interface.hpp"
#include "xbt/asserts.h"
#include "xbt/ex.h"
#include "xbt/mallocator.h"
#include <string_view>
#include <vector>
+/* user-visible parameters */
+XBT_PUBLIC_DATA double sg_precision_workamount;
+XBT_PUBLIC_DATA double sg_precision_timing;
+XBT_PUBLIC_DATA int sg_concurrency_limit;
+
namespace simgrid::kernel::lmm {
/** @addtogroup SURF_lmm
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/lmm/bmf.hpp"
+#include "simgrid/math_utils.h"
#include <Eigen/LU>
#include <iostream>
#include "src/kernel/lmm/System.hpp"
#include "xbt/config.hpp"
+#include <set>
+
#ifdef __clang__
// Ignore deprecation warnings with Eigen < 4.0 (see https://gitlab.com/libeigen/eigen/-/issues/1850)
#pragma clang diagnostic push
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "simgrid/math_utils.h"
#include "src/include/catch.hpp"
#include "src/kernel/lmm/bmf.hpp"
#include "xbt/log.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/lmm/fair_bottleneck.hpp"
+#include "simgrid/math_utils.h"
#include "xbt/sysdep.h"
#include <algorithm>
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/lmm/maxmin.hpp"
+#include "simgrid/math_utils.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_lmm);
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include "simgrid/math_utils.h"
#include "src/include/catch.hpp"
#include "src/kernel/lmm/maxmin.hpp"
#include "xbt/log.h"
#include "simgrid/kernel/resource/Action.hpp"
#include "simgrid/kernel/resource/Model.hpp"
+#include "simgrid/math_utils.h"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/lmm/maxmin.hpp"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/resource/CpuImpl.hpp"
+#include "simgrid/math_utils.h"
#include "src/kernel/resource/models/cpu_ti.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ker_resource);
-extern std::string surf_parsed_filename;
-extern int surf_parse_lineno;
+extern std::string simgrid_parsed_filename;
+extern int simgrid_parse_lineno;
namespace simgrid::kernel::resource {
}
} else {
try {
- fact.values.push_back(xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, *factor_iter, ""));
+ fact.values.push_back(xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, *factor_iter, ""));
} catch (const std::invalid_argument&) {
throw std::invalid_argument("Invalid factor value " + std::to_string(iteration) + " in chunk " +
std::to_string(factors_.size() + 1) + ": " + *factor_iter + " for " + name_);
#include "src/kernel/resource/VirtualMachineImpl.hpp"
#include "src/kernel/resource/models/cpu_cas01.hpp"
#include "src/kernel/resource/models/cpu_ti.hpp"
+#include "src/simgrid/module.hpp"
#include <numeric>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_vm, ker_resource, "Virtual Machines, containing actors and mobile across hosts");
-void surf_vm_model_init_HL13()
+void simgrid_vm_model_init_HL13()
{
auto* cpu_pm_model = simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->get_cpu_pm_model().get();
auto vm_model = std::make_shared<simgrid::kernel::resource::VMModel>("VM_HL13");
set_state(s4u::VirtualMachine::State::DESTROYED);
s4u::VirtualMachine::on_shutdown(*get_iface());
- /* FIXME: we may have to do something at the surf layer, e.g., vcpu action */
}
/** @brief Change the physical host on which the given VM is running
#include "src/kernel/resource/models/cpu_cas01.hpp"
#include "src/kernel/resource/models/cpu_ti.hpp"
#include "src/kernel/resource/profile/Event.hpp"
+#include "src/simgrid/module.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cpu_cas, res_cpu, "CPU resource, CAS01 model (used by default)");
#include "cpu_ti.hpp"
#include "simgrid/kernel/routing/NetZoneImpl.hpp"
+#include "simgrid/math_utils.h"
#include "simgrid/s4u/Engine.hpp"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/resource/profile/Event.hpp"
/**
* @brief Integrate trace
*
- * Wrapper around surf_cpu_integrate_trace_simple() to get
+ * Wrapper around profile_->integrate_simple() to get
* the cyclic effect.
*
* @param a Begin of interval
#include "src/kernel/lmm/maxmin.hpp"
#include "src/kernel/resource/models/disk_s19.hpp"
#include "src/kernel/resource/profile/Event.hpp"
+#include "src/simgrid/module.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_disk);
/***********
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/resource/NetworkModel.hpp"
#include "src/kernel/resource/models/host_clm03.hpp"
+#include "src/simgrid/module.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_host);
#include "src/kernel/resource/models/network_cm02.hpp"
#include "simgrid/kernel/routing/NetZoneImpl.hpp"
+#include "simgrid/math_utils.h"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
#include "simgrid/sg_config.hpp"
#include "src/kernel/resource/StandardLinkImpl.hpp"
#include "src/kernel/resource/WifiLinkImpl.hpp"
#include "src/kernel/resource/profile/Event.hpp"
+#include "src/simgrid/module.hpp"
#include <algorithm>
#include <numeric>
#include <simgrid/kernel/routing/NetZoneImpl.hpp>
#include <simgrid/s4u/Engine.hpp>
+#include "simgrid/math_utils.h"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/resource/models/network_constant.hpp"
+#include "src/simgrid/module.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
#include <simgrid/kernel/routing/NetPoint.hpp>
+#include "simgrid/math_utils.h"
#include "simgrid/sg_config.hpp"
#include "src/kernel/EngineImpl.hpp"
#include "src/kernel/activity/CommImpl.hpp"
#include "src/kernel/resource/HostImpl.hpp"
#include "src/kernel/resource/models/network_ib.hpp"
+#include "src/simgrid/module.hpp"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
-/*********
- * Model *
- *********/
-
-/************************************************************************/
-/* New model based on MPI contention model for Infiniband platforms */
-/************************************************************************/
+/****************************************************************/
+/* Model based on MPI contention model for Infiniband platforms */
+/****************************************************************/
/* @Inproceedings{mescal_vienne_phd, */
/* author={Jérôme Vienne}, */
/* title={prédiction de performances d’applications de calcul haute performance sur réseau Infiniband}, */
#include <string>
#include <unordered_set>
+#include "src/include/simgrid/math_utils.h"
+#include "src/simgrid/module.hpp"
#include "xbt/config.hpp"
#include "xbt/str.h"
#include "xbt/string.hpp"
#include "ns3/wifi-module.h"
#include "network_ns3.hpp"
-#include "src/surf/ns3/ns3_simulator.hpp"
+#include "src/kernel/resource/models/ns3/ns3_simulator.hpp"
#include "simgrid/kernel/routing/NetPoint.hpp"
#include "simgrid/kernel/routing/NetZoneImpl.hpp"
#include "simgrid/plugins/energy.h"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/NetZone.hpp"
-#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
+#include "src/instr/instr_private.hpp" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the signals
#include "src/kernel/EngineImpl.hpp"
-#include "src/surf/xml/platf_private.hpp" // ClusterCreationArgs
+#include "src/kernel/xml/platf_private.hpp" // ClusterCreationArgs
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_ns3, res_network, "Network model based on ns-3");
if (double_equals(time_to_next_flow_completion, 0, sg_precision_timing))
time_to_next_flow_completion = 0.0;
- XBT_DEBUG("min : %f", now);
- XBT_DEBUG("ns3 time : %f", ns3::Simulator::Now().GetSeconds());
- XBT_DEBUG("surf time : %f", EngineImpl::get_clock());
+ XBT_DEBUG("min : %f", now);
+ XBT_DEBUG("ns-3 time : %f", ns3::Simulator::Now().GetSeconds());
+ XBT_DEBUG("simgrid time: %f", EngineImpl::get_clock());
XBT_DEBUG("Next completion %f :", time_to_next_flow_completion);
return time_to_next_flow_completion;
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/surf/ns3/ns3_simulator.hpp"
+#include "src/kernel/resource/models/ns3/ns3_simulator.hpp"
+
#include "xbt/log.h"
#include "xbt/sysdep.h"
-#include <ns3/ipv4-address-helper.h>
-#include <ns3/point-to-point-helper.h>
#include <ns3/application-container.h>
-#include <ns3/ptr.h>
#include <ns3/callback.h>
+#include <ns3/ipv4-address-helper.h>
#include <ns3/packet-sink.h>
+#include <ns3/point-to-point-helper.h>
+#include <ns3/ptr.h>
#include <algorithm>
static void send_cb(ns3::Ptr<ns3::Socket> sock, uint32_t /*txSpace*/)
{
- SgFlow* flow = getFlowFromSocket(sock);
+ SgFlow* flow = getFlowFromSocket(sock);
const ns3::ApplicationContainer* sink = getSinkFromSocket(sock);
XBT_DEBUG("Asked to write on F[%p, total: %u, remain: %u]", flow, flow->total_bytes_, flow->remaining_);
flow->remaining_);
}
- if (flow->buffered_bytes_ >= flow->total_bytes_){
+ if (flow->buffered_bytes_ >= flow->total_bytes_) {
XBT_DEBUG("Closing Sockets of flow %p", flow);
// Closing the sockets of the receiving application
- ns3::Ptr<ns3::PacketSink> app = ns3::DynamicCast<ns3::PacketSink, ns3::Application>(sink->Get(0));
+ ns3::Ptr<ns3::PacketSink> app = ns3::DynamicCast<ns3::PacketSink, ns3::Application>(sink->Get(0));
ns3::Ptr<ns3::Socket> listening_sock = app->GetListeningSocket();
listening_sock->Close();
listening_sock->SetRecvCallback(ns3::MakeNullCallback<void, ns3::Ptr<ns3::Socket>>());
- for(ns3::Ptr<ns3::Socket> accepted_sock : app->GetAcceptedSockets())
+ for (ns3::Ptr<ns3::Socket> accepted_sock : app->GetAcceptedSockets())
accepted_sock->Close();
// Closing the socket of the sender
sock->Close();
#include <xbt/config.hpp>
#include "simgrid/config.h"
+#include "simgrid/math_utils.h"
#include "src/kernel/EngineImpl.hpp"
+#include "src/simgrid/module.hpp"
#if SIMGRID_HAVE_EIGEN3
#include "src/kernel/lmm/bmf.hpp"
#endif
#include <simgrid/kernel/routing/NetPoint.hpp>
#include "src/kernel/resource/NetworkModel.hpp"
-#include "src/surf/xml/platf.hpp" // surf_parse_error() and surf_parse_assert()
+#include "src/kernel/xml/platf.hpp" // simgrid_parse_error() and simgrid_parse_assert()
#include <fstream>
#include <numeric>
this->nodes_by_level_[0] *= this->num_children_per_node_[i];
if (this->nodes_by_level_[0] != this->nodes_.size()) {
- surf_parse_error("The number of provided nodes does not fit with the wanted topology."
- " Please check your platform description (We need " +
- std::to_string(this->nodes_by_level_[0]) + "nodes, we got " + std::to_string(this->nodes_.size()));
+ simgrid_parse_error("The number of provided nodes does not fit with the wanted topology."
+ " Please check your platform description (We need " +
+ std::to_string(this->nodes_by_level_[0]) + "nodes, we got " +
+ std::to_string(this->nodes_.size()));
}
for (unsigned int i = 0; i < this->levels_; i++) {
std::vector<unsigned int> count;
boost::split(parameters, topo_parameters, boost::is_any_of(";"));
- surf_parse_assert(
+ simgrid_parse_assert(
parameters.size() == 4,
"Fat trees are defined by the levels number and 3 vectors, see the documentation for more information.");
try {
n_lev = std::stoi(parameters[0]);
} catch (const std::invalid_argument&) {
- surf_parse_error("First parameter is not the amount of levels: " + parameters[0]);
+ simgrid_parse_error("First parameter is not the amount of levels: " + parameters[0]);
}
// Then, a l-sized vector standing for the children number by level
boost::split(tmp, parameters[1], boost::is_any_of(","));
- surf_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) +
- " levels but the child count vector (the first one) contains " +
- std::to_string(tmp.size()) + " levels.");
+ simgrid_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) +
+ " levels but the child count vector (the first one) contains " +
+ std::to_string(tmp.size()) + " levels.");
for (std::string const& level : tmp) {
try {
down.push_back(std::stoi(level));
} catch (const std::invalid_argument&) {
- surf_parse_error("Invalid child count: " + level);
+ simgrid_parse_error("Invalid child count: " + level);
}
}
// Then, a l-sized vector standing for the parents number by level
boost::split(tmp, parameters[2], boost::is_any_of(","));
- surf_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) +
- " levels but the parent count vector (the second one) contains " +
- std::to_string(tmp.size()) + " levels.");
+ simgrid_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) +
+ " levels but the parent count vector (the second one) contains " +
+ std::to_string(tmp.size()) + " levels.");
for (std::string const& parent : tmp) {
try {
up.push_back(std::stoi(parent));
} catch (const std::invalid_argument&) {
- surf_parse_error("Invalid parent count: " + parent);
+ simgrid_parse_error("Invalid parent count: " + parent);
}
}
// Finally, a l-sized vector standing for the ports number with the lower level
boost::split(tmp, parameters[3], boost::is_any_of(","));
- surf_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) +
- " levels but the port count vector (the third one) contains " +
- std::to_string(tmp.size()) + " levels.");
+ simgrid_parse_assert(tmp.size() == n_lev, "You specified " + std::to_string(n_lev) +
+ " levels but the port count vector (the third one) contains " +
+ std::to_string(tmp.size()) + " levels.");
for (std::string const& port : tmp) {
try {
count.push_back(std::stoi(port));
#include "src/kernel/resource/SplitDuplexLinkImpl.hpp"
#include "src/kernel/resource/StandardLinkImpl.hpp"
#include "src/kernel/resource/VirtualMachineImpl.hpp"
+#include "src/simgrid/module.hpp"
#include "xbt/asserts.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_platform, kernel, "Kernel platform-related information");
{
auto* engine = s4u::Engine::get_instance();
/* workaroud: first netzoneImpl will be the root netzone.
- * Without globals and with current surf_*_model_description init functions, we need
+ * Without globals and with current model description init functions (see module.hpp), we need
* the root netzone to exist when creating the models.
- * This was usually done at sg_platf.cpp, during XML parsing */
+ * This is usually done at sg_platf.cpp, during XML parsing */
if (not engine->get_netzone_root()) {
engine->set_netzone_root(&piface_);
/* root netzone set, initialize models */
simgrid::s4u::Engine::on_platform_creation();
- /* Initialize the surf models. That must be done after we got all config, and before we need the models.
+ /* Initialize the models. That must be done after we got all config, and before we need the models.
* That is, after the last <config> tag, if any, and before the first of cluster|peer|zone|trace|trace_cb
*
* I'm not sure for <trace> and <trace_cb>, there may be a bug here
* but cluster and peer come down to zone creations, so putting this verification here is correct.
*/
simgrid_host_models().init_from_flag_value();
- surf_vm_model_init_HL13();
+ simgrid_vm_model_init_HL13();
}
xbt_enforce(nullptr == engine->netpoint_by_name_or_null(get_name()),
--- /dev/null
+/* Copyright (c) 2006-2023. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef SURF_SURFXML_PARSE_HPP
+#define SURF_SURFXML_PARSE_HPP
+
+#include <xbt/base.h>
+#include <xbt/signal.hpp>
+#include <vector>
+
+/* Module management functions */
+XBT_PUBLIC void sg_platf_parser_finalize();
+
+XBT_PUBLIC void simgrid_parse_open(const std::string& file);
+XBT_PUBLIC void simgrid_parse_close();
+XBT_PUBLIC void simgrid_parse_assert(bool cond, const std::string& msg);
+XBT_ATTRIB_NORETURN XBT_PUBLIC void simgrid_parse_error(const std::string& msg);
+XBT_PUBLIC void simgrid_parse_assert_netpoint(const std::string& hostname, const std::string& pre,
+ const std::string& post);
+
+XBT_PUBLIC double simgrid_parse_get_double(const std::string& s);
+XBT_PUBLIC int simgrid_parse_get_int(const std::string& s);
+
+XBT_PUBLIC void simgrid_parse(); /* Entry-point to the parser */
+XBT_PUBLIC void parse_platform_file(const std::string& file);
+
+#endif
/* platf_private.h - Interface to the SimGrid platforms which visibility should be limited to this directory */
-/* Copyright (c) 2004-2023. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/host.h"
#include "simgrid/s4u/Link.hpp"
-#include "src/surf/xml/simgrid_dtd.h"
+#include "src/kernel/xml/simgrid_dtd.h"
#include <map>
#include <string>
XBT_PRIVATE void sg_platf_trace_connect(simgrid::kernel::routing::TraceConnectCreationArgs* trace_connect);
/* Prototypes of the functions offered by flex */
-XBT_PUBLIC int surf_parse_lex();
-XBT_PUBLIC int surf_parse_get_lineno();
-XBT_PUBLIC FILE* surf_parse_get_in();
-XBT_PUBLIC FILE* surf_parse_get_out();
-XBT_PUBLIC int surf_parse_get_leng();
-XBT_PUBLIC char* surf_parse_get_text();
-XBT_PUBLIC void surf_parse_set_lineno(int line_number);
-XBT_PUBLIC void surf_parse_set_in(FILE* in_str);
-XBT_PUBLIC void surf_parse_set_out(FILE* out_str);
-XBT_PUBLIC int surf_parse_get_debug();
-XBT_PUBLIC void surf_parse_set_debug(int bdebug);
-XBT_PUBLIC int surf_parse_lex_destroy();
+XBT_PUBLIC int simgrid_parse_lex();
+XBT_PUBLIC int simgrid_parse_get_lineno();
+XBT_PUBLIC FILE* simgrid_parse_get_in();
+XBT_PUBLIC FILE* simgrid_parse_get_out();
+XBT_PUBLIC int simgrid_parse_get_leng();
+XBT_PUBLIC char* simgrid_parse_get_text();
+XBT_PUBLIC void simgrid_parse_set_lineno(int line_number);
+XBT_PUBLIC void simgrid_parse_set_in(FILE* in_str);
+XBT_PUBLIC void simgrid_parse_set_out(FILE* out_str);
+XBT_PUBLIC int simgrid_parse_get_debug();
+XBT_PUBLIC void simgrid_parse_set_debug(int bdebug);
+XBT_PUBLIC int simgrid_parse_lex_destroy();
#endif /* SG_PLATF_H */
#include "src/kernel/resource/DiskImpl.hpp"
#include "src/kernel/resource/HostImpl.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
-#include "src/surf/xml/platf.hpp"
-#include "src/surf/xml/platf_private.hpp"
+#include "src/kernel/xml/platf.hpp"
+#include "src/kernel/xml/platf_private.hpp"
+#include "src/surf/surf_interface.hpp"
#include <algorithm>
#include <string>
/** The current NetZone in the parsing */
static simgrid::kernel::routing::NetZoneImpl* current_routing = nullptr;
-static simgrid::s4u::Host* current_host = nullptr;
+static simgrid::s4u::Host* current_host = nullptr;
/** Module management function: frees all internal data structures */
void sg_platf_parser_finalize()
{
simgrid::kernel::routing::on_cluster_creation.disconnect_slots();
- surf_parse_lex_destroy();
+ simgrid_parse_lex_destroy();
}
/** @brief Add a host to the current NetZone */
/** @brief Create regular Cluster */
static void sg_platf_new_cluster_flat(simgrid::kernel::routing::ClusterCreationArgs* cluster)
{
- auto* zone = simgrid::s4u::create_star_zone(cluster->id);
+ auto* zone = simgrid::s4u::create_star_zone(cluster->id);
if (const auto* parent = current_routing ? current_routing->get_iface() : nullptr)
zone->set_parent(parent);
void sg_platf_new_actor(simgrid::kernel::routing::ActorCreationArgs* actor)
{
const auto* engine = simgrid::s4u::Engine::get_instance();
- sg_host_t host = sg_host_by_name(actor->host);
+ sg_host_t host = sg_host_by_name(actor->host);
if (not host) {
// The requested host does not exist. Do a nice message to the user
std::string msg = std::string("Cannot create actor '") + actor->function + "': host '" + actor->host +
/* A lexical scanner generated by flex */
-#define yy_create_buffer surf_parse__create_buffer
-#define yy_delete_buffer surf_parse__delete_buffer
-#define yy_scan_buffer surf_parse__scan_buffer
-#define yy_scan_string surf_parse__scan_string
-#define yy_scan_bytes surf_parse__scan_bytes
-#define yy_init_buffer surf_parse__init_buffer
-#define yy_flush_buffer surf_parse__flush_buffer
-#define yy_load_buffer_state surf_parse__load_buffer_state
-#define yy_switch_to_buffer surf_parse__switch_to_buffer
-#define yypush_buffer_state surf_parse_push_buffer_state
-#define yypop_buffer_state surf_parse_pop_buffer_state
-#define yyensure_buffer_stack surf_parse_ensure_buffer_stack
-#define yy_flex_debug surf_parse__flex_debug
-#define yyin surf_parse_in
-#define yyleng surf_parse_leng
-#define yylex surf_parse_lex
-#define yylineno surf_parse_lineno
-#define yyout surf_parse_out
-#define yyrestart surf_parse_restart
-#define yytext surf_parse_text
-#define yywrap surf_parse_wrap
-#define yyalloc surf_parse_alloc
-#define yyrealloc surf_parse_realloc
-#define yyfree surf_parse_free
+#define yy_create_buffer simgrid_parse__create_buffer
+#define yy_delete_buffer simgrid_parse__delete_buffer
+#define yy_scan_buffer simgrid_parse__scan_buffer
+#define yy_scan_string simgrid_parse__scan_string
+#define yy_scan_bytes simgrid_parse__scan_bytes
+#define yy_init_buffer simgrid_parse__init_buffer
+#define yy_flush_buffer simgrid_parse__flush_buffer
+#define yy_load_buffer_state simgrid_parse__load_buffer_state
+#define yy_switch_to_buffer simgrid_parse__switch_to_buffer
+#define yypush_buffer_state simgrid_parse_push_buffer_state
+#define yypop_buffer_state simgrid_parse_pop_buffer_state
+#define yyensure_buffer_stack simgrid_parse_ensure_buffer_stack
+#define yy_flex_debug simgrid_parse__flex_debug
+#define yyin simgrid_parse_in
+#define yyleng simgrid_parse_leng
+#define yylex simgrid_parse_lex
+#define yylineno simgrid_parse_lineno
+#define yyout simgrid_parse_out
+#define yyrestart simgrid_parse_restart
+#define yytext simgrid_parse_text
+#define yywrap simgrid_parse_wrap
+#define yyalloc simgrid_parse_alloc
+#define yyrealloc simgrid_parse_realloc
+#define yyfree simgrid_parse_free
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#endif
#ifdef yy_create_buffer
-#define surf_parse__create_buffer_ALREADY_DEFINED
+#define simgrid_parse__create_buffer_ALREADY_DEFINED
#else
-#define yy_create_buffer surf_parse__create_buffer
+#define yy_create_buffer simgrid_parse__create_buffer
#endif
#ifdef yy_delete_buffer
-#define surf_parse__delete_buffer_ALREADY_DEFINED
+#define simgrid_parse__delete_buffer_ALREADY_DEFINED
#else
-#define yy_delete_buffer surf_parse__delete_buffer
+#define yy_delete_buffer simgrid_parse__delete_buffer
#endif
#ifdef yy_scan_buffer
-#define surf_parse__scan_buffer_ALREADY_DEFINED
+#define simgrid_parse__scan_buffer_ALREADY_DEFINED
#else
-#define yy_scan_buffer surf_parse__scan_buffer
+#define yy_scan_buffer simgrid_parse__scan_buffer
#endif
#ifdef yy_scan_string
-#define surf_parse__scan_string_ALREADY_DEFINED
+#define simgrid_parse__scan_string_ALREADY_DEFINED
#else
-#define yy_scan_string surf_parse__scan_string
+#define yy_scan_string simgrid_parse__scan_string
#endif
#ifdef yy_scan_bytes
-#define surf_parse__scan_bytes_ALREADY_DEFINED
+#define simgrid_parse__scan_bytes_ALREADY_DEFINED
#else
-#define yy_scan_bytes surf_parse__scan_bytes
+#define yy_scan_bytes simgrid_parse__scan_bytes
#endif
#ifdef yy_init_buffer
-#define surf_parse__init_buffer_ALREADY_DEFINED
+#define simgrid_parse__init_buffer_ALREADY_DEFINED
#else
-#define yy_init_buffer surf_parse__init_buffer
+#define yy_init_buffer simgrid_parse__init_buffer
#endif
#ifdef yy_flush_buffer
-#define surf_parse__flush_buffer_ALREADY_DEFINED
+#define simgrid_parse__flush_buffer_ALREADY_DEFINED
#else
-#define yy_flush_buffer surf_parse__flush_buffer
+#define yy_flush_buffer simgrid_parse__flush_buffer
#endif
#ifdef yy_load_buffer_state
-#define surf_parse__load_buffer_state_ALREADY_DEFINED
+#define simgrid_parse__load_buffer_state_ALREADY_DEFINED
#else
-#define yy_load_buffer_state surf_parse__load_buffer_state
+#define yy_load_buffer_state simgrid_parse__load_buffer_state
#endif
#ifdef yy_switch_to_buffer
-#define surf_parse__switch_to_buffer_ALREADY_DEFINED
+#define simgrid_parse__switch_to_buffer_ALREADY_DEFINED
#else
-#define yy_switch_to_buffer surf_parse__switch_to_buffer
+#define yy_switch_to_buffer simgrid_parse__switch_to_buffer
#endif
#ifdef yypush_buffer_state
-#define surf_parse_push_buffer_state_ALREADY_DEFINED
+#define simgrid_parse_push_buffer_state_ALREADY_DEFINED
#else
-#define yypush_buffer_state surf_parse_push_buffer_state
+#define yypush_buffer_state simgrid_parse_push_buffer_state
#endif
#ifdef yypop_buffer_state
-#define surf_parse_pop_buffer_state_ALREADY_DEFINED
+#define simgrid_parse_pop_buffer_state_ALREADY_DEFINED
#else
-#define yypop_buffer_state surf_parse_pop_buffer_state
+#define yypop_buffer_state simgrid_parse_pop_buffer_state
#endif
#ifdef yyensure_buffer_stack
-#define surf_parse_ensure_buffer_stack_ALREADY_DEFINED
+#define simgrid_parse_ensure_buffer_stack_ALREADY_DEFINED
#else
-#define yyensure_buffer_stack surf_parse_ensure_buffer_stack
+#define yyensure_buffer_stack simgrid_parse_ensure_buffer_stack
#endif
#ifdef yylex
-#define surf_parse_lex_ALREADY_DEFINED
+#define simgrid_parse_lex_ALREADY_DEFINED
#else
-#define yylex surf_parse_lex
+#define yylex simgrid_parse_lex
#endif
#ifdef yyrestart
-#define surf_parse_restart_ALREADY_DEFINED
+#define simgrid_parse_restart_ALREADY_DEFINED
#else
-#define yyrestart surf_parse_restart
+#define yyrestart simgrid_parse_restart
#endif
#ifdef yylex_init
-#define surf_parse_lex_init_ALREADY_DEFINED
+#define simgrid_parse_lex_init_ALREADY_DEFINED
#else
-#define yylex_init surf_parse_lex_init
+#define yylex_init simgrid_parse_lex_init
#endif
#ifdef yylex_init_extra
-#define surf_parse_lex_init_extra_ALREADY_DEFINED
+#define simgrid_parse_lex_init_extra_ALREADY_DEFINED
#else
-#define yylex_init_extra surf_parse_lex_init_extra
+#define yylex_init_extra simgrid_parse_lex_init_extra
#endif
#ifdef yylex_destroy
-#define surf_parse_lex_destroy_ALREADY_DEFINED
+#define simgrid_parse_lex_destroy_ALREADY_DEFINED
#else
-#define yylex_destroy surf_parse_lex_destroy
+#define yylex_destroy simgrid_parse_lex_destroy
#endif
#ifdef yyget_debug
-#define surf_parse_get_debug_ALREADY_DEFINED
+#define simgrid_parse_get_debug_ALREADY_DEFINED
#else
-#define yyget_debug surf_parse_get_debug
+#define yyget_debug simgrid_parse_get_debug
#endif
#ifdef yyset_debug
-#define surf_parse_set_debug_ALREADY_DEFINED
+#define simgrid_parse_set_debug_ALREADY_DEFINED
#else
-#define yyset_debug surf_parse_set_debug
+#define yyset_debug simgrid_parse_set_debug
#endif
#ifdef yyget_extra
-#define surf_parse_get_extra_ALREADY_DEFINED
+#define simgrid_parse_get_extra_ALREADY_DEFINED
#else
-#define yyget_extra surf_parse_get_extra
+#define yyget_extra simgrid_parse_get_extra
#endif
#ifdef yyset_extra
-#define surf_parse_set_extra_ALREADY_DEFINED
+#define simgrid_parse_set_extra_ALREADY_DEFINED
#else
-#define yyset_extra surf_parse_set_extra
+#define yyset_extra simgrid_parse_set_extra
#endif
#ifdef yyget_in
-#define surf_parse_get_in_ALREADY_DEFINED
+#define simgrid_parse_get_in_ALREADY_DEFINED
#else
-#define yyget_in surf_parse_get_in
+#define yyget_in simgrid_parse_get_in
#endif
#ifdef yyset_in
-#define surf_parse_set_in_ALREADY_DEFINED
+#define simgrid_parse_set_in_ALREADY_DEFINED
#else
-#define yyset_in surf_parse_set_in
+#define yyset_in simgrid_parse_set_in
#endif
#ifdef yyget_out
-#define surf_parse_get_out_ALREADY_DEFINED
+#define simgrid_parse_get_out_ALREADY_DEFINED
#else
-#define yyget_out surf_parse_get_out
+#define yyget_out simgrid_parse_get_out
#endif
#ifdef yyset_out
-#define surf_parse_set_out_ALREADY_DEFINED
+#define simgrid_parse_set_out_ALREADY_DEFINED
#else
-#define yyset_out surf_parse_set_out
+#define yyset_out simgrid_parse_set_out
#endif
#ifdef yyget_leng
-#define surf_parse_get_leng_ALREADY_DEFINED
+#define simgrid_parse_get_leng_ALREADY_DEFINED
#else
-#define yyget_leng surf_parse_get_leng
+#define yyget_leng simgrid_parse_get_leng
#endif
#ifdef yyget_text
-#define surf_parse_get_text_ALREADY_DEFINED
+#define simgrid_parse_get_text_ALREADY_DEFINED
#else
-#define yyget_text surf_parse_get_text
+#define yyget_text simgrid_parse_get_text
#endif
#ifdef yyget_lineno
-#define surf_parse_get_lineno_ALREADY_DEFINED
+#define simgrid_parse_get_lineno_ALREADY_DEFINED
#else
-#define yyget_lineno surf_parse_get_lineno
+#define yyget_lineno simgrid_parse_get_lineno
#endif
#ifdef yyset_lineno
-#define surf_parse_set_lineno_ALREADY_DEFINED
+#define simgrid_parse_set_lineno_ALREADY_DEFINED
#else
-#define yyset_lineno surf_parse_set_lineno
+#define yyset_lineno simgrid_parse_set_lineno
#endif
#ifdef yywrap
-#define surf_parse_wrap_ALREADY_DEFINED
+#define simgrid_parse_wrap_ALREADY_DEFINED
#else
-#define yywrap surf_parse_wrap
+#define yywrap simgrid_parse_wrap
#endif
#ifdef yyalloc
-#define surf_parse_alloc_ALREADY_DEFINED
+#define simgrid_parse_alloc_ALREADY_DEFINED
#else
-#define yyalloc surf_parse_alloc
+#define yyalloc simgrid_parse_alloc
#endif
#ifdef yyrealloc
-#define surf_parse_realloc_ALREADY_DEFINED
+#define simgrid_parse_realloc_ALREADY_DEFINED
#else
-#define yyrealloc surf_parse_realloc
+#define yyrealloc simgrid_parse_realloc
#endif
#ifdef yyfree
-#define surf_parse_free_ALREADY_DEFINED
+#define simgrid_parse_free_ALREADY_DEFINED
#else
-#define yyfree surf_parse_free
+#define yyfree simgrid_parse_free
#endif
#ifdef yytext
-#define surf_parse_text_ALREADY_DEFINED
+#define simgrid_parse_text_ALREADY_DEFINED
#else
-#define yytext surf_parse_text
+#define yytext simgrid_parse_text
#endif
#ifdef yyleng
-#define surf_parse_leng_ALREADY_DEFINED
+#define simgrid_parse_leng_ALREADY_DEFINED
#else
-#define yyleng surf_parse_leng
+#define yyleng simgrid_parse_leng
#endif
#ifdef yyin
-#define surf_parse_in_ALREADY_DEFINED
+#define simgrid_parse_in_ALREADY_DEFINED
#else
-#define yyin surf_parse_in
+#define yyin simgrid_parse_in
#endif
#ifdef yyout
-#define surf_parse_out_ALREADY_DEFINED
+#define simgrid_parse_out_ALREADY_DEFINED
#else
-#define yyout surf_parse_out
+#define yyout simgrid_parse_out
#endif
#ifdef yy_flex_debug
-#define surf_parse__flex_debug_ALREADY_DEFINED
+#define simgrid_parse__flex_debug_ALREADY_DEFINED
#else
-#define yy_flex_debug surf_parse__flex_debug
+#define yy_flex_debug simgrid_parse__flex_debug
#endif
#ifdef yylineno
-#define surf_parse_lineno_ALREADY_DEFINED
+#define simgrid_parse_lineno_ALREADY_DEFINED
#else
-#define yylineno surf_parse_lineno
+#define yylineno simgrid_parse_lineno
#endif
/* First, we deal with platform-specific or compiler-specific issues. */
/* Begin user sect3 */
-#define surf_parse_wrap() (/*CONSTCOND*/1)
+#define simgrid_parse_wrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
typedef flex_uint8_t YY_CHAR;
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
-/* Validating XML processor for src/surf/xml/simgrid.dtd.
+/* Validating XML processor for src/kernel/xml/simgrid.dtd.
*
* This program was generated with the FleXML XML processor generator.
* FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
if (!AX_simgrid_parse_backbone_latency) FAIL("Required attribute `latency' not set for `backbone' element.");
LEAVE; STag_simgrid_parse_backbone(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_backbone(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break;
}
ETag_simgrid_parse_backbone();
popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break;
}
if (!AX_simgrid_parse_cabinet_suffix) FAIL("Required attribute `suffix' not set for `cabinet' element.");
LEAVE; STag_simgrid_parse_cabinet(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_cabinet(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break;
case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break;
case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
ETag_simgrid_parse_cabinet();
popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break;
case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break;
case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
if (!AX_simgrid_parse_include_file) FAIL("Required attribute `file' not set for `include' element.");
LEAVE; STag_simgrid_parse_include(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_include(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break;
case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break;
case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
ETag_simgrid_parse_include();
popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break;
case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break;
case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
if (!AX_simgrid_parse_link_id) FAIL("Required attribute `id' not set for `link' element.");
LEAVE; STag_simgrid_parse_link(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_link(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break;
}
ETag_simgrid_parse_link();
popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: case S_simgrid_parse_AS_3: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: case S_simgrid_parse_AS_6: SET(S_simgrid_parse_AS_6); break;
case S_simgrid_parse_zone: case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: case S_simgrid_parse_zone_6: SET(S_simgrid_parse_zone_6); break;
}
if (!AX_simgrid_parse_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
LEAVE; STag_simgrid_parse_trace(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_trace(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break;
- case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_16); break;
- case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break;
- case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break;
+ case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: SET(S_simgrid_parse_AS_16); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break;
case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break;
case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break;
- case S_simgrid_parse_zone: case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: SET(S_simgrid_parse_zone_11); break;
- case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
- case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: case S_simgrid_parse_zone_1: SET(S_simgrid_parse_zone_16); break;
- case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break;
- case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break;
+ case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_11); break;
+ case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: SET(S_simgrid_parse_zone_14); break;
+ case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: SET(S_simgrid_parse_zone_16); break;
+ case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break;
+ case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: SET(S_simgrid_parse_zone_9); break;
}
}
YY_BREAK
simgrid_parse_pcdata_ix = popbuffer();
popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break;
- case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_16); break;
- case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break;
- case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break;
+ case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: SET(S_simgrid_parse_AS_16); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break;
case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break;
case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break;
- case S_simgrid_parse_zone: case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: SET(S_simgrid_parse_zone_11); break;
- case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
- case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: case S_simgrid_parse_zone_1: SET(S_simgrid_parse_zone_16); break;
- case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break;
- case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break;
+ case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_11); break;
+ case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: SET(S_simgrid_parse_zone_14); break;
+ case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: SET(S_simgrid_parse_zone_16); break;
+ case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break;
+ case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: SET(S_simgrid_parse_zone_9); break;
}
}
YY_BREAK
if (!AX_simgrid_parse_trace___connect_trace) FAIL("Required attribute `trace' not set for `trace_connect' element.");
LEAVE; STag_simgrid_parse_trace___connect(); simgrid_parse_pcdata_ix = 0; ETag_simgrid_parse_trace___connect(); popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break;
- case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_16); break;
- case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break;
- case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break;
+ case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: SET(S_simgrid_parse_AS_16); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break;
case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break;
case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break;
- case S_simgrid_parse_zone: case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: SET(S_simgrid_parse_zone_11); break;
- case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
- case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: case S_simgrid_parse_zone_1: SET(S_simgrid_parse_zone_16); break;
- case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break;
- case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break;
+ case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_11); break;
+ case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: SET(S_simgrid_parse_zone_14); break;
+ case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: SET(S_simgrid_parse_zone_16); break;
+ case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break;
+ case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: SET(S_simgrid_parse_zone_9); break;
}
}
YY_BREAK
ETag_simgrid_parse_trace___connect();
popbuffer(); /* attribute */
switch (YY_START) {
- case S_simgrid_parse_AS: case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break;
- case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: SET(S_simgrid_parse_AS_14); break;
- case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_16); break;
- case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break;
- case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break;
+ case S_simgrid_parse_AS_10: case S_simgrid_parse_AS_11: case S_simgrid_parse_AS_6: case S_simgrid_parse_AS_7: case S_simgrid_parse_AS_9: SET(S_simgrid_parse_AS_11); break;
+ case S_simgrid_parse_AS_13: case S_simgrid_parse_AS_14: case S_simgrid_parse_AS_1: SET(S_simgrid_parse_AS_14); break;
+ case S_simgrid_parse_AS_12: case S_simgrid_parse_AS_15: case S_simgrid_parse_AS_16: SET(S_simgrid_parse_AS_16); break;
+ case S_simgrid_parse_AS: case S_simgrid_parse_AS_3: case S_simgrid_parse_AS_5: SET(S_simgrid_parse_AS_6); break;
+ case S_simgrid_parse_AS_4: case S_simgrid_parse_AS_8: SET(S_simgrid_parse_AS_9); break;
case S_simgrid_parse_include: case S_simgrid_parse_include_1: case S_simgrid_parse_include_2: SET(S_simgrid_parse_include_2); break;
case S_simgrid_parse_platform: case S_simgrid_parse_platform_1: case S_simgrid_parse_platform_3: case S_simgrid_parse_platform_5: case S_simgrid_parse_platform_6: SET(S_simgrid_parse_platform_6); break;
- case S_simgrid_parse_zone: case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: SET(S_simgrid_parse_zone_11); break;
- case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: case S_simgrid_parse_zone_3: SET(S_simgrid_parse_zone_14); break;
- case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: case S_simgrid_parse_zone_1: SET(S_simgrid_parse_zone_16); break;
- case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break;
- case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_9); break;
+ case S_simgrid_parse_zone_10: case S_simgrid_parse_zone_11: case S_simgrid_parse_zone_6: case S_simgrid_parse_zone_7: case S_simgrid_parse_zone_9: SET(S_simgrid_parse_zone_11); break;
+ case S_simgrid_parse_zone_13: case S_simgrid_parse_zone_14: SET(S_simgrid_parse_zone_14); break;
+ case S_simgrid_parse_zone: case S_simgrid_parse_zone_12: case S_simgrid_parse_zone_15: case S_simgrid_parse_zone_16: SET(S_simgrid_parse_zone_16); break;
+ case S_simgrid_parse_zone_1: case S_simgrid_parse_zone_5: SET(S_simgrid_parse_zone_6); break;
+ case S_simgrid_parse_zone_3: case S_simgrid_parse_zone_4: case S_simgrid_parse_zone_8: SET(S_simgrid_parse_zone_9); break;
}
}
YY_BREAK
#ifndef FLEXML_quiet_parser
/* print directly to sdterr */
- surf_parse_error(flexml_err_msg);
+ simgrid_parse_error(flexml_err_msg);
flexml_err_msg[0] = '\0';
#endif
-/* XML processor/application API for src/surf/xml/simgrid.dtd.
+/* XML processor/application API for src/kernel/xml/simgrid.dtd.
*
* This program was generated with the FleXML XML processor generator.
* FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
#include "src/kernel/resource/CpuImpl.hpp"
#include "src/kernel/resource/LinkImpl.hpp"
-#include "src/surf/xml/platf.hpp"
-#include "src/surf/xml/platf_private.hpp"
+#include "src/kernel/xml/platf.hpp"
+#include "src/kernel/xml/platf_private.hpp"
#include <vector>
void sg_platf_trace_connect(simgrid::kernel::routing::TraceConnectCreationArgs* trace_connect)
{
- surf_parse_assert(traces_set_list.find(trace_connect->trace) != traces_set_list.end(),
- "Cannot connect trace " + trace_connect->trace + " to " + trace_connect->element +
- ": trace unknown");
+ simgrid_parse_assert(traces_set_list.find(trace_connect->trace) != traces_set_list.end(),
+ "Cannot connect trace " + trace_connect->trace + " to " + trace_connect->element +
+ ": trace unknown");
switch (trace_connect->kind) {
case simgrid::kernel::routing::TraceConnectKind::HOST_AVAIL:
trace_connect_list_link_lat.try_emplace(trace_connect->trace, trace_connect->element);
break;
default:
- surf_parse_error("Cannot connect trace " + trace_connect->trace + " to " + trace_connect->element +
- ": unknown kind of trace");
+ simgrid_parse_error("Cannot connect trace " + trace_connect->trace + " to " + trace_connect->element +
+ ": unknown kind of trace");
}
}
void parse_platform_file(const std::string& file)
{
/* init the flex parser */
- surf_parse_open(file);
+ simgrid_parse_open(file);
/* Do the actual parsing */
- surf_parse();
+ simgrid_parse();
/* Get the Engine singleton once and for all*/
const auto engine = simgrid::s4u::Engine::get_instance();
/* connect all profiles relative to hosts */
for (auto const& [trace, name] : trace_connect_list_host_avail) {
- surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
- "<trace_connect kind=\"HOST_AVAIL\">: Trace " + trace + " undefined.");
+ simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
+ "<trace_connect kind=\"HOST_AVAIL\">: Trace " + trace + " undefined.");
auto profile = traces_set_list.at(trace);
auto host = engine->host_by_name_or_null(name);
- surf_parse_assert(host, "<trace_connect kind=\"HOST_AVAIL\">: Host " + name + " undefined.");
+ simgrid_parse_assert(host, "<trace_connect kind=\"HOST_AVAIL\">: Host " + name + " undefined.");
host->set_state_profile(profile);
}
for (auto const& [trace, name] : trace_connect_list_host_speed) {
- surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
- "<trace_connect kind=\"SPEED\">: Trace " + trace + " undefined.");
+ simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
+ "<trace_connect kind=\"SPEED\">: Trace " + trace + " undefined.");
auto profile = traces_set_list.at(trace);
auto host = engine->host_by_name_or_null(name);
- surf_parse_assert(host, "<trace_connect kind=\"SPEED\">: Host " + name + " undefined.");
+ simgrid_parse_assert(host, "<trace_connect kind=\"SPEED\">: Host " + name + " undefined.");
host->set_speed_profile(profile);
}
for (auto const& [trace, name] : trace_connect_list_link_avail) {
- surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
- "<trace_connect kind=\"LINK_AVAIL\">: Trace " + trace + " undefined.");
+ simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
+ "<trace_connect kind=\"LINK_AVAIL\">: Trace " + trace + " undefined.");
auto profile = traces_set_list.at(trace);
auto link = engine->link_by_name_or_null(name);
- surf_parse_assert(link, "<trace_connect kind=\"LINK_AVAIL\">: Link " + name + " undefined.");
+ simgrid_parse_assert(link, "<trace_connect kind=\"LINK_AVAIL\">: Link " + name + " undefined.");
link->set_state_profile(profile);
}
for (auto const& [trace, name] : trace_connect_list_link_bw) {
- surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
- "<trace_connect kind=\"BANDWIDTH\">: Trace " + trace + " undefined.");
+ simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
+ "<trace_connect kind=\"BANDWIDTH\">: Trace " + trace + " undefined.");
auto profile = traces_set_list.at(trace);
auto link = engine->link_by_name_or_null(name);
- surf_parse_assert(link, "<trace_connect kind=\"BANDWIDTH\">: Link " + name + " undefined.");
+ simgrid_parse_assert(link, "<trace_connect kind=\"BANDWIDTH\">: Link " + name + " undefined.");
link->set_bandwidth_profile(profile);
}
for (auto const& [trace, name] : trace_connect_list_link_lat) {
- surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
- "<trace_connect kind=\"LATENCY\">: Trace " + trace + " undefined.");
+ simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(),
+ "<trace_connect kind=\"LATENCY\">: Trace " + trace + " undefined.");
auto profile = traces_set_list.at(trace);
auto link = engine->link_by_name_or_null(name);
- surf_parse_assert(link, "<trace_connect kind=\"LATENCY\">: Link " + name + " undefined.");
+ simgrid_parse_assert(link, "<trace_connect kind=\"LATENCY\">: Link " + name + " undefined.");
link->set_latency_profile(profile);
}
- surf_parse_close();
+ simgrid_parse_close();
}
#include "src/kernel/resource/LinkImpl.hpp"
#include "src/kernel/resource/profile/FutureEvtSet.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
-#include "src/surf/xml/platf.hpp"
-#include "src/surf/xml/platf_private.hpp"
+#include "src/kernel/xml/platf.hpp"
+#include "src/kernel/xml/platf_private.hpp"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(platf_parse, ker_platform, "Logging specific to the parsing of platform files");
-std::string surf_parsed_filename; // Currently parsed file (for the error messages)
+std::string simgrid_parsed_filename; // Currently parsed file (for the error messages)
static std::vector<simgrid::s4u::LinkInRoute> parsed_link_list; /* temporary store of current link list of a route */
/* Helping functions */
-void surf_parse_assert(bool cond, const std::string& msg)
+void simgrid_parse_assert(bool cond, const std::string& msg)
{
if (not cond)
- surf_parse_error(msg);
+ simgrid_parse_error(msg);
}
-void surf_parse_error(const std::string& msg)
+void simgrid_parse_error(const std::string& msg)
{
- throw simgrid::ParseError(surf_parsed_filename, surf_parse_lineno, msg);
+ throw simgrid::ParseError(simgrid_parsed_filename, simgrid_parse_lineno, msg);
}
-void surf_parse_assert_netpoint(const std::string& hostname, const std::string& pre, const std::string& post)
+void simgrid_parse_assert_netpoint(const std::string& hostname, const std::string& pre, const std::string& post)
{
if (simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(hostname) != nullptr) // found
return;
break;
}
}
- surf_parse_error(msg);
+ simgrid_parse_error(msg);
}
-double surf_parse_get_double(const std::string& s)
+double simgrid_parse_get_double(const std::string& s)
{
try {
return std::stod(s);
} catch (const std::invalid_argument&) {
- surf_parse_error(s + " is not a double");
+ simgrid_parse_error(s + " is not a double");
}
}
-int surf_parse_get_int(const std::string& s)
+int simgrid_parse_get_int(const std::string& s)
{
try {
return std::stoi(s);
} catch (const std::invalid_argument&) {
- surf_parse_error(s + " is not an int");
+ simgrid_parse_error(s + " is not an int");
}
}
for (auto const& group : radical_elements) {
std::vector<std::string> radical_ends;
boost::split(radical_ends, group, boost::is_any_of("-"));
- int start = surf_parse_get_int(radical_ends.front());
+ int start = simgrid_parse_get_int(radical_ends.front());
int end = 0;
switch (radical_ends.size()) {
end = start;
break;
case 2:
- end = surf_parse_get_int(radical_ends.back());
+ end = simgrid_parse_get_int(radical_ends.back());
break;
default:
- surf_parse_error("Malformed radical: " + group);
+ simgrid_parse_error("Malformed radical: " + group);
}
for (int i = start; i <= end; i++)
exploded->push_back(i);
static std::vector<std::unordered_map<std::string, std::string>> property_sets;
-static FILE* surf_file_to_parse = nullptr;
+static FILE* file_to_parse = nullptr;
/* Stuff relative to storage */
void STag_simgrid_parse_storage()
void STag_simgrid_parse_platform() {
/* Use fixed point arithmetic to avoid rounding errors ("4.1" for example cannot be represented exactly as a floating
* point number) */
- const long int version = lround(100.0 * surf_parse_get_double(A_simgrid_parse_platform_version));
+ const long int version = lround(100.0 * simgrid_parse_get_double(A_simgrid_parse_platform_version));
const std::string version_string = std::to_string(version / 100) + "." + std::to_string(version % 100);
- surf_parse_assert(version >= 100L, "******* BIG FAT WARNING *********\n "
- "You're using an ancient XML file.\n"
- "Since SimGrid 3.1, units are Bytes, Flops, and seconds "
- "instead of MBytes, MFlops and seconds.\n"
-
- "Use simgrid_update_xml to update your file automatically. "
- "This program is installed automatically with SimGrid, or "
- "available in the tools/ directory of the source archive.\n"
-
- "Please check also out the SURF section of the ChangeLog for "
- "the 3.1 version for more information.");
- surf_parse_assert(version >= 300L, "******* BIG FAT WARNING *********\n "
- "You're using an old XML file.\n"
- "Use simgrid_update_xml to update your file automatically. "
- "This program is installed automatically with SimGrid, or "
- "available in the tools/ directory of the source archive.");
- surf_parse_assert(
+ simgrid_parse_assert(version >= 100L, "******* BIG FAT WARNING *********\n "
+ "You're using an ancient XML file.\n"
+ "Since SimGrid 3.1, units are Bytes, Flops, and seconds "
+ "instead of MBytes, MFlops and seconds.\n"
+
+ "Use simgrid_update_xml to update your file automatically. "
+ "This program is installed automatically with SimGrid, or "
+ "available in the tools/ directory of the source archive.\n"
+
+ "Please check also out the SURF section of the ChangeLog for "
+ "the 3.1 version for more information.");
+ simgrid_parse_assert(version >= 300L, "******* BIG FAT WARNING *********\n "
+ "You're using an old XML file.\n"
+ "Use simgrid_update_xml to update your file automatically. "
+ "This program is installed automatically with SimGrid, or "
+ "available in the tools/ directory of the source archive.");
+ simgrid_parse_assert(
version >= 400L,
"******* THIS FILE IS TOO OLD (v:" + version_string +
") *********\n "
"Use simgrid_update_xml to update your file automatically to get rid of this warning. "
"This program is installed automatically with SimGrid, or "
"available in the tools/ directory of the source archive.",
- version_string.c_str(), surf_parsed_filename.c_str());
+ version_string.c_str(), simgrid_parsed_filename.c_str());
}
- surf_parse_assert(version <= 410L, "******* THIS FILE COMES FROM THE FUTURE (v:" + version_string +
- ") *********\n "
- "The most recent formalism that this version of SimGrid understands is v4.1.\n"
- "Please update your code, or use another, more adapted, file.");
+ simgrid_parse_assert(version <= 410L,
+ "******* THIS FILE COMES FROM THE FUTURE (v:" + version_string +
+ ") *********\n "
+ "The most recent formalism that this version of SimGrid understands is v4.1.\n"
+ "Please update your code, or use another, more adapted, file.");
}
void ETag_simgrid_parse_platform(){
simgrid::s4u::Engine::on_platform_created();
property_sets.emplace_back();
host.id = A_simgrid_parse_host_id;
- host.speed_per_pstate = xbt_parse_get_all_speeds(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_host_speed,
- "speed of host " + host.id);
+ host.speed_per_pstate = xbt_parse_get_all_speeds(simgrid_parsed_filename, simgrid_parse_lineno,
+ A_simgrid_parse_host_speed, "speed of host " + host.id);
XBT_DEBUG("pstate: %s", A_simgrid_parse_host_pstate);
- host.core_amount = surf_parse_get_int(A_simgrid_parse_host_core);
+ host.core_amount = simgrid_parse_get_int(A_simgrid_parse_host_core);
if (A_simgrid_parse_host_availability___file[0] != '\0') {
XBT_WARN("The availability_file attribute in <host> is now deprecated. Please, use 'speed_file' instead.");
sg_platf_new_host_set_properties(property_sets.back());
property_sets.pop_back();
- sg_platf_new_host_seal(surf_parse_get_int(A_simgrid_parse_host_pstate));
+ sg_platf_new_host_seal(simgrid_parse_get_int(A_simgrid_parse_host_pstate));
}
void STag_simgrid_parse_disk() {
property_sets.pop_back();
disk.id = A_simgrid_parse_disk_id;
- disk.read_bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_disk_read___bw,
- "read_bw of disk " + disk.id);
- disk.write_bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_disk_write___bw,
- "write_bw of disk " + disk.id);
+ disk.read_bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_disk_read___bw,
+ "read_bw of disk " + disk.id);
+ disk.write_bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno,
+ A_simgrid_parse_disk_write___bw, "write_bw of disk " + disk.id);
sg_platf_new_disk(&disk);
}
cluster.suffix = A_simgrid_parse_cluster_suffix;
explodesRadical(A_simgrid_parse_cluster_radical, &cluster.radicals);
- cluster.speeds = xbt_parse_get_all_speeds(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cluster_speed,
- "speed of cluster " + cluster.id);
- cluster.core_amount = surf_parse_get_int(A_simgrid_parse_cluster_core);
- cluster.bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cluster_bw,
- "bw of cluster " + cluster.id);
- cluster.lat = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cluster_lat,
+ cluster.speeds = xbt_parse_get_all_speeds(simgrid_parsed_filename, simgrid_parse_lineno,
+ A_simgrid_parse_cluster_speed, "speed of cluster " + cluster.id);
+ cluster.core_amount = simgrid_parse_get_int(A_simgrid_parse_cluster_core);
+ cluster.bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_bw,
+ "bw of cluster " + cluster.id);
+ cluster.lat = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_lat,
"lat of cluster " + cluster.id);
if(strcmp(A_simgrid_parse_cluster_bb___bw,""))
- cluster.bb_bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cluster_bb___bw,
- "bb_bw of cluster " + cluster.id);
+ cluster.bb_bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno,
+ A_simgrid_parse_cluster_bb___bw, "bb_bw of cluster " + cluster.id);
if(strcmp(A_simgrid_parse_cluster_bb___lat,""))
- cluster.bb_lat = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cluster_bb___lat,
+ cluster.bb_lat = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_bb___lat,
"bb_lat of cluster " + cluster.id);
if(strcmp(A_simgrid_parse_cluster_limiter___link,""))
cluster.limiter_link =
- xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cluster_limiter___link,
+ xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_limiter___link,
"limiter_link of cluster " + cluster.id);
if(strcmp(A_simgrid_parse_cluster_loopback___bw,""))
cluster.loopback_bw =
- xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cluster_loopback___bw,
+ xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_loopback___bw,
"loopback_bw of cluster " + cluster.id);
if(strcmp(A_simgrid_parse_cluster_loopback___lat,""))
- cluster.loopback_lat = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cluster_loopback___lat,
- "loopback_lat of cluster " + cluster.id);
+ cluster.loopback_lat =
+ xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cluster_loopback___lat,
+ "loopback_lat of cluster " + cluster.id);
switch(AX_simgrid_parse_cluster_topology){
case A_simgrid_parse_cluster_topology_FLAT:
cluster.topology = simgrid::kernel::routing::ClusterTopology::DRAGONFLY;
break;
default:
- surf_parse_error("Invalid cluster topology for cluster " + cluster.id);
+ simgrid_parse_error("Invalid cluster topology for cluster " + cluster.id);
}
cluster.topo_parameters = A_simgrid_parse_cluster_topo___parameters;
cluster.router_id = A_simgrid_parse_cluster_router___id;
cluster.sharing_policy = simgrid::s4u::Link::SharingPolicy::FATPIPE;
break;
default:
- surf_parse_error("Invalid cluster sharing policy for cluster " + cluster.id);
+ simgrid_parse_error("Invalid cluster sharing policy for cluster " + cluster.id);
}
switch (AX_simgrid_parse_cluster_bb___sharing___policy) {
case A_simgrid_parse_cluster_bb___sharing___policy_FATPIPE:
cluster.bb_sharing_policy = simgrid::s4u::Link::SharingPolicy::SHARED;
break;
default:
- surf_parse_error("Invalid bb sharing policy in cluster " + cluster.id);
+ simgrid_parse_error("Invalid bb sharing policy in cluster " + cluster.id);
}
sg_platf_new_tag_cluster(&cluster);
cabinet.id = A_simgrid_parse_cabinet_id;
cabinet.prefix = A_simgrid_parse_cabinet_prefix;
cabinet.suffix = A_simgrid_parse_cabinet_suffix;
- cabinet.speed = xbt_parse_get_speed(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cabinet_speed,
- "speed of cabinet " + cabinet.id);
- cabinet.bw = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cabinet_bw,
- "bw of cabinet " + cabinet.id);
- cabinet.lat = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_cabinet_lat,
- "lat of cabinet " + cabinet.id);
+ cabinet.speed = xbt_parse_get_speed(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cabinet_speed,
+ "speed of cabinet " + cabinet.id);
+ cabinet.bw = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cabinet_bw,
+ "bw of cabinet " + cabinet.id);
+ cabinet.lat = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_cabinet_lat,
+ "lat of cabinet " + cabinet.id);
explodesRadical(A_simgrid_parse_cabinet_radical, &cabinet.radicals);
sg_platf_new_cabinet(&cabinet);
simgrid::kernel::routing::PeerCreationArgs peer;
peer.id = A_simgrid_parse_peer_id;
- peer.speed =
- xbt_parse_get_speed(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_peer_speed, "speed of peer " + peer.id);
- peer.bw_in = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_peer_bw___in,
- "bw_in of peer " + peer.id);
- peer.bw_out = xbt_parse_get_bandwidth(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_peer_bw___out,
+ peer.speed = xbt_parse_get_speed(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_peer_speed,
+ "speed of peer " + peer.id);
+ peer.bw_in = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_peer_bw___in,
+ "bw_in of peer " + peer.id);
+ peer.bw_out = xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_peer_bw___out,
"bw_out of peer " + peer.id);
peer.coord = A_simgrid_parse_peer_coordinates;
peer.speed_trace = nullptr;
property_sets.pop_back();
link.id = A_simgrid_parse_link_id;
- link.bandwidths = xbt_parse_get_bandwidths(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_link_bandwidth,
- "bandwidth of link " + link.id);
+ link.bandwidths = xbt_parse_get_bandwidths(simgrid_parsed_filename, simgrid_parse_lineno,
+ A_simgrid_parse_link_bandwidth, "bandwidth of link " + link.id);
link.bandwidth_trace = A_simgrid_parse_link_bandwidth___file[0]
? simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_link_bandwidth___file)
: nullptr;
- link.latency =
- xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_link_latency, "latency of link " + link.id);
+ link.latency = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_link_latency,
+ "latency of link " + link.id);
link.latency_trace = A_simgrid_parse_link_latency___file[0]
? simgrid::kernel::profile::ProfileBuilder::from_file(A_simgrid_parse_link_latency___file)
: nullptr;
link.policy = simgrid::s4u::Link::SharingPolicy::WIFI;
break;
default:
- surf_parse_error("Invalid sharing policy in link " + link.id);
+ simgrid_parse_error("Invalid sharing policy in link " + link.id);
}
sg_platf_new_link(&link);
direction = simgrid::s4u::LinkInRoute::Direction::DOWN;
break;
default:
- surf_parse_error(std::string("Invalid direction for link ") + A_simgrid_parse_link___ctn_id);
+ simgrid_parse_error(std::string("Invalid direction for link ") + A_simgrid_parse_link___ctn_id);
}
const char* dirname;
default:
dirname = "";
}
- surf_parse_assert(link != nullptr, std::string("No such link: '") + A_simgrid_parse_link___ctn_id + "'" + dirname);
+ simgrid_parse_assert(link != nullptr, std::string("No such link: '") + A_simgrid_parse_link___ctn_id + "'" + dirname);
parsed_link_list.emplace_back(link, direction);
}
auto link = std::make_unique<simgrid::kernel::routing::LinkCreationArgs>();
link->id = A_simgrid_parse_backbone_id;
- link->bandwidths.push_back(xbt_parse_get_bandwidth(
- surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_backbone_bandwidth, "bandwidth of backbone " + link->id));
- link->latency = xbt_parse_get_time(surf_parsed_filename, surf_parse_lineno, A_simgrid_parse_backbone_latency,
+ link->bandwidths.push_back(xbt_parse_get_bandwidth(simgrid_parsed_filename, simgrid_parse_lineno,
+ A_simgrid_parse_backbone_bandwidth,
+ "bandwidth of backbone " + link->id));
+ link->latency = xbt_parse_get_time(simgrid_parsed_filename, simgrid_parse_lineno, A_simgrid_parse_backbone_latency,
"latency of backbone " + link->id);
link->policy = simgrid::s4u::Link::SharingPolicy::SHARED;
}
void STag_simgrid_parse_route(){
- surf_parse_assert_netpoint(A_simgrid_parse_route_src, "Route src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_route_dst, "Route dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_route_src, "Route src='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_route_dst, "Route dst='", "' does name a node.");
}
void STag_simgrid_parse_ASroute(){
- surf_parse_assert_netpoint(A_simgrid_parse_ASroute_src, "ASroute src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_ASroute_dst, "ASroute dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_ASroute_src, "ASroute src='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_ASroute_dst, "ASroute dst='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_ASroute_gw___src, "ASroute gw_src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_ASroute_gw___dst, "ASroute gw_dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_ASroute_gw___src, "ASroute gw_src='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_ASroute_gw___dst, "ASroute gw_dst='", "' does name a node.");
}
void STag_simgrid_parse_zoneRoute(){
- surf_parse_assert_netpoint(A_simgrid_parse_zoneRoute_src, "zoneRoute src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_zoneRoute_dst, "zoneRoute dst='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_zoneRoute_gw___src, "zoneRoute gw_src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_zoneRoute_gw___dst, "zoneRoute gw_dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_zoneRoute_src, "zoneRoute src='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_zoneRoute_dst, "zoneRoute dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_zoneRoute_gw___src, "zoneRoute gw_src='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_zoneRoute_gw___dst, "zoneRoute gw_dst='", "' does name a node.");
}
void STag_simgrid_parse_bypassRoute(){
- surf_parse_assert_netpoint(A_simgrid_parse_bypassRoute_src, "bypassRoute src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_bypassRoute_dst, "bypassRoute dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassRoute_src, "bypassRoute src='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassRoute_dst, "bypassRoute dst='", "' does name a node.");
}
void STag_simgrid_parse_bypassASroute(){
- surf_parse_assert_netpoint(A_simgrid_parse_bypassASroute_src, "bypassASroute src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_bypassASroute_dst, "bypassASroute dst='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_bypassASroute_gw___src, "bypassASroute gw_src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_bypassASroute_gw___dst, "bypassASroute gw_dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassASroute_src, "bypassASroute src='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassASroute_dst, "bypassASroute dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassASroute_gw___src, "bypassASroute gw_src='",
+ "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassASroute_gw___dst, "bypassASroute gw_dst='",
+ "' does name a node.");
}
void STag_simgrid_parse_bypassZoneRoute(){
- surf_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_src, "bypassZoneRoute src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_dst, "bypassZoneRoute dst='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_gw___src, "bypassZoneRoute gw_src='", "' does name a node.");
- surf_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_gw___dst, "bypassZoneRoute gw_dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_src, "bypassZoneRoute src='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_dst, "bypassZoneRoute dst='", "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_gw___src, "bypassZoneRoute gw_src='",
+ "' does name a node.");
+ simgrid_parse_assert_netpoint(A_simgrid_parse_bypassZoneRoute_gw___dst, "bypassZoneRoute gw_dst='",
+ "' does name a node.");
}
void ETag_simgrid_parse_route(){
trace.id = A_simgrid_parse_trace_id;
trace.file = A_simgrid_parse_trace_file;
- trace.periodicity = surf_parse_get_double(A_simgrid_parse_trace_periodicity);
+ trace.periodicity = simgrid_parse_get_double(A_simgrid_parse_trace_periodicity);
trace.pc_data = simgrid_parse_pcdata;
sg_platf_new_trace(&trace);
trace_connect.kind = simgrid::kernel::routing::TraceConnectKind::LINK_AVAIL;
break;
default:
- surf_parse_error("Invalid trace kind");
+ simgrid_parse_error("Invalid trace kind");
}
sg_platf_trace_connect(&trace_connect);
}
property_sets.emplace_back();
XBT_DEBUG("START configuration name = %s",A_simgrid_parse_config_id);
if (_sg_cfg_init_status == 2) {
- surf_parse_error("All <config> tags must be given before any platform elements (such as <zone>, <host>, <cluster>, "
- "<link>, etc).");
+ simgrid_parse_error(
+ "All <config> tags must be given before any platform elements (such as <zone>, <host>, <cluster>, "
+ "<link>, etc).");
}
}
actor.args.swap(arguments);
actor.host = A_simgrid_parse_actor_host;
actor.function = A_simgrid_parse_actor_function;
- actor.start_time = surf_parse_get_double(A_simgrid_parse_actor_start___time);
- actor.kill_time = surf_parse_get_double(A_simgrid_parse_actor_kill___time);
+ actor.start_time = simgrid_parse_get_double(A_simgrid_parse_actor_start___time);
+ actor.kill_time = simgrid_parse_get_double(A_simgrid_parse_actor_kill___time);
switch (A_simgrid_parse_actor_on___failure) {
case AU_simgrid_parse_actor_on___failure:
actor.restart_on_failure = true;
break;
default:
- surf_parse_error("Invalid on failure behavior");
+ simgrid_parse_error("Invalid on failure behavior");
}
sg_platf_new_actor(&actor);
void ETag_simgrid_parse_model___prop(){/* Nothing to do */}
/* Open and Close parse file */
-static YY_BUFFER_STATE surf_input_buffer;
+static YY_BUFFER_STATE input_buffer;
-void surf_parse_open(const std::string& file)
+void simgrid_parse_open(const std::string& file)
{
- surf_parsed_filename = file;
+ simgrid_parsed_filename = file;
std::string dir = simgrid::xbt::Path(file).get_dir_name();
simgrid::xbt::path_push(dir);
- surf_file_to_parse = simgrid::xbt::path_fopen(file, "r");
- if (surf_file_to_parse == nullptr)
+ file_to_parse = simgrid::xbt::path_fopen(file, "r");
+ if (file_to_parse == nullptr)
throw std::invalid_argument("Unable to open '" + file + "' from '" + simgrid::xbt::Path().get_name() +
"'. Does this file exist?");
- surf_input_buffer = surf_parse__create_buffer(surf_file_to_parse, YY_BUF_SIZE);
- surf_parse__switch_to_buffer(surf_input_buffer);
- surf_parse_lineno = 1;
+ input_buffer = simgrid_parse__create_buffer(file_to_parse, YY_BUF_SIZE);
+ simgrid_parse__switch_to_buffer(input_buffer);
+ simgrid_parse_lineno = 1;
}
-void surf_parse_close()
+void simgrid_parse_close()
{
- simgrid::xbt::path_pop(); // remove the dirname of the opened file, that was added in surf_parse_open()
+ simgrid::xbt::path_pop(); // remove the dirname of the opened file, that was added in simgrid_parse_open()
- if (surf_file_to_parse) {
- surf_parse__delete_buffer(surf_input_buffer);
- fclose(surf_file_to_parse);
- surf_file_to_parse = nullptr; //Must be reset for Bypass
+ if (file_to_parse) {
+ simgrid_parse__delete_buffer(input_buffer);
+ fclose(file_to_parse);
+ file_to_parse = nullptr; // Must be reset for Bypass
}
}
/* Call the lexer to parse the currently opened file */
-void surf_parse()
+void simgrid_parse()
{
- bool err = surf_parse_lex();
- surf_parse_assert(not err, "Flex returned an error code");
+ bool err = simgrid_parse_lex();
+ simgrid_parse_assert(not err, "Flex returned an error code");
}
#include "src/internal_config.h" // HAVE_SMPI
#include "src/kernel/activity/CommImpl.hpp"
#include "src/kernel/resource/NetworkModel.hpp"
+#include "src/simgrid/module.hpp"
#if HAVE_SMPI
#include "src/smpi/include/smpi_request.hpp"
#include "src/smpi/plugins/ampi/ampi.hpp"
#include <simgrid/simix.hpp>
#include "src/kernel/resource/CpuImpl.hpp"
+#include "src/simgrid/module.hpp"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include "src/kernel/activity/CommImpl.hpp"
#include "src/kernel/resource/StandardLinkImpl.hpp"
#include "src/kernel/resource/WifiLinkImpl.hpp"
+#include "src/simgrid/module.hpp"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
return models;
}
+XBT_PUBLIC void simgrid_vm_model_init_HL13();
+
#endif
#include "smpi_comm.hpp"
#include "smpi_utils.hpp"
#include "src/internal_config.h"
+#include "src/kernel/lmm/System.hpp" // sg_precision_timing
#include "src/mc/mc_replay.hpp"
-#include "src/surf/surf_interface.hpp" // sg_precision_timing
#include "xbt/config.hpp"
#include "xbt/file.hpp"
#include "private.hpp"
#include "smpi_config.hpp"
-#include "src/surf/xml/platf.hpp"
+#include "src/kernel/xml/platf.hpp"
#include "xbt/ex.h"
#include "xbt/file.hpp"
#include "xbt/log.h"
#ifndef SURF_MODEL_H_
#define SURF_MODEL_H_
-#include "src/simgrid/module.hpp"
-#include <xbt/asserts.h>
-#include <xbt/function_types.h>
-
-#include "src/internal_config.h"
#include "src/kernel/resource/profile/Profile.hpp"
-#include <cfloat>
-#include <cmath>
-#include <functional>
#include <set>
#include <string>
-#include <unordered_map>
-#include <vector>
-
-/*********
- * Utils *
- *********/
-
-/* user-visible parameters */
-XBT_PUBLIC_DATA double sg_precision_workamount;
-XBT_PUBLIC_DATA double sg_precision_timing;
-XBT_PUBLIC_DATA int sg_concurrency_limit;
extern XBT_PRIVATE std::unordered_map<std::string, simgrid::kernel::profile::Profile*> traces_set_list;
static std::set<std::string, std::less<>> value;
return value;
}
-
-static inline void double_update(double* variable, double value, double precision)
-{
- if (false) { // debug
- fprintf(stderr, "Updating %g -= %g +- %g\n", *variable, value, precision);
- xbt_assert(value == 0.0 || value > precision);
- // Check that precision is higher than the machine-dependent size of the mantissa. If not, brutal rounding may
- // happen, and the precision mechanism is not active...
- xbt_assert(FLT_RADIX == 2 && *variable < precision * exp2(DBL_MANT_DIG));
- }
- *variable -= value;
- if (*variable < precision)
- *variable = 0.0;
-}
-
-static inline int double_positive(double value, double precision)
-{
- return (value > precision);
-}
-
-static inline int double_equals(double value1, double value2, double precision)
-{
- return (fabs(value1 - value2) < precision);
-}
-
-XBT_PUBLIC void surf_vm_model_init_HL13();
-
#endif /* SURF_MODEL_H_ */
+++ /dev/null
-/* Copyright (c) 2006-2023. The SimGrid Team. All rights reserved. */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SURF_SURFXML_PARSE_HPP
-#define SURF_SURFXML_PARSE_HPP
-
-#include <xbt/base.h>
-#include <xbt/signal.hpp>
-#include <vector>
-
-/* Module management functions */
-XBT_PUBLIC void sg_platf_parser_finalize();
-
-XBT_PUBLIC void surf_parse_open(const std::string& file);
-XBT_PUBLIC void surf_parse_close();
-XBT_PUBLIC void surf_parse_assert(bool cond, const std::string& msg);
-XBT_ATTRIB_NORETURN XBT_PUBLIC void surf_parse_error(const std::string& msg);
-XBT_PUBLIC void surf_parse_assert_netpoint(const std::string& hostname, const std::string& pre,
- const std::string& post);
-
-XBT_PUBLIC double surf_parse_get_double(const std::string& s);
-XBT_PUBLIC int surf_parse_get_int(const std::string& s);
-
-XBT_PUBLIC void surf_parse(); /* Entry-point to the parser */
-XBT_PUBLIC void parse_platform_file(const std::string& file);
-
-#endif
set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
endforeach()
endif()
-foreach(x cloud-sharing ptask_L07_usage wifi_usage wifi_usage_decay cm02-set-lat-bw cm02-tcpgamma issue105 ${optional_examples})
+foreach(x lmm_usage core_usage core_usage2
+ cloud-sharing ptask_L07_usage wifi_usage wifi_usage_decay cm02-set-lat-bw cm02-tcpgamma issue105 ${optional_examples})
add_executable (${x} EXCLUDE_FROM_ALL ${x}/${x}.cpp)
target_link_libraries(${x} simgrid)
set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
endif()
endforeach()
+# Benchmarking MaxMin
+add_executable (maxmin_bench EXCLUDE_FROM_ALL maxmin_bench/maxmin_bench.cpp)
+target_link_libraries(maxmin_bench simgrid)
+set_target_properties(maxmin_bench PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/maxmin_bench)
+set_property(TARGET maxmin_bench APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
+add_dependencies(tests maxmin_bench)
+set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/maxmin_bench/maxmin_bench.cpp)
+foreach(x small medium large)
+ set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/maxmin_bench/maxmin_bench_${x}.tesh)
+ ADD_TESH(tesh-maxmin-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/models/maxmin_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/models/maxmin_bench maxmin_bench_${x}.tesh)
+endforeach()
set(teshsuite_src ${teshsuite_src} PARENT_SCOPE)
set(tesh_files ${tesh_files} PARENT_SCOPE)
-/* A few basic tests for the surf library */
+/* A few basic tests for the model solving mechanism */
/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */
#include "src/kernel/resource/NetworkModel.hpp"
#include "xbt/config.hpp"
-XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(core_usage, "Messages specific to this test case");
static const char* string_action(simgrid::kernel::resource::Action::State state)
{
--- /dev/null
+#!/usr/bin/env tesh
+
+$ ${bindir:=.}/core_usage ${platfdir}/two_hosts_profiles.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02'
+> [0.000000] [core_usage/INFO] actionA state: SURF_ACTION_RUNNING
+> [0.000000] [core_usage/INFO] actionB state: SURF_ACTION_RUNNING
+> [0.000000] [core_usage/INFO] actionC state: SURF_ACTION_RUNNING
+> [0.200000] [core_usage/INFO] Next Event : 0.2
+> [0.200016] [core_usage/INFO] Next Event : 0.200016
+> [0.200016] [core_usage/INFO] Network Done action
+> [1.000000] [core_usage/INFO] Next Event : 1
+> [1.000000] [core_usage/INFO] CPU Failed action
+> [2.000000] [core_usage/INFO] Next Event : 2
+> [7.320000] [core_usage/INFO] Next Event : 7.32
+> [7.320000] [core_usage/INFO] CPU Done action
+> [10.000000] [core_usage/INFO] Next Event : 10
+> [11.000000] [core_usage/INFO] Next Event : 11
+> [12.000000] [core_usage/INFO] Next Event : 12
+> [20.000000] [core_usage/INFO] Next Event : 20
+> [21.000000] [core_usage/INFO] Next Event : 21
+> [22.000000] [core_usage/INFO] Next Event : 22
+> [30.000000] [core_usage/INFO] Next Event : 30
+> [31.000000] [core_usage/INFO] Next Event : 31
+> [32.000000] [core_usage/INFO] Next Event : 32
+> [40.000000] [core_usage/INFO] Next Event : 40
+> [41.000000] [core_usage/INFO] Next Event : 41
+> [42.000000] [core_usage/INFO] Next Event : 42
+> [50.000000] [core_usage/INFO] Next Event : 50
+> [51.000000] [core_usage/INFO] Next Event : 51
+> [52.000000] [core_usage/INFO] Next Event : 52
+> [53.000000] [core_usage/INFO] Next Event : 53
+> [60.000000] [core_usage/INFO] Next Event : 60
+> [61.000000] [core_usage/INFO] Next Event : 61
+> [62.000000] [core_usage/INFO] Next Event : 62
+> [63.000000] [core_usage/INFO] Next Event : 63
+> [70.000000] [core_usage/INFO] Next Event : 70
+> [71.000000] [core_usage/INFO] Next Event : 71
+> [72.000000] [core_usage/INFO] Next Event : 72
+> [74.000000] [core_usage/INFO] Next Event : 74
+> [80.000000] [core_usage/INFO] Next Event : 80
+> [81.000000] [core_usage/INFO] Next Event : 81
+> [82.000000] [core_usage/INFO] Next Event : 82
+> [83.000000] [core_usage/INFO] Next Event : 83
+> [84.000000] [core_usage/INFO] Next Event : 84
+> [90.000000] [core_usage/INFO] Next Event : 90
+> [91.000000] [core_usage/INFO] Next Event : 91
+> [92.000000] [core_usage/INFO] Next Event : 92
+> [95.000000] [core_usage/INFO] Next Event : 95
+> [100.000000] [core_usage/INFO] Next Event : 100
+> [101.000000] [core_usage/INFO] Next Event : 101
+> [102.000000] [core_usage/INFO] Next Event : 102
+> [104.000000] [core_usage/INFO] Next Event : 104
+> [105.000000] [core_usage/INFO] Next Event : 105
+> [110.000000] [core_usage/INFO] Next Event : 110
+> [111.000000] [core_usage/INFO] Next Event : 111
+> [112.000000] [core_usage/INFO] Next Event : 112
+> [116.000000] [core_usage/INFO] Next Event : 116
+> [120.000000] [core_usage/INFO] Next Event : 120
+> [121.000000] [core_usage/INFO] Next Event : 121
+> [122.000000] [core_usage/INFO] Next Event : 122
+> [125.000000] [core_usage/INFO] Next Event : 125
+> [126.000000] [core_usage/INFO] Next Event : 126
+> [130.000000] [core_usage/INFO] Next Event : 130
+> [131.000000] [core_usage/INFO] Next Event : 131
+> [132.000000] [core_usage/INFO] Next Event : 132
+> [132.500000] [core_usage/INFO] Next Event : 132.5
+> [132.500000] [core_usage/INFO] CPU Done action
-/* A few basic tests for the surf library */
+/* A few basic tests for the model solving mechanism */
/* Copyright (c) 2004-2023. The SimGrid Team. All rights reserved. */
#include "src/kernel/resource/NetworkModel.hpp"
#include "xbt/config.hpp"
-XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(core_usage2, "Messages specific to this test case");
int main(int argc, char** argv)
{
--- /dev/null
+#!/usr/bin/env tesh
+
+$ ${bindir:=.}/core_usage2 ${platfdir}/two_hosts_profiles.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
+> [0.200000] [core_usage2/INFO] Next Event : 0.2
+> [0.200016] [core_usage2/INFO] Next Event : 0.200016
+> [0.200016] [core_usage2/INFO] * Done Action
+> [1.000000] [core_usage2/INFO] Next Event : 1
+> [1.000000] [core_usage2/INFO] * Done Action
+> [2.000000] [core_usage2/INFO] Next Event : 2
+> [7.320000] [core_usage2/INFO] Next Event : 7.32
+> [7.320000] [core_usage2/INFO] * Done Action
+> [10.000000] [core_usage2/INFO] Next Event : 10
+> [11.000000] [core_usage2/INFO] Next Event : 11
+> [12.000000] [core_usage2/INFO] Next Event : 12
+> [20.000000] [core_usage2/INFO] Next Event : 20
+> [21.000000] [core_usage2/INFO] Next Event : 21
+> [22.000000] [core_usage2/INFO] Next Event : 22
+> [30.000000] [core_usage2/INFO] Next Event : 30
+> [31.000000] [core_usage2/INFO] Next Event : 31
+> [32.000000] [core_usage2/INFO] Next Event : 32
+> [40.000000] [core_usage2/INFO] Next Event : 40
+> [41.000000] [core_usage2/INFO] Next Event : 41
+> [42.000000] [core_usage2/INFO] Next Event : 42
+> [50.000000] [core_usage2/INFO] Next Event : 50
+> [51.000000] [core_usage2/INFO] Next Event : 51
+> [52.000000] [core_usage2/INFO] Next Event : 52
+> [53.000000] [core_usage2/INFO] Next Event : 53
+> [60.000000] [core_usage2/INFO] Next Event : 60
+> [61.000000] [core_usage2/INFO] Next Event : 61
+> [62.000000] [core_usage2/INFO] Next Event : 62
+> [63.000000] [core_usage2/INFO] Next Event : 63
+> [70.000000] [core_usage2/INFO] Next Event : 70
+> [71.000000] [core_usage2/INFO] Next Event : 71
+> [72.000000] [core_usage2/INFO] Next Event : 72
+> [74.000000] [core_usage2/INFO] Next Event : 74
+> [80.000000] [core_usage2/INFO] Next Event : 80
+> [81.000000] [core_usage2/INFO] Next Event : 81
+> [82.000000] [core_usage2/INFO] Next Event : 82
+> [83.000000] [core_usage2/INFO] Next Event : 83
+> [84.000000] [core_usage2/INFO] Next Event : 84
+> [90.000000] [core_usage2/INFO] Next Event : 90
+> [91.000000] [core_usage2/INFO] Next Event : 91
+> [92.000000] [core_usage2/INFO] Next Event : 92
+> [95.000000] [core_usage2/INFO] Next Event : 95
+> [100.000000] [core_usage2/INFO] Next Event : 100
+> [101.000000] [core_usage2/INFO] Next Event : 101
+> [102.000000] [core_usage2/INFO] Next Event : 102
+> [104.000000] [core_usage2/INFO] Next Event : 104
+> [105.000000] [core_usage2/INFO] Next Event : 105
+> [110.000000] [core_usage2/INFO] Next Event : 110
+> [111.000000] [core_usage2/INFO] Next Event : 111
+> [112.000000] [core_usage2/INFO] Next Event : 112
+> [116.000000] [core_usage2/INFO] Next Event : 116
+> [120.000000] [core_usage2/INFO] Next Event : 120
+> [121.000000] [core_usage2/INFO] Next Event : 121
+> [122.000000] [core_usage2/INFO] Next Event : 122
+> [125.000000] [core_usage2/INFO] Next Event : 125
+> [126.000000] [core_usage2/INFO] Next Event : 126
+> [130.000000] [core_usage2/INFO] Next Event : 130
+> [131.000000] [core_usage2/INFO] Next Event : 131
+> [132.000000] [core_usage2/INFO] Next Event : 132
+> [132.500000] [core_usage2/INFO] Next Event : 132.5
+> [132.500000] [core_usage2/INFO] * Done Action
+> [132.500000] [core_usage2/INFO] Simulation Terminated
#include <array>
#include <cmath>
-XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Messages specific for this example");
namespace lmm = simgrid::kernel::lmm;
}
/*matrix that store the constraints/topology */
- A[0][1] = A[0][7] = 1.0;
- A[1][1] = A[1][7] = A[1][8] = 1.0;
- A[2][1] = A[2][8] = 1.0;
- A[3][8] = 1.0;
- A[4][0] = A[4][3] = A[4][9] = 1.0;
- A[5][0] = A[5][3] = A[5][4] = A[5][9] = 1.0;
- A[6][0] = A[6][4] = A[6][9] = A[6][10] = 1.0;
+ A[0][1] = A[0][7] = 1.0;
+ A[1][1] = A[1][7] = A[1][8] = 1.0;
+ A[2][1] = A[2][8] = 1.0;
+ A[3][8] = 1.0;
+ A[4][0] = A[4][3] = A[4][9] = 1.0;
+ A[5][0] = A[5][3] = A[5][4] = A[5][9] = 1.0;
+ A[6][0] = A[6][4] = A[6][9] = A[6][10] = 1.0;
A[7][2] = A[7][4] = A[7][6] = A[7][9] = A[7][10] = 1.0;
- A[8][2] = A[8][10] = 1.0;
- A[9][5] = A[9][6] = A[9][9] = 1.0;
- A[10][11] = 1.0;
- A[11][12] = 1.0;
- A[12][13] = 1.0;
- A[13][14] = 1.0;
- A[14][15] = 1.0;
+ A[8][2] = A[8][10] = 1.0;
+ A[9][5] = A[9][6] = A[9][9] = 1.0;
+ A[10][11] = 1.0;
+ A[11][12] = 1.0;
+ A[12][13] = 1.0;
+ A[13][14] = 1.0;
+ A[14][15] = 1.0;
lmm::MaxMin Sys(false);
--- /dev/null
+#!/usr/bin/env tesh
+
+$ ${bindir:=.}/lmm_usage
+> [0.000000] [test/INFO] ***** Test 1
+> [0.000000] [test/INFO] ***** Test 2
+> [0.000000] [test/INFO] ***** Test 3
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/kernel/lmm/maxmin.hpp"
#include "simgrid/s4u/Engine.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
#include "xbt/module.h"
#include "xbt/random.hpp"
#include "xbt/sysdep.h" /* time manipulation for benchmarking */
for (auto& var : variables) {
var = Sys.variable_new(nullptr, 1.0, -1.0, nb_elem);
- //Have a few variables with a concurrency share of two (e.g. cross-traffic in some cases)
+ // Have a few variables with a concurrency share of two (e.g. cross-traffic in some cases)
short concurrency_share = 1 + static_cast<short>(simgrid::xbt::random::uniform_int(0, max_share - 1));
std::vector<int> used(nb_cnst, 0);
Sys.solve();
date = (xbt_os_time() - date) * 1e6;
- if(mode==2){
- fprintf(stderr,"Max concurrency:\n");
- int l=0;
+ if (mode == 2) {
+ fprintf(stderr, "Max concurrency:\n");
+ int l = 0;
for (int i = 0; i < nb_cnst; i++) {
int j = constraints[i]->get_concurrency_maximum();
int k = constraints[i]->get_concurrency_limit();
- xbt_assert(k<0 || j<=k);
- if(j>l)
- l=j;
- fprintf(stderr,"(%i):%i/%i ",i,j,k);
+ xbt_assert(k < 0 || j <= k);
+ if (j > l)
+ l = j;
+ fprintf(stderr, "(%i):%i/%i ", i, j, k);
constraints[i]->reset_concurrency_maximum();
xbt_assert(not constraints[i]->get_concurrency_maximum());
- if(i%10==9)
- fprintf(stderr,"\n");
+ if (i % 10 == 9)
+ fprintf(stderr, "\n");
}
- fprintf(stderr,"\nTotal maximum concurrency is %i\n",l);
+ fprintf(stderr, "\nTotal maximum concurrency is %i\n", l);
Sys.print();
}
{{20000, 20000, 7, 10}} // huge
}};
-int main(int argc, char **argv)
+int main(int argc, char** argv)
{
simgrid::s4u::Engine e(&argc, argv);
double acc_date2 = 0.0;
int testclass;
- if(argc<3) {
+ if (argc < 3) {
fprintf(stderr, "Syntax: <small|medium|big|huge> <count> [test|debug|perf]\n");
return -1;
}
- //what class?
+ // what class?
if (not strcmp(argv[1], "small"))
testclass = 0;
else if (not strcmp(argv[1], "medium"))
else if (not strcmp(argv[1], "huge"))
testclass = 3;
else {
- fprintf(stderr, "Unknown class \"%s\", aborting!\n",argv[1]);
+ fprintf(stderr, "Unknown class \"%s\", aborting!\n", argv[1]);
return -2;
}
- //How many times?
- int testcount=atoi(argv[2]);
+ // How many times?
+ int testcount = atoi(argv[2]);
- //Show me everything (debug or performance)!
- int mode=0;
- if(argc>=4 && strcmp(argv[3],"test")==0)
- mode=1;
- if(argc>=4 && strcmp(argv[3],"debug")==0)
- mode=2;
- if(argc>=4 && strcmp(argv[3],"perf")==0)
- mode=3;
+ // Show me everything (debug or performance)!
+ int mode = 0;
+ if (argc >= 4 && strcmp(argv[3], "test") == 0)
+ mode = 1;
+ if (argc >= 4 && strcmp(argv[3], "debug") == 0)
+ mode = 2;
+ if (argc >= 4 && strcmp(argv[3], "perf") == 0)
+ mode = 3;
- if(mode==1)
+ if (mode == 1)
xbt_log_control_set("ker_lmm.threshold:DEBUG ker_lmm.fmt:'[%r]: [%c/%p] %m%n' "
"kernel.threshold:DEBUG kernel.fmt:'[%r]: [%c/%p] %m%n' ");
- if(mode==2)
+ if (mode == 2)
xbt_log_control_set("ker_lmm.threshold:DEBUG kernel.threshold:DEBUG");
- unsigned int nb_cnst= TestClasses[testclass][0];
- unsigned int nb_var= TestClasses[testclass][1];
- unsigned int pw_base_limit= TestClasses[testclass][2];
- unsigned int pw_max_limit= TestClasses[testclass][3];
- unsigned int max_share = 2; // 1<<(pw_base_limit/2+1)
+ unsigned int nb_cnst = TestClasses[testclass][0];
+ unsigned int nb_var = TestClasses[testclass][1];
+ unsigned int pw_base_limit = TestClasses[testclass][2];
+ unsigned int pw_max_limit = TestClasses[testclass][3];
+ unsigned int max_share = 2; // 1<<(pw_base_limit/2+1)
- //If you want to test concurrency, you need nb_elem >> 2^pw_base_limit:
- unsigned int nb_elem= (1<<pw_base_limit)+(1<<(8*pw_max_limit/10));
- //Otherwise, just set it to a constant value (and set rate_no_limit to 1.0):
- //nb_elem=200
+ // If you want to test concurrency, you need nb_elem >> 2^pw_base_limit:
+ unsigned int nb_elem = (1 << pw_base_limit) + (1 << (8 * pw_max_limit / 10));
+ // Otherwise, just set it to a constant value (and set rate_no_limit to 1.0):
+ // nb_elem=200
- for(int i=0;i<testcount;i++){
+ for (int i = 0; i < testcount; i++) {
simgrid::xbt::random::set_mersenne_seed(i + 1);
fprintf(stderr, "Starting %i: (%i)\n", i, simgrid::xbt::random::uniform_int(0, 999));
double date = test(nb_cnst, nb_var, nb_elem, pw_base_limit, pw_max_limit, rate_no_limit, max_share, mode);
- acc_date+=date;
- acc_date2+=date*date;
+ acc_date += date;
+ acc_date2 += date * date;
}
double mean_date = acc_date / static_cast<double>(testcount);
double stdev_date = sqrt(acc_date2 / static_cast<double>(testcount) - mean_date * mean_date);
- fprintf(stderr, "%ix One shot execution time for a total of %u constraints, "
- "%u variables with %u active constraint each, concurrency in [%i,%i] and max concurrency share %u\n",
+ fprintf(stderr,
+ "%ix One shot execution time for a total of %u constraints, "
+ "%u variables with %u active constraint each, concurrency in [%i,%i] and max concurrency share %u\n",
testcount, nb_cnst, nb_var, nb_elem, (1 << pw_base_limit), (1 << pw_base_limit) + (1 << pw_max_limit),
max_share);
- if(mode==3)
- fprintf(stderr, "Execution time: %g +- %g microseconds \n",mean_date, stdev_date);
+ if (mode == 3)
+ fprintf(stderr, "Execution time: %g +- %g microseconds \n", mean_date, stdev_date);
return 0;
}
simgrid::s4u::this_actor::sleep_for(2);
receiver_basic(recv_done, true, 1);
- // Sleep long enough to let the test ends by itself. 1 + surf_precision should be enough.
+ // Sleep long enough to let the test ends by itself. 1 + precision_timing should be enough.
simgrid::s4u::this_actor::sleep_for(4);
INFO("Sender or receiver killed somehow. It shouldn't");
REQUIRE(dsend_done);
simgrid::s4u::this_actor::sleep_for(2);
sender_dtach(dsend_done, true, 0);
- // Sleep long enough to let the test ends by itself. 3 + surf_precision should be enough.
+ // Sleep long enough to let the test ends by itself. 3 + precision_timing should be enough.
simgrid::s4u::this_actor::sleep_for(4);
INFO("Sender or receiver killed somehow. It shouldn't");
REQUIRE(dsend_done);
simgrid::s4u::this_actor::sleep_for(2);
sender->kill();
- // let the test ends by itself. waiting for surf_precision should be enough.
+ // let the test ends by itself. waiting for precision_timing should be enough.
simgrid::s4u::this_actor::sleep_for(0.00001);
INFO("Sender was not killed properly or receiver killed somehow. It shouldn't");
+++ /dev/null
-foreach(x lmm_usage surf_usage surf_usage2)
- add_executable (${x} EXCLUDE_FROM_ALL ${x}/${x}.cpp)
- target_link_libraries(${x} simgrid)
- set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
- set_property(TARGET ${x} APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
- add_dependencies(tests ${x})
-
- set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
- set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
-
- ADD_TESH(tesh-surf-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/${x} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/${x} ${x}.tesh)
-endforeach()
-
-add_executable (maxmin_bench EXCLUDE_FROM_ALL maxmin_bench/maxmin_bench.cpp)
-target_link_libraries(maxmin_bench simgrid)
-set_target_properties(maxmin_bench PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/maxmin_bench)
-set_property(TARGET maxmin_bench APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
-add_dependencies(tests maxmin_bench)
-
-foreach(x small medium large)
- set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/maxmin_bench/maxmin_bench_${x}.tesh)
-endforeach()
-
-set(tesh_files ${tesh_files} PARENT_SCOPE)
-set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/maxmin_bench/maxmin_bench.cpp PARENT_SCOPE)
-
-ADD_TESH(tesh-surf-maxmin-large --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/maxmin_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/maxmin_bench maxmin_bench_large.tesh)
-
-if(enable_debug)
- foreach(x small medium)
- ADD_TESH(tesh-surf-maxmin-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/surf/maxmin_bench --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/surf/maxmin_bench maxmin_bench_${x}.tesh)
- endforeach()
-endif()
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/env tesh
-
-$ ${bindir:=.}/lmm_usage
-> [0.000000] [surf_test/INFO] ***** Test 1
-> [0.000000] [surf_test/INFO] ***** Test 2
-> [0.000000] [surf_test/INFO] ***** Test 3
+++ /dev/null
-#!/usr/bin/env tesh
-
-$ ${bindir:=.}/surf_usage ${platfdir}/two_hosts_profiles.xml
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02'
-> [0.000000] [surf_test/INFO] actionA state: SURF_ACTION_RUNNING
-> [0.000000] [surf_test/INFO] actionB state: SURF_ACTION_RUNNING
-> [0.000000] [surf_test/INFO] actionC state: SURF_ACTION_RUNNING
-> [0.200000] [surf_test/INFO] Next Event : 0.2
-> [0.200016] [surf_test/INFO] Next Event : 0.200016
-> [0.200016] [surf_test/INFO] Network Done action
-> [1.000000] [surf_test/INFO] Next Event : 1
-> [1.000000] [surf_test/INFO] CPU Failed action
-> [2.000000] [surf_test/INFO] Next Event : 2
-> [7.320000] [surf_test/INFO] Next Event : 7.32
-> [7.320000] [surf_test/INFO] CPU Done action
-> [10.000000] [surf_test/INFO] Next Event : 10
-> [11.000000] [surf_test/INFO] Next Event : 11
-> [12.000000] [surf_test/INFO] Next Event : 12
-> [20.000000] [surf_test/INFO] Next Event : 20
-> [21.000000] [surf_test/INFO] Next Event : 21
-> [22.000000] [surf_test/INFO] Next Event : 22
-> [30.000000] [surf_test/INFO] Next Event : 30
-> [31.000000] [surf_test/INFO] Next Event : 31
-> [32.000000] [surf_test/INFO] Next Event : 32
-> [40.000000] [surf_test/INFO] Next Event : 40
-> [41.000000] [surf_test/INFO] Next Event : 41
-> [42.000000] [surf_test/INFO] Next Event : 42
-> [50.000000] [surf_test/INFO] Next Event : 50
-> [51.000000] [surf_test/INFO] Next Event : 51
-> [52.000000] [surf_test/INFO] Next Event : 52
-> [53.000000] [surf_test/INFO] Next Event : 53
-> [60.000000] [surf_test/INFO] Next Event : 60
-> [61.000000] [surf_test/INFO] Next Event : 61
-> [62.000000] [surf_test/INFO] Next Event : 62
-> [63.000000] [surf_test/INFO] Next Event : 63
-> [70.000000] [surf_test/INFO] Next Event : 70
-> [71.000000] [surf_test/INFO] Next Event : 71
-> [72.000000] [surf_test/INFO] Next Event : 72
-> [74.000000] [surf_test/INFO] Next Event : 74
-> [80.000000] [surf_test/INFO] Next Event : 80
-> [81.000000] [surf_test/INFO] Next Event : 81
-> [82.000000] [surf_test/INFO] Next Event : 82
-> [83.000000] [surf_test/INFO] Next Event : 83
-> [84.000000] [surf_test/INFO] Next Event : 84
-> [90.000000] [surf_test/INFO] Next Event : 90
-> [91.000000] [surf_test/INFO] Next Event : 91
-> [92.000000] [surf_test/INFO] Next Event : 92
-> [95.000000] [surf_test/INFO] Next Event : 95
-> [100.000000] [surf_test/INFO] Next Event : 100
-> [101.000000] [surf_test/INFO] Next Event : 101
-> [102.000000] [surf_test/INFO] Next Event : 102
-> [104.000000] [surf_test/INFO] Next Event : 104
-> [105.000000] [surf_test/INFO] Next Event : 105
-> [110.000000] [surf_test/INFO] Next Event : 110
-> [111.000000] [surf_test/INFO] Next Event : 111
-> [112.000000] [surf_test/INFO] Next Event : 112
-> [116.000000] [surf_test/INFO] Next Event : 116
-> [120.000000] [surf_test/INFO] Next Event : 120
-> [121.000000] [surf_test/INFO] Next Event : 121
-> [122.000000] [surf_test/INFO] Next Event : 122
-> [125.000000] [surf_test/INFO] Next Event : 125
-> [126.000000] [surf_test/INFO] Next Event : 126
-> [130.000000] [surf_test/INFO] Next Event : 130
-> [131.000000] [surf_test/INFO] Next Event : 131
-> [132.000000] [surf_test/INFO] Next Event : 132
-> [132.500000] [surf_test/INFO] Next Event : 132.5
-> [132.500000] [surf_test/INFO] CPU Done action
+++ /dev/null
-#!/usr/bin/env tesh
-
-$ ${bindir:=.}/surf_usage2 ${platfdir}/two_hosts_profiles.xml
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'CM02'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'cpu/model' to 'Cas01'
-> [0.200000] [surf_test/INFO] Next Event : 0.2
-> [0.200016] [surf_test/INFO] Next Event : 0.200016
-> [0.200016] [surf_test/INFO] * Done Action
-> [1.000000] [surf_test/INFO] Next Event : 1
-> [1.000000] [surf_test/INFO] * Done Action
-> [2.000000] [surf_test/INFO] Next Event : 2
-> [7.320000] [surf_test/INFO] Next Event : 7.32
-> [7.320000] [surf_test/INFO] * Done Action
-> [10.000000] [surf_test/INFO] Next Event : 10
-> [11.000000] [surf_test/INFO] Next Event : 11
-> [12.000000] [surf_test/INFO] Next Event : 12
-> [20.000000] [surf_test/INFO] Next Event : 20
-> [21.000000] [surf_test/INFO] Next Event : 21
-> [22.000000] [surf_test/INFO] Next Event : 22
-> [30.000000] [surf_test/INFO] Next Event : 30
-> [31.000000] [surf_test/INFO] Next Event : 31
-> [32.000000] [surf_test/INFO] Next Event : 32
-> [40.000000] [surf_test/INFO] Next Event : 40
-> [41.000000] [surf_test/INFO] Next Event : 41
-> [42.000000] [surf_test/INFO] Next Event : 42
-> [50.000000] [surf_test/INFO] Next Event : 50
-> [51.000000] [surf_test/INFO] Next Event : 51
-> [52.000000] [surf_test/INFO] Next Event : 52
-> [53.000000] [surf_test/INFO] Next Event : 53
-> [60.000000] [surf_test/INFO] Next Event : 60
-> [61.000000] [surf_test/INFO] Next Event : 61
-> [62.000000] [surf_test/INFO] Next Event : 62
-> [63.000000] [surf_test/INFO] Next Event : 63
-> [70.000000] [surf_test/INFO] Next Event : 70
-> [71.000000] [surf_test/INFO] Next Event : 71
-> [72.000000] [surf_test/INFO] Next Event : 72
-> [74.000000] [surf_test/INFO] Next Event : 74
-> [80.000000] [surf_test/INFO] Next Event : 80
-> [81.000000] [surf_test/INFO] Next Event : 81
-> [82.000000] [surf_test/INFO] Next Event : 82
-> [83.000000] [surf_test/INFO] Next Event : 83
-> [84.000000] [surf_test/INFO] Next Event : 84
-> [90.000000] [surf_test/INFO] Next Event : 90
-> [91.000000] [surf_test/INFO] Next Event : 91
-> [92.000000] [surf_test/INFO] Next Event : 92
-> [95.000000] [surf_test/INFO] Next Event : 95
-> [100.000000] [surf_test/INFO] Next Event : 100
-> [101.000000] [surf_test/INFO] Next Event : 101
-> [102.000000] [surf_test/INFO] Next Event : 102
-> [104.000000] [surf_test/INFO] Next Event : 104
-> [105.000000] [surf_test/INFO] Next Event : 105
-> [110.000000] [surf_test/INFO] Next Event : 110
-> [111.000000] [surf_test/INFO] Next Event : 111
-> [112.000000] [surf_test/INFO] Next Event : 112
-> [116.000000] [surf_test/INFO] Next Event : 116
-> [120.000000] [surf_test/INFO] Next Event : 120
-> [121.000000] [surf_test/INFO] Next Event : 121
-> [122.000000] [surf_test/INFO] Next Event : 122
-> [125.000000] [surf_test/INFO] Next Event : 125
-> [126.000000] [surf_test/INFO] Next Event : 126
-> [130.000000] [surf_test/INFO] Next Event : 130
-> [131.000000] [surf_test/INFO] Next Event : 131
-> [132.000000] [surf_test/INFO] Next Event : 132
-> [132.500000] [surf_test/INFO] Next Event : 132.5
-> [132.500000] [surf_test/INFO] * Done Action
-> [132.500000] [surf_test/INFO] Simulation Terminated
src/include/mc/datatypes.h
src/include/mc/mc.h
src/include/simgrid/sg_config.hpp
+ src/include/simgrid/math_utils.h
src/include/xbt/coverage.h
src/include/xbt/mmalloc.h
src/include/xbt/parmap.hpp
src/kernel/resource/models/network_constant.hpp
src/kernel/resource/models/network_ib.hpp
src/kernel/resource/models/network_ns3.hpp
- src/surf/ns3/ns3_simulator.hpp
+ src/kernel/resource/models/ns3/ns3_simulator.hpp
src/kernel/resource/models/ptask_L07.hpp
src/mc/mc_mmu.hpp
src/smpi/smpi_main.c
src/smpi/smpi_replay_main.cpp
src/surf/surf_interface.hpp
- src/surf/xml/simgrid.dtd
- src/surf/xml/simgrid_dtd.c
- src/surf/xml/simgrid_dtd.h
- src/surf/xml/surfxml_sax_cb.cpp
+ src/kernel/xml/simgrid.dtd
+ src/kernel/xml/simgrid_dtd.c
+ src/kernel/xml/simgrid_dtd.h
+ src/kernel/xml/surfxml_sax_cb.cpp
src/xbt/automaton/automaton_lexer.yy.c
src/xbt/automaton/parserPromela.lex
set(NS3_SRC
src/kernel/resource/models/network_ns3.cpp
- src/surf/ns3/ns3_simulator.cpp
+ src/kernel/resource/models/ns3/ns3_simulator.cpp
)
set(SURF_SRC
src/kernel/timer/Timer.cpp
- src/surf/sg_platf.cpp
- src/surf/xml/platf.hpp
- src/surf/xml/platf_private.hpp
- src/surf/xml/surfxml_parseplatf.cpp
- src/surf/xml/surfxml_sax_cb.cpp
+ src/kernel/xml/platf.hpp
+ src/kernel/xml/platf_private.hpp
+ src/kernel/xml/sg_platf.cpp
+ src/kernel/xml/surfxml_parseplatf.cpp
+ src/kernel/xml/surfxml_sax_cb.cpp
)
if (Eigen3_FOUND)
set(SURF_SRC
teshsuite/smpi/mpich3-test/rma/CMakeLists.txt
teshsuite/smpi/mpich3-test/topo/CMakeLists.txt
- teshsuite/surf/CMakeLists.txt
teshsuite/xbt/CMakeLists.txt
tools/CMakeLists.txt
tools/graphicator/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_NAME}-${release_version}/)
add_dependencies(dist dist-dir)
-if(NOT enable_maintainer_mode)
- add_custom_target(echo-dist
- COMMAND ${CMAKE_COMMAND} -E echo "WARNING: ----------------------------------------------------"
- COMMAND ${CMAKE_COMMAND} -E echo "WARNING: Distrib is generated without option maintainer mode "
- COMMAND ${CMAKE_COMMAND} -E echo "WARNING: ----------------------------------------------------")
- add_dependencies(dist echo-dist)
-endif()
-
###########################################
### Fill in the "make distcheck" target ###
###########################################
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE")
endif()
-# Avoid a failure seen with some combinations of compiler and ns3 versions
-if(enable_ns3)
- set_source_files_properties(src/kernel/resource/models/network_ns3.cpp PROPERTIES COMPILE_FLAGS " -Wno-unused-local-typedef")
-endif()
-
set(TESH_OPTION "")
if(enable_coverage)
find_program(GCOV_PATH NAMES ENV{GCOV} gcov)
set(string14 "'\\!^ \\* Generated [0-9/]\\{10\\} [0-9:]\\{8\\}\\.$$!d'")
ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h
+ OUTPUT ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.h
${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h
- ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
+ ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.c
${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c
- DEPENDS ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd
+ DEPENDS ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid.dtd
${CMAKE_HOME_DIRECTORY}/src/dag/dax.dtd
- #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd
- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/surf/xml
- COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P simgrid_parse --sysid=https://simgrid.org/simgrid.dtd -S src/surf/xml/simgrid_dtd.l -L src/surf/xml/simgrid.dtd
- COMMAND ${PERL_EXE} ${CMAKE_HOME_DIRECTORY}/tools/cmake/scripts/fixup_simgrid_dtd_l.pl < src/surf/xml/simgrid_dtd.l > src/surf/xml/simgrid_dtd.l.tmp
- COMMAND mv src/surf/xml/simgrid_dtd.l.tmp src/surf/xml/simgrid_dtd.l
- COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.l"
+ #${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid.dtd
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/src/kernel/xml
+ COMMAND ${FLEXML_EXE} --root-tags platform -b 1000000 -P simgrid_parse --sysid=https://simgrid.org/simgrid.dtd -S src/kernel/xml/simgrid_dtd.l -L src/kernel/xml/simgrid.dtd
+ COMMAND ${PERL_EXE} ${CMAKE_HOME_DIRECTORY}/tools/cmake/scripts/fixup_simgrid_dtd_l.pl < src/kernel/xml/simgrid_dtd.l > src/kernel/xml/simgrid_dtd.l.tmp
+ COMMAND mv src/kernel/xml/simgrid_dtd.l.tmp src/kernel/xml/simgrid_dtd.l
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated src/kernel/xml/simgrid_dtd.l"
#${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.l: ${CMAKE_HOME_DIRECTORY}/src/dag/dax.dtd
COMMAND ${FLEXML_EXE} -b 1000000 --root-tags adag -P dax_ --sysid=dax.dtd -S src/dag/dax_dtd.l -L src/dag/dax.dtd
COMMAND ${SED_EXE} -i ${string14} src/dag/dax_dtd.l
COMMAND ${CMAKE_COMMAND} -E echo " Generated src/dag/dax_dtd.l"
- #${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid.dtd
- COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/include/surf/simgrid.h
- COMMAND ${FLEXML_EXE} --root-tags platform -P simgrid_parse --sysid=https://simgrid.org/simgrid.dtd -H src/surf/xml/simgrid_dtd.h -L src/surf/xml/simgrid.dtd
- COMMAND ${SED_EXE} -i ${string1} src/surf/xml/simgrid_dtd.h
- COMMAND ${SED_EXE} -i ${string2} src/surf/xml/simgrid_dtd.h
- COMMAND ${SED_EXE} -i ${string3} src/surf/xml/simgrid_dtd.h
- COMMAND ${SED_EXE} -i ${string4} src/surf/xml/simgrid_dtd.h
- COMMAND ${SED_EXE} -i ${string14} src/surf/xml/simgrid_dtd.h
- COMMAND ${CMAKE_COMMAND} -E echo " Generated src/surf/xml/simgrid_dtd.h"
+ #${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid.dtd
+ COMMAND ${FLEXML_EXE} --root-tags platform -P simgrid_parse --sysid=https://simgrid.org/simgrid.dtd -H src/kernel/xml/simgrid_dtd.h -L src/kernel/xml/simgrid.dtd
+ COMMAND ${SED_EXE} -i ${string1} src/kernel/xml/simgrid_dtd.h
+ COMMAND ${SED_EXE} -i ${string2} src/kernel/xml/simgrid_dtd.h
+ COMMAND ${SED_EXE} -i ${string3} src/kernel/xml/simgrid_dtd.h
+ COMMAND ${SED_EXE} -i ${string4} src/kernel/xml/simgrid_dtd.h
+ COMMAND ${SED_EXE} -i ${string14} src/kernel/xml/simgrid_dtd.h
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated src/kernel/xml/simgrid_dtd.h"
#${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h: ${CMAKE_HOME_DIRECTORY}/src/dag/dax.dtd
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h
COMMAND ${SED_EXE} -i ${string14} src/dag/dax_dtd.h
COMMAND ${CMAKE_COMMAND} -E echo " Generated src/dag/dax_dtd.h"
- #surf/xml/simgrid_dtd.c: surf/xml/simgrid_dtd.l
- COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
- COMMAND ${FLEX_EXE} -o src/surf/xml/simgrid_dtd.c -Psurf_parse_ --noline src/surf/xml/simgrid_dtd.l
- COMMAND ${CMAKE_COMMAND} -E echo " Generated surf/xml/simgrid_dtd.c"
+ #kernel/xml/simgrid_dtd.c: kernel/xml/simgrid_dtd.l
+ COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.c
+ COMMAND ${FLEX_EXE} -o src/kernel/xml/simgrid_dtd.c -Psimgrid_parse_ --noline src/kernel/xml/simgrid_dtd.l
+ COMMAND ${CMAKE_COMMAND} -E echo " Generated kernel/xml/simgrid_dtd.c"
#dag/dax_dtd.c: dag/dax_dtd.l
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c
endif()
add_custom_target(maintainer_files
- DEPENDS ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.h
- ${CMAKE_HOME_DIRECTORY}/src/surf/xml/simgrid_dtd.c
+ DEPENDS ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.h
+ ${CMAKE_HOME_DIRECTORY}/src/kernel/xml/simgrid_dtd.c
${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.h
${CMAKE_HOME_DIRECTORY}/src/dag/dax_dtd.c
)
# Completely rewrite the error handling mechanism to use exceptions instead of printing to stderr
if (/fprintf.stderr, .*? flexml_err_msg.;/) {
- print(' surf_parse_error(flexml_err_msg);'."\n");
+ print(' simgrid_parse_error(flexml_err_msg);'."\n");
next;
}