message(FATAL_ERROR "Cannot activate both model-checking and ns-3 bindings: ns-3 pull too much dependencies for the MC to work")
endif()
+get_property(known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
+if (enable_model-checking AND (NOT ("cxx_std_14" IN_LIST known_features)))
+ message(FATAL_ERROR "Model-checking requires C++14. Please upgrade your compiler")
+endif()
+
if(enable_smpi)
SET(HAVE_SMPI 1)
if(NOT WIN32)
################
# Our usage of pybind11::overload_cast mandates C++14
if((NOT DEFINED enable_python) OR enable_python)
- get_property(known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
-
if("cxx_std_14" IN_LIST known_features)
if(EXISTS ${CMAKE_HOME_DIRECTORY}/pybind11) # Try to use a local copy of pybind11, if any
MPI_ERRORS_ARE_FATAL, so codes which were sending warnings may start failing.
Model-Checker:
+ - Bump our requirements to C++14 for the model-checker. This is
+ because of xxHash that we now use as a hash implementation.
- Option model-checker/hash was removed. This is always activated now.
- New option smpi/buffering controls the MPI buffering in MC mode.
- MPI calls now MC_assert() that no MPI_ERR_* code is returned.
#include "xbt/log.h"
#include "xbt/sysdep.h"
-#include "src/mc/sosp/PageStore.hpp"
+#include "src/include/xxhash.hpp"
#include "src/mc/mc_mmu.hpp"
+#include "src/mc/sosp/PageStore.hpp"
#include <cstring> // memcpy, memcmp
#include <unistd.h>
*/
static XBT_ALWAYS_INLINE PageStore::hash_type mc_hash_page(const void* data)
{
- const std::uint64_t* values = (const uint64_t*)data;
- std::size_t n = xbt_pagesize / sizeof(uint64_t);
-
- // This djb2:
- std::uint64_t hash = 5381;
- for (std::size_t i = 0; i != n; ++i)
- hash = ((hash << 5) + hash) + values[i];
- return hash;
+ return xxh::xxhash<64>(data, xbt_pagesize);
}
// ***** snapshot_page_manager
add_dependencies(simgrid maintainer_files)
if(enable_model-checking)
+ set_property(TARGET simgrid PROPERTY CXX_STANDARD 14)
+
add_executable(simgrid-mc ${MC_SIMGRID_MC_SRC})
target_link_libraries(simgrid-mc simgrid)
set_target_properties(simgrid-mc