[WIP] Run regression tests under ASAN
authorKevin Boyd <kevin44boyd@gmail.com>
Tue, 23 Jun 2020 09:57:40 +0000 (09:57 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Tue, 23 Jun 2020 09:57:40 +0000 (09:57 +0000)
Suppression gets regression tests passing for complex, free energy,
rotation.

TODO - essential dynamics does not work for non-leak reasons, issues
in perl script

admin/gitlab-ci/gromacs.gitlab-ci.yml
admin/lsan-suppressions.txt [new file with mode: 0644]
cmake/gmxBuildTypeASAN.cmake

index 13df73910b8d050c4e594f9576f2b6f1b3caca93..3802f3dd7fe2848163b0826896ce44cae1b4c8e3 100644 (file)
@@ -578,8 +578,7 @@ gromacs:clang-8-cuda-10.1:release:build:
   retry:
     max: 1
   script:
-    # This should go away once we are able to run ASAN on mdrun
-    - export ASAN_OPTIONS="detect_leaks=0"
+    - export LSAN_OPTIONS="suppressions=$CI_PROJECT_DIR/admin/lsan-suppressions.txt:print_suppressions=0"
     # Needed to run MPI enabled code in the docker images, until we set up different users
     - export OMPI_ALLOW_RUN_AS_ROOT=1
     - export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
diff --git a/admin/lsan-suppressions.txt b/admin/lsan-suppressions.txt
new file mode 100644 (file)
index 0000000..f04a688
--- /dev/null
@@ -0,0 +1,55 @@
+# Known leaks - leak keywords are the lowest-level function/method of the leak call stack that is not reused by other
+# routines.
+leak:add_to_list
+leak:atoms_to_constraints
+leak:atoms_to_settles
+leak:balance_fep_lists
+leak:cpp_opts
+leak:dd_init_bondeds
+leak:dd_make_local_constraints
+leak:dd_move_f
+leak:dd_partition_system
+leak:diagonalize_orires_tensors
+leak:do_cpte_matrices
+leak:do_edsam
+leak:do_inputrec
+leak:do_single_flood
+leak:get_ir
+leak:get_zone_pulse_cgs
+leak:gmx::DomainDecompositionBuilder::Impl::build
+leak:gmx_check
+leak:gmx_make_edi
+leak:gmx_mtop_ilistloop_init
+leak:gmx_pme_init
+leak:gmx_pme_receive_f
+leak:init_buffer_flags
+leak:init_disres
+leak:init_dfhist_state
+leak:init_df_history
+leak:init_edsam
+leak:init_ekinstate
+leak:init_interaction_const
+leak:init_orires
+leak:init_rot
+leak:init_swapcoords
+leak:make_bondeds_zone
+leak:make_dd_indices
+leak:make_exclusions_zone
+leak:make_fep_list
+leak:make_ljpme_c6grid
+leak:make_pull_groups
+leak:make_reverse_top
+leak:make_rotation_groups
+leak:make_swap_groups
+leak:make_tables
+leak:mdoutf_write_to_trajectory_files
+# Stack trace does not report a function beyond gmx_srenew_impl, so the file is suppressed instead.
+leak:pairlist.cpp
+leak:read_rotparams
+leak:set_ddgrid_parameters
+leak:set_reference_positions
+leak:set_state_entries
+leak:visitOption
+
+# External suppressions
+leak:xdr_string
index 0896fdf91167e8a0b2eea35c1a50b0bb6dcb5b5c..5d854e3ab0e0170bc5cff8574136a5dee8c1c0d9 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2014,2016,2018, by the GROMACS development team, led by
+# Copyright (c) 2014,2016,2018,2020, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -33,7 +33,7 @@
 # the research papers on the package. Check out http://www.gromacs.org.
 
 # Custom build type "ASAN", to be used to run the
-# AddressSanatizer memory checker.
+# AddressSanitizer memory checker.
 
 set(_flags "-O1 -g -fsanitize=address -fno-omit-frame-pointer")