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/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/sthread/sthread.c
include src/sthread/sthread.h
include src/sthread/sthread_impl.cpp
-include src/surf/sg_platf.cpp
include src/surf/surf_interface.hpp
include src/xbt/OsSemaphore.hpp
include src/xbt/PropertyHolder.cpp
--- /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/kernel/xml/platf.hpp"
+#include "src/surf/surf_interface.hpp"
#include "xbt/module.h"
#include "xbt/xbt_modinter.h" /* whether initialization was already done */
#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"
#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>
#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"
#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 <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 "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");
#include "src/kernel/resource/profile/Profile.hpp"
#include "src/kernel/xml/platf.hpp"
#include "src/kernel/xml/platf_private.hpp"
+#include "src/surf/surf_interface.hpp"
#include <algorithm>
#include <string>
#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>
#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"
#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);
-}
-
#endif /* SURF_MODEL_H_ */
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