set(SIMGRID_HAVE_EIGEN3 0)
find_package (Eigen3 3.3 CONFIG
HINTS ${EIGEN3_HINT})
-if (Eigen3_FOUND)
+if (Eigen3_FOUND)
set(SIMGRID_HAVE_EIGEN3 1)
message(STATUS "Found Eigen3: ${EIGEN3_INCLUDE_DIR}")
include_directories(${EIGEN3_INCLUDE_DIR})
string(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" SIMGRID_PYTHON_LIBDIR ${Python3_SITEARCH})
endif("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
endif()
- install(TARGETS python-bindings
+ install(TARGETS python-bindings
LIBRARY DESTINATION "${SIMGRID_PYTHON_LIBDIR}")
else()
message(FATAL_ERROR "Please install pybind11-dev to build the Python bindings (or disable that option).")
MC:
- Rework the internals, for simpler and modern code. This shall unlock many future improvements.
- - You can now define plugins onto the DFS explorer (previously called SafetyChecker), using the
+ - You can now define plugins onto the DFS explorer (previously called SafetyChecker), using the
declared signals. See CommunicationDeterminism for an example.
- Support mutex, semaphore and barrier in DPOR reduction
- Seems to work on Arm64 architectures too.
S4U:
- New signal: Engine::on_simulation_start_cb()
- - Introduce a new execution mode with this_actor::thread_execute(). This simulate
+ - Introduce a new execution mode with this_actor::thread_execute(). This simulate
the execution of a certain amount of flops by multiple threads ran by a host. Each
thread executes the same number of flops, given as argument. An example of this new
function can be found in examples/cpp/exec-threads.
- - Reimplementation of barriers natively.
- Previously, they were implemented on top of s4u::Mutex and s4u::ConditionVariable.
+ - Reimplementation of barriers natively.
+ Previously, they were implemented on top of s4u::Mutex and s4u::ConditionVariable.
The new version should be faster (and can be used in the model-checker).
- Actor::get_restart_count(): Returns the number of reboots that this actor did.
- MSG_barrier_destroy now expects a non-const msg_barrier parameter.
New plugin: the Chaos Monkey (killing actors at any time)
- - Along with the new simgrid-monkey script, it tests whether your simulation
- resists resource failures at any possible timestamp in your simulation.
- - It is mostly intended to test the simgrid core in extreme conditions,
+ - Along with the new simgrid-monkey script, it tests whether your simulation
+ resists resource failures at any possible timestamp in your simulation.
+ - It is mostly intended to test the simgrid core in extreme conditions,
but some users may find it interesting too.
Models:
-
# Regular examples: with only one source and tested with all factories by default
#################################################################################
### Define the examples' specificities
set(_${example}_factories "^thread") # Timeout
add_dependencies(tests-mc s4u-${example})
endforeach()
-
+
if(HAVE_C_STACK_CLEANER)
add_executable (s4u-mc-bugged1-liveness-cleaner-on EXCLUDE_FROM_ALL s4u-mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp)
target_link_libraries(s4u-mc-bugged1-liveness-cleaner-on simgrid)
endif()
# Model-checking liveness
- if(HAVE_UCONTEXT_CONTEXTS AND SIMGRID_PROCESSOR_x86_64)
+ if(HAVE_UCONTEXT_CONTEXTS AND SIMGRID_PROCESSOR_x86_64)
# liveness model-checking works only on 64bits (for now ...)
set(_mc-bugged1-liveness_factories "ucontext") # Timeout
add_dependencies(tests-mc s4u-mc-bugged1-liveness)
# This example never ends, disable it for now
set(_mc-bugged2-liveness_disable 1)
-
+
# This example hit the 5' timeout on CI, disable it for now
# ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness
# --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/
${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness/)
ENDIF()
-
+
if(enable_coverage)
foreach (example mc-bugged1 mc-bugged2 mc-electric-fence mc-failing-assert)
ADD_TEST(cover-${example} ${CMAKE_CURRENT_BINARY_DIR}/${example}/s4u-${example} ${CMAKE_HOME_DIRECTORY}/examples/platforms/model_checker_platform.xml)
endif()
else()
- foreach (example mc-bugged1 mc-bugged2 mc-centralized-mutex mc-failing-assert mc-electric-fence
+ foreach (example mc-bugged1 mc-bugged2 mc-centralized-mutex mc-failing-assert mc-electric-fence
mc-bugged1-liveness mc-bugged2-liveness)
set(_${example}_disable 1)
endforeach()
${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/promela_bugged1_liveness
${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged2-liveness/promela_bugged2_liveness PARENT_SCOPE)
set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dax/simple_dax_with_cycle.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dax/smalldax.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dax/smalldax.xml
${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag.dot
${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag_with_cycle.dot
${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt
if(enable_java)
add_jar(java-${example} SOURCES ${${example}_sources}
INCLUDE_JARS simgrid-java_jar
- OUTPUT_NAME ${example}
- OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${example_dir})
+ OUTPUT_NAME ${example}
+ OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${example_dir})
add_dependencies(java-all java-${example})
-
+
string (REPLACE "-" "/" example_dir ${example})
ADD_TESH(java-${example} --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/java --setenv LD_LIBRARY_PATH=${TESH_LIBRARY_PATH} --setenv classpath=""${TESH_CLASSPATH}${TESH_CLASSPATH_SEPARATOR}${example}.jar"" --cd ${CMAKE_BINARY_DIR}/examples/deprecated/java/${example_dir} ${CMAKE_HOME_DIRECTORY}/examples/deprecated/java/${example_dir}/${example}.tesh)
endif()
* time. To model that, you have to set several profiles per resource: one for the on/off state and one for each
* numerical value (computational speed, bandwidth and/or latency).
*
- * There are two behaviours. Either a callback is used to populate the profile when the set has been exhausted,
- * or the callback is called only during construction and the initial set is repeated over and over, after a fixed repeating delay.
+ * There are two behaviours. Either a callback is used to populate the profile when the set has been exhausted,
+ * or the callback is called only during construction and the initial set is repeated over and over, after a fixed
+ * repeating delay.
*/
class XBT_PUBLIC Profile {
public:
- /** @brief Create a profile. There are two behaviours. Either the callback is
- *
- * @param name The name of the profile (checked for uniqueness)
- * @param cb A callback object/function that populates the profile.
- * @param repeat_delay If strictly negative, it is ignored and the callback is called when an event reached the end of the event_list.
- * If zero or positive, the initial set repeats after the provided delay.
- */
+ /** @brief Create a profile. There are two behaviours. Either the callback is
+ *
+ * @param name The name of the profile (checked for uniqueness)
+ * @param cb A callback object/function that populates the profile.
+ * @param repeat_delay If strictly negative, it is ignored and the callback is called when an event reached the end of
+ * the event_list. If zero or positive, the initial set repeats after the provided delay.
+ */
explicit Profile(const std::string& name, const std::function<ProfileBuilder::UpdateCb>& cb, double repeat_delay);
virtual ~Profile()=default;
Event* schedule(FutureEvtSet* fes, resource::Resource* resource);
const std::string& get_name() const { return name; }
bool is_repeating() const { return repeat_delay>=0;}
double get_repeat_delay() const { return repeat_delay;}
-
+
private:
std::string name;
std::function<ProfileBuilder::UpdateCb> cb;
double delay=profile->get_repeat_delay()+ events.at(0).date_;
xbt_assert( events.back().value_==prev_value,"Profiles need to end as they start");
- time += delay;
+ time += delay;
integral += delay*prev_value;
time_points_.push_back(time);
string (REPLACE "-" "/" example_dir ${example})
add_jar(java-${example} SOURCES ${sources}
INCLUDE_JARS simgrid-java_jar
- OUTPUT_NAME ${example}
- OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${example_dir})
+ OUTPUT_NAME ${example}
+ OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${example_dir})
add_dependencies(java-all java-${example})
-
+
ADD_TESH(tesh-java-${example} --setenv javacmd=${Java_JAVA_EXECUTABLE} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --setenv LD_LIBRARY_PATH=${TESH_LIBRARY_PATH} --setenv classpath=${TESH_CLASSPATH}${TESH_CLASSPATH_SEPARATOR}${example}.jar --cd ${CMAKE_BINARY_DIR}/teshsuite/java/${example_dir} ${CMAKE_HOME_DIRECTORY}/teshsuite/java/${example_dir}/${example}.tesh)
endif()
set(examples_src ${examples_src} ${sources})
endif()
-foreach(x dwarf dwarf-expression
- random-bug mutex-handling)
+foreach(x dwarf dwarf-expression random-bug mutex-handling)
if(NOT DEFINED ${x}_sources)
set(${x}_sources ${x}/${x}.cpp)
if(NOT DEFINED ${x}_sources)
set(${x}_sources ${x}/${x}.cpp)
endif()
-
+
add_executable (${x} EXCLUDE_FROM_ALL ${${x}_sources})
target_link_libraries(${x} simgrid)
set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
-# Copyright 2021-2022. The SimGrid Team. All rights reserved.
+# Copyright 2021-2022. The SimGrid Team. All rights reserved.
# Integrates the MBI tests into the SimGrid build chain when asked to
file(COPY_FILE ${CMAKE_BINARY_DIR}/MBI/tmp/${cfile} ${CMAKE_BINARY_DIR}/MBI/${cfile} ONLY_IF_DIFFERENT)
endif()
string(REGEX REPLACE "[.]c" "" basefile ${cfile})
-
+
# Generate an executable for each of them
add_executable(mbi_${basefile} EXCLUDE_FROM_ALL ${CMAKE_BINARY_DIR}/MBI/${cfile})
target_link_libraries(mbi_${basefile} simgrid)
if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
else()
- file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/MBIutils.py DESTINATION ${CMAKE_BINARY_DIR}/MBI)
+ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/MBIutils.py DESTINATION ${CMAKE_BINARY_DIR}/MBI)
endif()
endif()
set(headers_to_install ${headers_to_install} include/simgrid/plugins/ns3.hpp)
set(simgrid_sources ${simgrid_sources} ${NS3_SRC})
-else()
+else()
set(EXTRA_DIST ${EXTRA_DIST} include/simgrid/plugins/ns3.hpp)
endif()