From 5e22041a2c1ba01ba5c2337e39ebd9a590780182 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 17 Mar 2022 21:44:55 +0100 Subject: [PATCH] Suppress trailing whitespaces. [ci-skip] --- CMakeLists.txt | 4 ++-- ChangeLog | 14 +++++++------- examples/cpp/CMakeLists.txt | 13 ++++++------- examples/deprecated/java/CMakeLists.txt | 6 +++--- src/kernel/resource/profile/Profile.hpp | 21 +++++++++++---------- src/surf/cpu_ti.cpp | 2 +- teshsuite/java/CMakeLists.txt | 6 +++--- teshsuite/mc/CMakeLists.txt | 3 +-- teshsuite/s4u/CMakeLists.txt | 2 +- teshsuite/smpi/MBI/CMakeLists.txt | 6 +++--- tools/cmake/DefinePackages.cmake | 2 +- 11 files changed, 39 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac86729ebf..eb7d618a9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,7 +243,7 @@ endif() 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}) @@ -863,7 +863,7 @@ if(enable_python) 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).") diff --git a/ChangeLog b/ChangeLog index 178bbbf27c..70839ce562 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,7 +7,7 @@ Against the agression by a sick system that forces peoples to take arms against 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. @@ -26,12 +26,12 @@ SMPI: 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. @@ -39,9 +39,9 @@ MSG: - 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: diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index 8c775f4bb4..100db9a69a 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -1,4 +1,3 @@ - # Regular examples: with only one source and tested with all factories by default ################################################################################# ### Define the examples' specificities @@ -26,7 +25,7 @@ if(SIMGRID_HAVE_MC) 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) @@ -40,7 +39,7 @@ if(SIMGRID_HAVE_MC) 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) @@ -51,7 +50,7 @@ if(SIMGRID_HAVE_MC) # 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 @@ -64,7 +63,7 @@ if(SIMGRID_HAVE_MC) ${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) @@ -73,7 +72,7 @@ if(SIMGRID_HAVE_MC) 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() @@ -261,7 +260,7 @@ set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/gener ${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 diff --git a/examples/deprecated/java/CMakeLists.txt b/examples/deprecated/java/CMakeLists.txt index da8e53d11a..82c20ede05 100644 --- a/examples/deprecated/java/CMakeLists.txt +++ b/examples/deprecated/java/CMakeLists.txt @@ -41,10 +41,10 @@ foreach (example app-bittorrent app-centralizedmutex app-masterworker app-pingpo 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() diff --git a/src/kernel/resource/profile/Profile.hpp b/src/kernel/resource/profile/Profile.hpp index 02fe86f834..9b9402a852 100644 --- a/src/kernel/resource/profile/Profile.hpp +++ b/src/kernel/resource/profile/Profile.hpp @@ -25,18 +25,19 @@ namespace profile { * 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& cb, double repeat_delay); virtual ~Profile()=default; Event* schedule(FutureEvtSet* fes, resource::Resource* resource); @@ -46,7 +47,7 @@ public: 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 cb; diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index c9a76febb0..63625bcc2b 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -48,7 +48,7 @@ CpuTiProfile::CpuTiProfile(const profile::Profile* profile) 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); diff --git a/teshsuite/java/CMakeLists.txt b/teshsuite/java/CMakeLists.txt index f09a7cb9f6..bd5d5b12cd 100644 --- a/teshsuite/java/CMakeLists.txt +++ b/teshsuite/java/CMakeLists.txt @@ -12,10 +12,10 @@ foreach(example semaphoregc sleephostoff) 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}) diff --git a/teshsuite/mc/CMakeLists.txt b/teshsuite/mc/CMakeLists.txt index 6fe56966bb..b4b76485e3 100644 --- a/teshsuite/mc/CMakeLists.txt +++ b/teshsuite/mc/CMakeLists.txt @@ -4,8 +4,7 @@ if (NOT SIMGRID_HAVE_MC) 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) diff --git a/teshsuite/s4u/CMakeLists.txt b/teshsuite/s4u/CMakeLists.txt index 0d1baa2c43..673804c0e3 100644 --- a/teshsuite/s4u/CMakeLists.txt +++ b/teshsuite/s4u/CMakeLists.txt @@ -21,7 +21,7 @@ foreach(x actor actor-autorestart actor-suspend 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}) diff --git a/teshsuite/smpi/MBI/CMakeLists.txt b/teshsuite/smpi/MBI/CMakeLists.txt index 40412691eb..fd2aa91351 100644 --- a/teshsuite/smpi/MBI/CMakeLists.txt +++ b/teshsuite/smpi/MBI/CMakeLists.txt @@ -1,4 +1,4 @@ -# 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 @@ -42,7 +42,7 @@ if (enable_smpi_MBI_testsuite) 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) @@ -61,7 +61,7 @@ if (enable_smpi_MBI_testsuite) 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() diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index e027e97249..a06425dc86 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -809,7 +809,7 @@ if(SIMGRID_HAVE_NS3) 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() -- 2.20.1