From: Mark Abraham Date: Wed, 30 Jun 2021 11:14:21 +0000 (+0000) Subject: Test with newer compilers in CI X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=694fe0e602d943e44b944515368ae46da732d9f1;p=alexxy%2Fgromacs.git Test with newer compilers in CI Now compiles with clang 12 and gcc 11 without warnings in various configurations. Did not update santizer configurations as they're already on clang 11. Adjusted various CI job intents to be either accurate or placed on more suitable configurations. Eliminated one build container, since we target only gcc versions that are most recent supported, oldest supported, and if needed also those required for e.g. support of most recent and oldest supported CUDA versions. Code changes mostly related to false positives. Suppresses a false-positive warning in GoogleTest Avoids warnings about loop variables referring to temporaries. Our usage was safe, but the warning is potentially valuable elsewhere, so we should respect it. Rewrote a test with idiomatic value-parametrization to avoid a warning about a reference to a temporary Refs #3912 --- diff --git a/admin/containers/buildall.sh b/admin/containers/buildall.sh index 75d6292f0d..7acf6888ef 100755 --- a/admin/containers/buildall.sh +++ b/admin/containers/buildall.sh @@ -9,13 +9,12 @@ SCRIPT=$PWD/scripted_gmx_docker_builds.py # images needed, because the same one can test library, # thread and no MPI configurations. -args[${#args[@]}]="--gcc 10 --clfft --mpi openmpi --rocm" -args[${#args[@]}]="--gcc 9 --clfft --mpi openmpi --rocm" +args[${#args[@]}]="--gcc 11 --clfft --mpi openmpi --rocm" args[${#args[@]}]="--gcc 10 --cuda 11.2.2 --clfft --mpi openmpi" args[${#args[@]}]="--gcc 7 --cuda 11.0 --clfft --mpi openmpi" args[${#args[@]}]="--llvm 11 --tsan" args[${#args[@]}]="--llvm 8 --cuda 11.0 --clfft --mpi openmpi" -args[${#args[@]}]="--llvm 9 --clfft --mpi openmpi --rocm" +args[${#args[@]}]="--llvm 12 --clfft --mpi openmpi --rocm" args[${#args[@]}]="--oneapi 2021.1.1" args[${#args[@]}]="--oneapi 2021.2.0 --intel-compute-runtime 21.21.19914" args[${#args[@]}]="--llvm --doxygen --mpi openmpi --venvs 3.7.7" diff --git a/admin/containers/scripted_gmx_docker_builds.py b/admin/containers/scripted_gmx_docker_builds.py index 4071663ef2..d50ab66cde 100755 --- a/admin/containers/scripted_gmx_docker_builds.py +++ b/admin/containers/scripted_gmx_docker_builds.py @@ -208,6 +208,27 @@ def base_image_tag(args) -> str: raise RuntimeError('Logic error: no Linux distribution selected.') return base_image_tag +# Convert the linux distribution variables into something that hpccm +# understands. +def hpccm_distro_name(args) -> str: + if args.centos is not None: + name_mapping = { '7': 'centos7', + '8': 'centos8' } + if args.centos in name_mapping: + hpccm_name = name_mapping[args.centos] + else: + raise RuntimeError('Logic error: unsupported CentOS distribution selected.') + elif args.ubuntu is not None: + name_mapping = { '20.04': 'ubuntu20', + '18.04': 'ubuntu18', + '16.04': 'ubuntu16' } + if args.ubuntu in name_mapping: + hpccm_name = name_mapping[args.ubuntu] + else: + raise RuntimeError('Logic error: unsupported Ubuntu distribution selected.') + else: + raise RuntimeError('Logic error: no Linux distribution selected.') + return hpccm_name def get_llvm_packages(args) -> typing.Iterable[str]: # If we use the package version of LLVM, we need to install extra packages for it. @@ -247,7 +268,10 @@ def get_compiler(args, compiler_build_stage: hpccm.Stage = None) -> bb_base: raise RuntimeError('No TSAN compiler build stage!') # Build the default compiler if we don't need special support else: - compiler = hpccm.building_blocks.llvm(extra_repository=True, version=args.llvm) + # Currently the focal apt repositories do not contain + # llvm higher than 11, so we work around that. This will + # need further work when we start supporting ubuntu 22.04 + compiler = hpccm.building_blocks.llvm(version=args.llvm, upstream=True if int(args.llvm) > 11 else False) elif args.oneapi is not None: if compiler_build_stage is not None: @@ -634,6 +658,11 @@ def build_stages(args) -> typing.Iterable[hpccm.Stage]: building_blocks['base_packages'] = hpccm.building_blocks.packages( ospackages=_common_packages) + # Normally in hpccm the first call to baseimage sets the context + # for other packages, e.g. for which apt respository to + # use. We want to set that early on. + hpccm.config.set_linux_distro(hpccm_distro_name(args)) + # These are the most expensive and most reusable layers, so we put them first. building_blocks['compiler'] = get_compiler(args, compiler_build_stage=stages.get('compiler_build')) building_blocks['gdrcopy'] = get_gdrcopy(args, building_blocks['compiler']) diff --git a/admin/containers/utility.py b/admin/containers/utility.py index 192a1ffd59..dfa27e331f 100644 --- a/admin/containers/utility.py +++ b/admin/containers/utility.py @@ -174,7 +174,8 @@ def image_name(configuration: argparse.Namespace) -> str: if configuration.intel_compute_runtime is not None: elements.append('intel-' + configuration.intel_compute_runtime) if configuration.rocm is not None: - elements.append('rocm-' + configuration.rocm) + if (configuration.rocm != 'debian'): + elements.append('rocm-' + configuration.rocm) # Check for special cases # The following attribute keys indicate the image is built for the named diff --git a/admin/gitlab-ci/gromacs.gitlab-ci.yml b/admin/gitlab-ci/gromacs.gitlab-ci.yml index 29b94d6140..7d2af7a1e6 100644 --- a/admin/gitlab-ci/gromacs.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.gitlab-ci.yml @@ -9,7 +9,7 @@ # Scope: configure, build, unit tests # Test implementation choices (free to change as needed): # OS: Ubuntu 20.04 -# Compiler: Clang 9 +# Compiler: Clang 12 # FFT: FFTW3 # Parallelism nt/ntomp: 4/2 @@ -21,7 +21,8 @@ simple-build: - .use-clang:base - .rules:basic-push stage: pre-build - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 + variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake KUBERNETES_CPU_LIMIT: 8 @@ -33,7 +34,7 @@ simple-build: CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug" CMAKE_GPU_OPTIONS: "-DGMX_GPU=OFF" CMAKE_GMXAPI_OPTIONS: "-DGMX_PYTHON_PACKAGE=OFF" - COMPILER_MAJOR_VERSION: 9 + COMPILER_MAJOR_VERSION: 12 BUILD_DIR: simple-build script: - CMAKE=${CMAKE:-$(which cmake)} diff --git a/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml index a664ff14f3..5ce725e4f2 100644 --- a/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix.gitlab-ci.yml @@ -260,19 +260,19 @@ include: - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8-cuda-11.0-release.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-8.gitlab-ci.yml' - - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-mpi.gitlab-ci.yml' - - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-release.gitlab-ci.yml' + - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml' + - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-11-cuda-11.2.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-ASAN.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-TSAN.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.clang-UBSAN.gitlab-ci.yml' - - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10.gitlab-ci.yml' - - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10-coverage.gitlab-ci.yml' + - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11.gitlab-ci.yml' + - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-coverage.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-7-cuda-11.0.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10-cuda-11.2.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10-cuda-11.2-release.gitlab-ci.yml' - - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-9-release.gitlab-ci.yml' + - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-release.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.hipsycl-dev.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.oneapi-2021.1.1-opencl.gitlab-ci.yml' - local: '/admin/gitlab-ci/gromacs.matrix/gromacs.oneapi-2021.1.1-opencl-release.gitlab-ci.yml' diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-mpi.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml similarity index 68% rename from admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-mpi.gitlab-ci.yml rename to admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml index d301083998..85713c08c3 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-mpi.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-mpi.gitlab-ci.yml @@ -1,7 +1,7 @@ # Test goal: Clang build with MPI and double precision # Test intents (should change rarely and conservatively): # OS: Ubuntu oldest supported -# Compiler: Clang +# Compiler: Clang newest supported # GPU: no # MPI: OpenMPI # Features: double precision FP @@ -9,28 +9,28 @@ # Test implementation choices (free to change as needed): # OS: Ubuntu 20.04 # Build type: Debug -# Compiler: Clang 9 +# Compiler: Clang 12 # MPI: OpenMPI 3.1 # SIMD: AVX2_256 # FFT: FFTW3 # Parallelism np/ntomp: 4/2 # Subcyclecounting: Active -gromacs:clang-9-mpi:configure: +gromacs:clang-12-mpi:configure: extends: - .gromacs:base:configure - .use-clang:base - .use-mpi - .rules:merge-requests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 variables: CMAKE: /usr/local/cmake-3.17.2/bin/cmake - COMPILER_MAJOR_VERSION: 9 + COMPILER_MAJOR_VERSION: 12 CMAKE_PRECISION_OPTIONS: -DGMX_DOUBLE=ON CMAKE_EXTRA_OPTIONS: -DGMX_CYCLE_SUBCOUNTERS=ON -DGMX_INSTALL_LEGACY_API=ON -gromacs:clang-9-mpi:build: - # Test using configuration: gromacs:clang-9-mpi:configure +gromacs:clang-12-mpi:build: + # Test using configuration: gromacs:clang-12-mpi:configure # Test scope: build extends: - .variables:default @@ -38,29 +38,29 @@ gromacs:clang-9-mpi:build: - .before_script:default - .use-ccache - .rules:merge-requests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 variables: CMAKE: /usr/local/cmake-3.17.2/bin/cmake needs: - - job: gromacs:clang-9-mpi:configure + - job: gromacs:clang-12-mpi:configure -gromacs:clang-9-mpi:test: +gromacs:clang-12-mpi:test: extends: - .gromacs:base:test - .rules:merge-requests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 variables: CMAKE: /usr/local/cmake-3.17.2/bin/cmake tags: - k8s-scilifelab needs: - - job: gromacs:clang-9-mpi:build + - job: gromacs:clang-12-mpi:build -gromacs:clang-9:regressiontest: +gromacs:clang-12:regressiontest: extends: - .gromacs:base:regressiontest - .rules:merge-requests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 variables: CMAKE: /usr/local/cmake-3.17.2/bin/cmake REGRESSIONTEST_DOUBLE: "-double" @@ -68,6 +68,6 @@ gromacs:clang-9:regressiontest: tags: - k8s-scilifelab needs: - - job: gromacs:clang-9-mpi:build + - job: gromacs:clang-12-mpi:build - job: regressiontests:prepare diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-release.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml similarity index 72% rename from admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-release.gitlab-ci.yml rename to admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml index 32ad653109..67363c4e53 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-9-release.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-12-release.gitlab-ci.yml @@ -1,7 +1,7 @@ # Test goal: Release build with Clang, MPI, and double-precision # Test intents (should change rarely and conservatively): # OS: Ubuntu oldest supported -# Compiler: Clang +# Compiler: Clang newest supported # MPI: OpenMPI # GPU: no # Features: double precision FP @@ -9,22 +9,22 @@ # Test implementation choices (free to change as needed): # OS: Ubuntu 20.04 # Build type: RelWithAssert -# Compiler: Clang 9 +# Compiler: Clang 12 # MPI: OpenMPI 3.1 # SIMD: AVX2_256 # FFT: FFTW3 # Parallelism np/ntomp: 4/2 -gromacs:clang-9:release:configure: +gromacs:clang-12:release:configure: extends: - .gromacs:base:release:configure - .use-clang:base - .use-mpi - .rules:nightly-only-for-release - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake - COMPILER_MAJOR_VERSION: 9 + COMPILER_MAJOR_VERSION: 12 RELEASE_BUILD_DIR: release-builds-clang CMAKE_PRECISION_OPTIONS: "-DGMX_DOUBLE=ON" CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert" @@ -33,7 +33,7 @@ gromacs:clang-9:release:configure: - regressiontests:package - prepare-release-version -gromacs:clang-9:release:build: +gromacs:clang-12:release:build: extends: - .variables:default - .gromacs:base:build @@ -44,29 +44,29 @@ gromacs:clang-9:release:build: variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-clang - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 needs: - - job: gromacs:clang-9:release:configure + - job: gromacs:clang-12:release:configure -gromacs:clang-9:release:test: +gromacs:clang-12:release:test: extends: - .gromacs:base:test - .rules:nightly-only-for-release stage: release-tests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-clang needs: - - job: gromacs:clang-9:release:configure - - job: gromacs:clang-9:release:build + - job: gromacs:clang-12:release:configure + - job: gromacs:clang-12:release:build -gromacs:clang-9:release:regressiontest: +gromacs:clang-12:release:regressiontest: extends: - .gromacs:base:regressiontest - .rules:nightly-only-for-release stage: release-tests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-12 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-clang @@ -75,6 +75,6 @@ gromacs:clang-9:release:regressiontest: tags: - k8s-scilifelab needs: - - job: gromacs:clang-9:release:build + - job: gromacs:clang-12:release:build - job: regressiontests:package diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml index 39536fb831..722e5a28f8 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.clang-static-analyzer.gitlab-ci.yml @@ -10,7 +10,7 @@ # Scope: configure, build # Test implementation choices (free to change as needed): # OS: Ubuntu 20.04 -# Compiler: Clang 8 +# Compiler: Clang 11 gromacs:clang-static-analyzer:configure: extends: diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10-coverage.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-coverage.gitlab-ci.yml similarity index 78% rename from admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10-coverage.gitlab-ci.yml rename to admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-coverage.gitlab-ci.yml index b8e2190c94..82c2ede108 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10-coverage.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-coverage.gitlab-ci.yml @@ -1,53 +1,53 @@ # Test goal: code coverage with newest GCC # Test intents (should change rarely and conservatively): # OS: Ubuntu newest supported -# Compiler: GCC newest supported +# Compiler: GCC # GPU: no # Scope: configure, build, unit tests, coverage # Test implementation choices (free to change as needed): # OS: Ubuntu 20.04 # Build type: Debug -# Compiler: GCC 10 +# Compiler: GCC 11 # MPI: thread_MPI # SIMD: AVX2_256 # Parallelism nt/ntomp: 4/2 (unit tests) -gromacs:gcc-10:coverage:configure: +gromacs:gcc-11:coverage:configure: extends: - .gromacs:base:configure - .use-gcc:base - .rules:post-merge-acceptance - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.18.4/bin/cmake CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AVX2_256" CMAKE_EXTRA_OPTIONS: "-DGMX_BUILD_FOR_COVERAGE=ON" - COMPILER_MAJOR_VERSION: 10 + COMPILER_MAJOR_VERSION: 11 -gromacs:gcc-10:coverage:build: +gromacs:gcc-11:coverage:build: extends: - .variables:default - .gromacs:base:build - .before_script:default - .use-ccache - .rules:post-merge-acceptance - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.18.4/bin/cmake needs: - - job: gromacs:gcc-10:coverage:configure + - job: gromacs:gcc-11:coverage:configure -gromacs:gcc-10:coverage:test: +gromacs:gcc-11:coverage:test: extends: - .gromacs:base:test - .rules:post-merge-acceptance - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.18.4/bin/cmake tags: - k8s-scilifelab needs: - - job: gromacs:gcc-10:coverage:build + - job: gromacs:gcc-11:coverage:build artifacts: paths: - $BUILD_DIR @@ -56,16 +56,16 @@ gromacs:coverage:analyse: variables: CMAKE: /usr/local/cmake-3.18.4/bin/cmake VENVPATH: "/root/venv/py3.7" - GCOVR_GENERAL_OPTIONS: "-r ../ /. --gcov-executable=gcov-10 --exclude-unreachable-branches --exclude-throw-branches -j$KUBERNETES_CPU_LIMIT" + GCOVR_GENERAL_OPTIONS: "-r ../ /. --gcov-executable=gcov-11 --exclude-unreachable-branches --exclude-throw-branches -j$KUBERNETES_CPU_LIMIT" GCOVR_EXCLUDE_OPTIONS: "--exclude-directories '^src/external/.*' --exclude-directories '^src/gromacs/selection/.*' --exclude-directories '.*tests.*" extends: - .variables:default - .rules:post-merge-acceptance stage: post-test - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 needs: - - job: gromacs:gcc-10:coverage:build - - job: gromacs:gcc-10:coverage:test + - job: gromacs:gcc-11:coverage:build + - job: gromacs:gcc-11:coverage:test tags: - k8s-scilifelab diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-9-release.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-release.gitlab-ci.yml similarity index 74% rename from admin/gitlab-ci/gromacs.matrix/gromacs.gcc-9-release.gitlab-ci.yml rename to admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-release.gitlab-ci.yml index 846f36aaa5..908ff6e91f 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-9-release.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11-release.gitlab-ci.yml @@ -1,30 +1,30 @@ # Test goal: Release build with GCC and OpenCL # Test intents (should change rarely and conservatively): # OS: Ubuntu oldest supported -# Compiler: GCC +# Compiler: GCC newest supported # GPU: OpenCL # HW: AMD GPU # Scope: configure, build, unit tests, regression tests # Test implementation choices (free to change as needed): # OS: Ubuntu 20.04 # Build type: RelWithAssert -# Compiler: GCC 9 +# Compiler: GCC 11 # MPI: thread_MPI # SIMD: AVX2_256 # FFT: FFTW3 # Parallelism nt/ntomp: 4/2 (unit tests) # Parallelism nt/ntomp: 2/1 (regression tests) -gromacs:gcc-9:release:configure: +gromacs:gcc-11:release:configure: extends: - .gromacs:base:release:configure - .use-gcc:base - .use-opencl - .rules:nightly-only-for-release - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake - COMPILER_MAJOR_VERSION: 9 + COMPILER_MAJOR_VERSION: 11 RELEASE_BUILD_DIR: release-builds-gcc CMAKE_BUILD_TYPE_OPTIONS: "-DCMAKE_BUILD_TYPE=RelWithAssert" dependencies: @@ -32,8 +32,8 @@ gromacs:gcc-9:release:configure: - regressiontests:package - prepare-release-version -gromacs:gcc-9:release:build: - # Test using configuration: gromacs:gcc-9:release:configure +gromacs:gcc-11:release:build: + # Test using configuration: gromacs:gcc-11:release:configure # Test scope: build extends: - .variables:default @@ -45,16 +45,16 @@ gromacs:gcc-9:release:build: variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-gcc - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 needs: - - job: gromacs:gcc-9:release:configure + - job: gromacs:gcc-11:release:configure -gromacs:gcc-9:release:test: +gromacs:gcc-11:release:test: extends: - .gromacs:base:test - .rules:nightly-only-for-release stage: release-tests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-gcc @@ -64,15 +64,15 @@ gromacs:gcc-9:release:test: tags: - k8s-scilifelab needs: - - job: gromacs:gcc-9:release:configure - - job: gromacs:gcc-9:release:build + - job: gromacs:gcc-11:release:configure + - job: gromacs:gcc-11:release:build -gromacs:gcc-9:release:regressiontest: +gromacs:gcc-11:release:regressiontest: extends: - .gromacs:base:regressiontest - .rules:nightly-only-for-release stage: release-tests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-9 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake BUILD_DIR: release-builds-gcc @@ -85,6 +85,6 @@ gromacs:gcc-9:release:regressiontest: tags: - k8s-scilifelab needs: - - job: gromacs:gcc-9:release:build + - job: gromacs:gcc-11:release:build - job: regressiontests:package diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11.gitlab-ci.yml similarity index 77% rename from admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10.gitlab-ci.yml rename to admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11.gitlab-ci.yml index 64cb95d1b5..b08e1da045 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-10.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.gcc-11.gitlab-ci.yml @@ -9,43 +9,43 @@ # Test implementation choices (free to change as needed): # OS: Ubuntu 20.04 # Build type: Debug -# Compiler: GCC 10 +# Compiler: GCC 11 # MPI: thread_MPI # SIMD: AVX2_256 # Parallelism nt/ntomp: 4/2 (unit tests) # Parallelism nt/ntomp: 2/1 (regression tests) -gromacs:gcc-10:configure: +gromacs:gcc-11:configure: extends: - .gromacs:base:configure - .use-gcc:base - .use-opencl - .rules:merge-and-post-merge-acceptance - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake CMAKE_SIMD_OPTIONS: "-DGMX_SIMD=AVX2_256" CMAKE_EXTRA_OPTIONS: "-DGMX_EXTERNAL_CLFFT=ON" - COMPILER_MAJOR_VERSION: 10 + COMPILER_MAJOR_VERSION: 11 -gromacs:gcc-10:build: +gromacs:gcc-11:build: extends: - .variables:default - .gromacs:base:build - .before_script:default - .use-ccache - .rules:merge-and-post-merge-acceptance - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake needs: - - job: gromacs:gcc-10:configure + - job: gromacs:gcc-11:configure -gromacs:gcc-10:test: +gromacs:gcc-11:test: extends: - .gromacs:base:test - .rules:merge-requests - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "amd.com/gpu" @@ -54,13 +54,13 @@ gromacs:gcc-10:test: tags: - k8s-scilifelab needs: - - job: gromacs:gcc-10:build + - job: gromacs:gcc-11:build -gromacs:gcc-10:regressiontest: +gromacs:gcc-11:regressiontest: extends: - .gromacs:base:regressiontest - .rules:post-merge-acceptance - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 variables: CMAKE: /usr/local/cmake-3.16.3/bin/cmake KUBERNETES_EXTENDED_RESOURCE_NAME: "amd.com/gpu" @@ -72,6 +72,6 @@ gromacs:gcc-10:regressiontest: tags: - k8s-scilifelab needs: - - job: gromacs:gcc-10:build + - job: gromacs:gcc-11:build - job: regressiontests:prepare diff --git a/admin/gitlab-ci/gromacs.matrix/gromacs.hipsycl-dev.gitlab-ci.yml b/admin/gitlab-ci/gromacs.matrix/gromacs.hipsycl-dev.gitlab-ci.yml index 93d645170c..bd6b25e8f5 100644 --- a/admin/gitlab-ci/gromacs.matrix/gromacs.hipsycl-dev.gitlab-ci.yml +++ b/admin/gitlab-ci/gromacs.matrix/gromacs.hipsycl-dev.gitlab-ci.yml @@ -1,7 +1,7 @@ # Test goal: build with hipSYCL (both CUDA and ROCm backends) to check SYCL code compatibility # Test intents (should change rarely and conservatively): # OS: Ubuntu newest supported -# Compiler: Clang newest supported +# Compiler: Clang # GPU: hipSYCL # Scope: configure, build # Test implementation choices (free to change as needed): diff --git a/admin/gitlab-ci/python-gmxapi01.gitlab-ci.yml b/admin/gitlab-ci/python-gmxapi01.gitlab-ci.yml index 32de191be5..280b2aa289 100644 --- a/admin/gitlab-ci/python-gmxapi01.gitlab-ci.yml +++ b/admin/gitlab-ci/python-gmxapi01.gitlab-ci.yml @@ -74,11 +74,11 @@ gmxapi-0.1:clang-8:py-3.8.2: VENVPATH: "/root/venv/py3.8" PY_VER: "3.8.2" -.gmxapi-0.2:gcc-10:gmx2021: +.gmxapi-0.2:gcc-11:gmx2021: extends: - .variables:default - .use-clang:base - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 stage: test variables: KUBERNETES_CPU_LIMIT: 2 @@ -105,36 +105,36 @@ gmxapi-0.1:clang-8:py-3.8.2: - k8s-scilifelab # The dependency means we need to use the same tag restriction as upstream. needs: - - job: gromacs:gcc-10:build + - job: gromacs:gcc-11:build artifacts: true -gmxapi-0.2:gcc-10:gmx2021:py-3.6.10: +gmxapi-0.2:gcc-11:gmx2021:py-3.6.10: extends: - - .gmxapi-0.2:gcc-10:gmx2021 + - .gmxapi-0.2:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.6" PY_VER: "3.6.10" -gmxapi-0.2:gcc-10:gmx2021:py-3.7.7: +gmxapi-0.2:gcc-11:gmx2021:py-3.7.7: extends: - - .gmxapi-0.2:gcc-10:gmx2021 + - .gmxapi-0.2:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.7" PY_VER: "3.7.7" -gmxapi-0.2:gcc-10:gmx2021:py-3.8.2: +gmxapi-0.2:gcc-11:gmx2021:py-3.8.2: extends: - - .gmxapi-0.2:gcc-10:gmx2021 + - .gmxapi-0.2:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.8" PY_VER: "3.8.2" -gmxapi-0.2:gcc-10:gmx2021:py-3.9.1: +gmxapi-0.2:gcc-11:gmx2021:py-3.9.1: extends: - - .gmxapi-0.2:gcc-10:gmx2021 + - .gmxapi-0.2:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.9" diff --git a/admin/gitlab-ci/python-gmxapi02.gitlab-ci.yml b/admin/gitlab-ci/python-gmxapi02.gitlab-ci.yml index fc267ecfa7..6e132b4b1e 100644 --- a/admin/gitlab-ci/python-gmxapi02.gitlab-ci.yml +++ b/admin/gitlab-ci/python-gmxapi02.gitlab-ci.yml @@ -2,11 +2,11 @@ # Jobs to test gmxapi client (Python) packages # -.gmxapi-0.2:gcc-10:gmx2021: +.gmxapi-0.2:gcc-11:gmx2021: extends: - .variables:default - .use-clang:base - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 stage: test variables: KUBERNETES_CPU_LIMIT: 2 @@ -33,28 +33,28 @@ - k8s-scilifelab # The dependency means we need to use the same tag restriction as upstream. needs: - - job: gromacs:gcc-10:build + - job: gromacs:gcc-11:build artifacts: true -gmxapi-0.2:gcc-10:gmx2021:py-3.6.10: +gmxapi-0.2:gcc-11:gmx2021:py-3.6.10: extends: - - .gmxapi-0.2:gcc-10:gmx2021 + - .gmxapi-0.2:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.6" PY_VER: "3.6.10" -gmxapi-0.2:gcc-10:gmx2021:py-3.7.7: +gmxapi-0.2:gcc-11:gmx2021:py-3.7.7: extends: - - .gmxapi-0.2:gcc-10:gmx2021 + - .gmxapi-0.2:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.7" PY_VER: "3.7.7" -gmxapi-0.2:gcc-10:gmx2021:py-3.8.2: +gmxapi-0.2:gcc-11:gmx2021:py-3.8.2: extends: - - .gmxapi-0.2:gcc-10:gmx2021 + - .gmxapi-0.2:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.8" diff --git a/admin/gitlab-ci/sample_restraint.gitlab-ci.yml b/admin/gitlab-ci/sample_restraint.gitlab-ci.yml index 629efb245d..652a6a43ae 100644 --- a/admin/gitlab-ci/sample_restraint.gitlab-ci.yml +++ b/admin/gitlab-ci/sample_restraint.gitlab-ci.yml @@ -1,9 +1,9 @@ # Base job definition for sample_restraint tests against GROMACS 2021. -.sample_restraint:gcc-10:gmx2021: +.sample_restraint:gcc-11:gmx2021: extends: - .variables:default - .use-clang:base - image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-10 + image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-gcc-11 stage: test variables: KUBERNETES_CPU_LIMIT: 2 @@ -27,36 +27,36 @@ - k8s-scilifelab # The dependency means we need to use the same tag restriction as upstream. needs: - - job: gromacs:gcc-10:build + - job: gromacs:gcc-11:build artifacts: true -sample_restraint:gcc-10:gmx2021:py-3.6.10: +sample_restraint:gcc-11:gmx2021:py-3.6.10: extends: - - .sample_restraint:gcc-10:gmx2021 + - .sample_restraint:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.6" PY_VER: "3.6.10" -sample_restraint:gcc-10:gmx2021:py-3.7.7: +sample_restraint:gcc-11:gmx2021:py-3.7.7: extends: - - .sample_restraint:gcc-10:gmx2021 + - .sample_restraint:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.7" PY_VER: "3.7.7" -sample_restraint:gcc-10:gmx2021:py-3.8.2: +sample_restraint:gcc-11:gmx2021:py-3.8.2: extends: - - .sample_restraint:gcc-10:gmx2021 + - .sample_restraint:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.8" PY_VER: "3.8.2" -sample_restraint:gcc-10:gmx2021:py-3.9.1: +sample_restraint:gcc-11:gmx2021:py-3.9.1: extends: - - .sample_restraint:gcc-10:gmx2021 + - .sample_restraint:gcc-11:gmx2021 - .rules:merge-requests:release-2021 variables: VENVPATH: "/root/venv/py3.9" diff --git a/src/external/googletest/README.Gromacs b/src/external/googletest/README.Gromacs index 2af82650f8..06181514d6 100644 --- a/src/external/googletest/README.Gromacs +++ b/src/external/googletest/README.Gromacs @@ -58,7 +58,7 @@ Some compiler warnings cannot be suppressed through CMake machinery, such as for the clang static analyzer, and some lines are removed from consideration by wrapping with `#ifndef __clang_analyzer__` or marking them with `/*NOLINT*/` comment. -... `#endif`. +... `#endif`. A suppression is added to internal_utils.cmake. GoogleTest declares quite old minimum CMake versions, which newer CMake versions warn about. In practice, the CMake version requirement diff --git a/src/external/googletest/googletest/cmake/internal_utils.cmake b/src/external/googletest/googletest/cmake/internal_utils.cmake index 8c1f9ba99c..8d66ebd047 100644 --- a/src/external/googletest/googletest/cmake/internal_utils.cmake +++ b/src/external/googletest/googletest/cmake/internal_utils.cmake @@ -102,6 +102,7 @@ macro(config_compiler_and_linker) set(cxx_base_flags "-Wall -Wshadow -Werror") if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0) set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else") + set(cxx_base_flags "${cxx_base_flags} -Wno-maybe-uninitialized") endif() set(cxx_exception_flags "-fexceptions") set(cxx_no_exception_flags "-fno-exceptions") diff --git a/src/gromacs/gmxpreprocess/h_db.cpp b/src/gromacs/gmxpreprocess/h_db.cpp index 14b4528320..1dbba4add8 100644 --- a/src/gromacs/gmxpreprocess/h_db.cpp +++ b/src/gromacs/gmxpreprocess/h_db.cpp @@ -4,7 +4,7 @@ * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. - * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2018,2019,2020,2021, 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. @@ -116,7 +116,8 @@ void read_ab(char* line, const char* fn, MoleculePatch* hack) ncontrol[hack->tp], line); } - for (int i = 0; (i < hack->nctl); i++) + // (i < 4) is redundant, but it silences GCC-11 warning + for (int i = 0; (i < hack->nctl) && (i < 4); i++) { hack->a[i] = a[i]; } diff --git a/src/gromacs/utility/tests/path.cpp b/src/gromacs/utility/tests/path.cpp index 38638befd5..539b239c4f 100644 --- a/src/gromacs/utility/tests/path.cpp +++ b/src/gromacs/utility/tests/path.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2016,2018,2019,2020, by the GROMACS development team, led by + * Copyright (c) 2016,2018,2019,2020,2021, 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. @@ -72,60 +72,66 @@ TEST(PathTest, StripSourcePrefixWorks) << "This only affects source paths reported in fatal error messages."; } -TEST(PathTest, SearchOperationsWork) +class PathSearchTest : public testing::TestWithParam +{ +}; + +TEST_P(PathSearchTest, SearchOperationsWork) { gmx::test::TestReferenceData data; gmx::test::TestReferenceChecker rootChecker(data.rootChecker()); - for (const std::string& input : { "", - "md.log", - "md", - "/tmp/absolute.txt", - "simpledir/traj.tng", - "simpledir/traj", - "windowsdir\\traj.tng", - "complex.dir/traj.tng", - "complex.dir/traj", - "nested/dir/conf.pdb", - "/tmp/absolutedir/conf.pdb" }) + std::string input = GetParam(); + + auto checker = rootChecker.checkCompound("PathToTest", input); + { + std::string result; + ASSERT_NO_THROW_GMX(result = Path::getParentPath(input)); + checker.checkString(result, "getParentPath"); + } + { + std::string result; + ASSERT_NO_THROW_GMX(result = Path::getFilename(input)); + checker.checkString(result, "getFilename"); + } { - SCOPED_TRACE(std::string("for input '") + input + "'"); - auto checker = rootChecker.checkCompound("PathToTest", input); - { - std::string result; - ASSERT_NO_THROW_GMX(result = Path::getParentPath(input)); - checker.checkString(result, "getParentPath"); - } - { - std::string result; - ASSERT_NO_THROW_GMX(result = Path::getFilename(input)); - checker.checkString(result, "getFilename"); - } - { - bool result = false; - ASSERT_NO_THROW_GMX(result = Path::hasExtension(input)); - checker.checkBoolean(result, "hasExtension"); - } - { - bool result = false; - ASSERT_NO_THROW_GMX(result = Path::extensionMatches(input, "pdb")); - checker.checkBoolean(result, "extensionMatchesPdb"); - // The match is exclusive of the dot separator, so no - // input string can match. - ASSERT_FALSE(Path::extensionMatches(input, ".pdb")); - } - { - std::string result; - ASSERT_NO_THROW_GMX(result = Path::stripExtension(input)); - checker.checkString(result, "stripExtension"); - } - { - std::string result; - ASSERT_NO_THROW_GMX(result = Path::concatenateBeforeExtension(input, "_34")); - checker.checkString(result, "concatenateBeforeExtension"); - } + bool result = false; + ASSERT_NO_THROW_GMX(result = Path::hasExtension(input)); + checker.checkBoolean(result, "hasExtension"); + } + { + bool result = false; + ASSERT_NO_THROW_GMX(result = Path::extensionMatches(input, "pdb")); + checker.checkBoolean(result, "extensionMatchesPdb"); + // The match is exclusive of the dot separator, so no + // input string can match. + ASSERT_FALSE(Path::extensionMatches(input, ".pdb")); + } + { + std::string result; + ASSERT_NO_THROW_GMX(result = Path::stripExtension(input)); + checker.checkString(result, "stripExtension"); + } + { + std::string result; + ASSERT_NO_THROW_GMX(result = Path::concatenateBeforeExtension(input, "_34")); + checker.checkString(result, "concatenateBeforeExtension"); } } +INSTANTIATE_TEST_CASE_P(WithInputPaths, + PathSearchTest, + testing::Values("", + "md.log", + "md", + "/tmp/absolute.txt", + "simpledir/traj.tng", + "simpledir/traj", + "windowsdir\\traj.tng", + "complex.dir/traj.tng", + "complex.dir/traj", + "nested/dir/conf.pdb", + "/tmp/absolutedir/conf.pdb")); + } // namespace } // namespace test } // namespace gmx diff --git a/src/gromacs/utility/tests/refdata/PathTest_SearchOperationsWork.xml b/src/gromacs/utility/tests/refdata/PathTest_SearchOperationsWork.xml deleted file mode 100644 index c864749ad7..0000000000 --- a/src/gromacs/utility/tests/refdata/PathTest_SearchOperationsWork.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - false - false - - _34 - - - - md.log - true - false - md - md_34.log - - - - md - false - false - md - md_34 - - - /tmp - absolute.txt - true - false - /tmp/absolute - /tmp/absolute_34.txt - - - simpledir - traj.tng - true - false - simpledir/traj - simpledir/traj_34.tng - - - simpledir - traj - false - false - simpledir/traj - simpledir/traj_34 - - - windowsdir - traj.tng - true - false - windowsdir\traj - windowsdir\traj_34.tng - - - complex.dir - traj.tng - true - false - complex.dir/traj - complex.dir/traj_34.tng - - - complex.dir - traj - false - false - complex.dir/traj - complex.dir/traj_34 - - - nested/dir - conf.pdb - true - true - nested/dir/conf - nested/dir/conf_34.pdb - - - /tmp/absolutedir - conf.pdb - true - true - /tmp/absolutedir/conf - /tmp/absolutedir/conf_34.pdb - - diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_0.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_0.xml new file mode 100644 index 0000000000..5bf7e5fe2d --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_0.xml @@ -0,0 +1,12 @@ + + + + + + + false + false + + _34 + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_1.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_1.xml new file mode 100644 index 0000000000..309d8b088f --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_1.xml @@ -0,0 +1,12 @@ + + + + + + md.log + true + false + md + md_34.log + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_10.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_10.xml new file mode 100644 index 0000000000..4380497410 --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_10.xml @@ -0,0 +1,12 @@ + + + + + /tmp/absolutedir + conf.pdb + true + true + /tmp/absolutedir/conf + /tmp/absolutedir/conf_34.pdb + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_2.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_2.xml new file mode 100644 index 0000000000..6974cfc945 --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_2.xml @@ -0,0 +1,12 @@ + + + + + + md + false + false + md + md_34 + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_3.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_3.xml new file mode 100644 index 0000000000..aa31f1f5e8 --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_3.xml @@ -0,0 +1,12 @@ + + + + + /tmp + absolute.txt + true + false + /tmp/absolute + /tmp/absolute_34.txt + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_4.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_4.xml new file mode 100644 index 0000000000..2f2b99486e --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_4.xml @@ -0,0 +1,12 @@ + + + + + simpledir + traj.tng + true + false + simpledir/traj + simpledir/traj_34.tng + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_5.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_5.xml new file mode 100644 index 0000000000..4e61b9d9b1 --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_5.xml @@ -0,0 +1,12 @@ + + + + + simpledir + traj + false + false + simpledir/traj + simpledir/traj_34 + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_6.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_6.xml new file mode 100644 index 0000000000..eac21715eb --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_6.xml @@ -0,0 +1,12 @@ + + + + + windowsdir + traj.tng + true + false + windowsdir\traj + windowsdir\traj_34.tng + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_7.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_7.xml new file mode 100644 index 0000000000..28f13d9021 --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_7.xml @@ -0,0 +1,12 @@ + + + + + complex.dir + traj.tng + true + false + complex.dir/traj + complex.dir/traj_34.tng + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_8.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_8.xml new file mode 100644 index 0000000000..ff939d6baf --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_8.xml @@ -0,0 +1,12 @@ + + + + + complex.dir + traj + false + false + complex.dir/traj + complex.dir/traj_34 + + diff --git a/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_9.xml b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_9.xml new file mode 100644 index 0000000000..b976f88364 --- /dev/null +++ b/src/gromacs/utility/tests/refdata/WithInputPaths_PathSearchTest_SearchOperationsWork_9.xml @@ -0,0 +1,12 @@ + + + + + nested/dir + conf.pdb + true + true + nested/dir/conf + nested/dir/conf_34.pdb + + diff --git a/src/programs/mdrun/tests/periodicactions.cpp b/src/programs/mdrun/tests/periodicactions.cpp index cbf98ae577..81ee46702f 100644 --- a/src/programs/mdrun/tests/periodicactions.cpp +++ b/src/programs/mdrun/tests/periodicactions.cpp @@ -336,11 +336,14 @@ std::vector propagationParametersWithCoupling() std::string nstcomm = "5"; std::vector parameterSets; - for (const std::string& simulationName : { "argon12" }) + std::vector simulations = { "argon12" }; + for (const std::string& simulationName : simulations) { - for (const std::string& integrator : { "md", "sd", "md-vv" }) + std::vector integrators{ "md", "sd", "md-vv" }; + for (const std::string& integrator : integrators) { - for (const std::string& tcoupl : { "no", "v-rescale", "Nose-Hoover" }) + std::vector tcouplValues{ "no", "v-rescale", "Nose-Hoover" }; + for (const std::string& tcoupl : tcouplValues) { // SD doesn't support temperature-coupling algorithms, if (integrator == "sd" && tcoupl != "no") @@ -403,11 +406,14 @@ std::vector propagationParametersWithConstraints() std::string nstcomm = "5"; std::vector parameterSets; - for (const std::string& simulationName : { "tip3p5" }) + std::vector simulations = { "tip3p5" }; + for (const std::string& simulationName : simulations) { - for (const std::string& integrator : { "md", "sd", "md-vv" }) + std::vector integrators{ "md", "sd", "md-vv" }; + for (const std::string& integrator : integrators) { - for (const std::string& tcoupl : { "no", "v-rescale" }) + std::vector tcouplValues{ "no", "v-rescale" }; + for (const std::string& tcoupl : tcouplValues) { // SD doesn't support temperature-coupling algorithms, if (integrator == "sd" && tcoupl != "no")