Unverified Commit aa94d3f7 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Merge branch 'master' into pair-potential-file-unit-convert

parents 3d6095c2 22c88b80
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -112,8 +112,8 @@ install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)

set(STANDARD_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE
  GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MOLECULE PERI POEMS QEQ
  REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI
  GRANULAR KSPACE LATTE MANYBODY MC MESSAGE MISC MLIAP MOLECULE PERI POEMS
  QEQ REPLICA RIGID SHOCK SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI
  USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-MESODPD USER-CGSDK USER-COLVARS
  USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB
  USER-MANIFOLD USER-MEAMC USER-MESONT USER-MGPT USER-MISC USER-MOFFF USER-MOLFILE
@@ -200,6 +200,7 @@ endif()

# "hard" dependencies between packages resulting
# in an error instead of skipping over files
pkg_depends(MLIAP SNAP)
pkg_depends(MPIIO MPI)
pkg_depends(USER-ATC MANYBODY)
pkg_depends(USER-LB MPI)
@@ -256,9 +257,9 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
  endif()
endif()

set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, thread, undefined)")
set(ENABLE_SANITIZER "none" CACHE STRING "Select a code sanitizer option (none (default), address, leak, thread, undefined)")
mark_as_advanced(ENABLE_SANITIZER)
set(ENABLE_SANITIZER_VALUES none address thread undefined)
set(ENABLE_SANITIZER_VALUES none address leak thread undefined)
set_property(CACHE ENABLE_SANITIZER PROPERTY STRINGS ${ENABLE_SANITIZER_VALUES})
validate_option(ENABLE_SANITIZER ENABLE_SANITIZER_VALUES)
string(TOLOWER ${ENABLE_SANITIZER} ENABLE_SANITIZER)
+15 −0
Original line number Diff line number Diff line
@@ -3,6 +3,21 @@
###############################################################################
option(ENABLE_TESTING "Enable testing" OFF)
if(ENABLE_TESTING)
  find_program(VALGRIND_BINARY NAMES valgrind)
  # generate custom suppression file
  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "\n")
  file(GLOB VALGRIND_SUPPRESSION_FILES ${LAMMPS_TOOLS_DIR}/valgrind/[^.]*.supp)
  foreach(SUPP ${VALGRIND_SUPPRESSION_FILES})
    file(READ ${SUPP} SUPPRESSIONS)
    file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/lammps.supp "${SUPPRESSIONS}")
  endforeach()
  set(VALGRIND_DEFAULT_OPTIONS "--leak-check=full --show-leak-kinds=all --track-origins=yes --suppressions=${CMAKE_BINARY_DIR}/lammps.supp")

  set(MEMORYCHECK_COMMAND "${VALGRIND_BINARY}" CACHE FILEPATH "Memory Check Command")
  set(MEMORYCHECK_COMMAND_OPTIONS "${VALGRIND_DEFAULT_OPTIONS}" CACHE STRING "Memory Check Command Options")

  include(CTest)

  enable_testing()
  get_filename_component(LAMMPS_UNITTEST_DIR ${LAMMPS_SOURCE_DIR}/../unittest ABSOLUTE)
  get_filename_component(LAMMPS_UNITTEST_BIN ${CMAKE_BINARY_DIR}/unittest ABSOLUTE)
+2 −2
Original line number Diff line number Diff line
set(WIN_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GPU
                 GRANULAR KSPACE LATTE MANYBODY MC MISC MOLECULE OPT PERI
                 POEMS QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
                 GRANULAR KSPACE LATTE MANYBODY MC MISC MLIAP MOLECULE OPT
                 PERI POEMS QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
                 USER-ATC USER-AWPMD USER-BOCS USER-CGDNA USER-CGSDK
                 USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
                 USER-FEP USER-INTEL USER-MANIFOLD USER-MEAMC USER-MESODPD
+2 −2
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@
# external libraries. Compared to all_on.cmake some more unusual packages
# are removed. The resulting binary should be able to run most inputs.

set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL
        DIPOLE GRANULAR KSPACE MANYBODY MC MISC MOLECULE OPT PERI
set(ALL_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE
        GRANULAR KSPACE MANYBODY MC MISC MLIAP MOLECULE OPT PERI
        POEMS PYTHON QEQ REPLICA RIGID SHOCK SNAP SPIN SRD VORONOI
        USER-BOCS USER-CGDNA USER-CGSDK USER-COLVARS USER-DIFFRACTION
        USER-DPD USER-DRUDE USER-EFF USER-FEP USER-MEAMC USER-MESODPD
+4 −1
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ compilation and linking stages. This is done through setting the

   -D ENABLE_SANITIZER=none       # no sanitizer active (default)
   -D ENABLE_SANITIZER=address    # enable address sanitizer / memory leak checker
   -D ENABLE_SANITIZER=leak       # enable memory leak checker (only)
   -D ENABLE_SANITIZER=undefined  # enable undefined behavior sanitizer
   -D ENABLE_SANITIZER=thread     # enable thread sanitizer

@@ -121,6 +122,8 @@ The ``ctest`` command has many options, the most important ones are:
     - exclude subset of tests matching the regular expression <regex>
   * - -N
     - dry-run: display list of tests without running them
   * - -T memcheck
     - run tests with valgrind memory checker (if available)

In its full implementation, the unit test framework will consist of multiple
kinds of tests implemented in different programming languages (C++, C, Python,
@@ -216,7 +219,7 @@ The force style test programs have a common set of options:
     - verbose output: also print the executed LAMMPS commands

The ``ctest`` tool has no mechanism to directly pass flags to the individual
test programs, but a workaround has been implmented where these flags can be
test programs, but a workaround has been implemented where these flags can be
set in an environment variable ``TEST_ARGS``. Example:

.. code-block:: bash
Loading