Skip to content

Commit

Permalink
Support recent Linux distributions (#4526)
Browse files Browse the repository at this point in the history
Description of changes:
- fix compiler warnings and diagnostics from recent GCC/Clang releases
- fix CMake 3.22 warnings and Python 3.10 numpy warnings
- update installation instructions for Ubuntu 22.04 and macOS
- check Fedora 36 and Ubuntu 22.04 in CI
- add support for Sphinx 5.0.0
  • Loading branch information
kodiakhq[bot] authored Jun 21, 2022
2 parents e9f8e53 + 285e451 commit 8a92c36
Show file tree
Hide file tree
Showing 22 changed files with 171 additions and 135 deletions.
69 changes: 33 additions & 36 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: ghcr.io/espressomd/docker/ubuntu-20.04:285fee33c6cdc3b617745a75bd28aec331a53365
image: ghcr.io/espressomd/docker/ubuntu-20.04:7ec021ab4af6f89d65121db2eb24acb1ed452e02

stages:
- prepare
Expand Down Expand Up @@ -26,7 +26,6 @@ stages:
timeout: 40m
interruptible: false
tags:
- docker
- espresso
- no-cuda

Expand All @@ -51,7 +50,6 @@ style:
script:
- sh maintainer/CI/fix_style.sh
tags:
- docker
- espresso
- no-cuda
variables:
Expand All @@ -73,7 +71,6 @@ style_doxygen:
- cmake .. -DWITH_CUDA=ON -DWITH_SCAFACOS=ON
- sh ../maintainer/CI/dox_warnings.sh
tags:
- docker
- espresso
- no-cuda

Expand All @@ -94,7 +91,6 @@ default:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- no-cuda

Expand All @@ -115,7 +111,6 @@ maxset:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- no-cuda
- numa
Expand All @@ -134,15 +129,14 @@ no_rotation:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- no-cuda
- numa

ubuntu:wo-dependencies:
<<: *global_job_definition
stage: build
image: ghcr.io/espressomd/docker/ubuntu-wo-dependencies:285fee33c6cdc3b617745a75bd28aec331a53365
image: ghcr.io/espressomd/docker/ubuntu-wo-dependencies:7ec021ab4af6f89d65121db2eb24acb1ed452e02
variables:
myconfig: 'maxset'
with_cuda: 'false'
Expand All @@ -152,7 +146,6 @@ ubuntu:wo-dependencies:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- no-cuda

Expand All @@ -161,7 +154,7 @@ ubuntu:wo-dependencies:
debian:10:
<<: *global_job_definition
stage: build
image: ghcr.io/espressomd/docker/debian:285fee33c6cdc3b617745a75bd28aec331a53365
image: ghcr.io/espressomd/docker/debian:7ec021ab4af6f89d65121db2eb24acb1ed452e02
variables:
with_cuda: 'false'
myconfig: 'maxset'
Expand All @@ -170,14 +163,13 @@ debian:10:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- no-cuda

fedora:34:
fedora:36:
<<: *global_job_definition
stage: build
image: ghcr.io/espressomd/docker/fedora:285fee33c6cdc3b617745a75bd28aec331a53365
image: ghcr.io/espressomd/docker/fedora:7ec021ab4af6f89d65121db2eb24acb1ed452e02
variables:
with_cuda: 'false'
myconfig: 'maxset'
Expand All @@ -186,7 +178,6 @@ fedora:34:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- no-cuda

Expand All @@ -212,15 +203,14 @@ clang-sanitizer:
- bash maintainer/CI/build_cmake.sh
timeout: 2h
tags:
- docker
- espresso
- cuda
- numa

fast_math:
<<: *global_job_definition
stage: build
image: ghcr.io/espressomd/docker/cuda:285fee33c6cdc3b617745a75bd28aec331a53365
image: ghcr.io/espressomd/docker/cuda:7ec021ab4af6f89d65121db2eb24acb1ed452e02
variables:
CC: 'gcc-9'
CXX: 'g++-9'
Expand All @@ -233,15 +223,14 @@ fast_math:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- cuda
when: manual

cuda11-maxset:
cuda11-maxset-ubuntu20.04:
<<: *global_job_definition
stage: build
image: ghcr.io/espressomd/docker/cuda:285fee33c6cdc3b617745a75bd28aec331a53365
image: ghcr.io/espressomd/docker/cuda:7ec021ab4af6f89d65121db2eb24acb1ed452e02
variables:
CC: 'gcc-9'
CXX: 'g++-9'
Expand All @@ -250,13 +239,32 @@ cuda11-maxset:
with_cuda: 'true'
with_coverage: 'true'
check_skip_long: 'true'
srcdir: '${CI_PROJECT_DIR}'
with_scafacos: 'true'
with_stokesian_dynamics: 'true'
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- cuda
- numa

cuda11-maxset-ubuntu22.04:
<<: *global_job_definition
stage: build
image: ghcr.io/espressomd/docker/ubuntu-22.04:7ec021ab4af6f89d65121db2eb24acb1ed452e02
variables:
CC: 'gcc-10'
CXX: 'g++-10'
GCOV: 'gcov-10'
myconfig: 'maxset'
with_cuda: 'true'
with_coverage: 'true'
check_skip_long: 'true'
with_scafacos: 'true'
with_stokesian_dynamics: 'true'
script:
- bash maintainer/CI/build_cmake.sh
tags:
- espresso
- cuda
- numa
Expand All @@ -282,7 +290,6 @@ cuda10-maxset:
- build/
expire_in: 1 week
tags:
- docker
- espresso
- cuda
- numa
Expand All @@ -307,7 +314,6 @@ tutorials-samples-maxset:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- cuda

Expand All @@ -330,7 +336,6 @@ tutorials-samples-default:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- cuda
only:
Expand All @@ -356,7 +361,6 @@ tutorials-samples-empty:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- cuda
only:
Expand All @@ -382,7 +386,6 @@ tutorials-samples-no-gpu:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- no-cuda
only:
Expand Down Expand Up @@ -410,15 +413,15 @@ installation:
# get path of installed files
- CI_INSTALL_DIR="/tmp/espresso-unit-tests"
- CI_INSTALL_PYTHON_PATH=$(dirname $(find "${CI_INSTALL_DIR}/lib" -name espressomd))
- CI_CORES=$(cmake -L . | grep CTEST_ARGS | grep --color=never -Po '(?<=-j)[0-9]+')
# deploy object-in-fluid module
- cp -r "src/python/object_in_fluid" "${CI_INSTALL_PYTHON_PATH}/object_in_fluid"
# run all tests with the installed files
- sed -i "s|$(pwd)/pypresso|${CI_INSTALL_DIR}/bin/pypresso|" testsuite/{python,scripts/samples,scripts/tutorials}/CTestTestfile.cmake
- make -j2 check_python
- make -j2 check_samples
- make -j2 check_tutorials
- make -j ${CI_CORES} check_python_skip_long
- make -j ${CI_CORES} check_samples
- make -j 2 check_tutorials
tags:
- docker
- espresso
- cuda
when: manual
Expand All @@ -438,7 +441,6 @@ empty:
script:
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- espresso
- cuda
- numa
Expand All @@ -461,7 +463,6 @@ check_sphinx:
- build/doc/sphinx
expire_in: 1 week
tags:
- docker
- espresso
- cuda
- numa
Expand All @@ -486,7 +487,6 @@ run_tutorials:
- build/doc/tutorials
expire_in: 1 week
tags:
- docker
- espresso
- cuda
- numa
Expand All @@ -509,7 +509,6 @@ run_doxygen:
- build/doc/doxygen
expire_in: 1 week
tags:
- docker
- espresso
- no-cuda
- numa
Expand All @@ -525,7 +524,6 @@ maxset_no_gpu:
- cd ${CI_PROJECT_DIR}/build
- make -t && make check
tags:
- docker
- espresso
- no-cuda
- numa
Expand All @@ -541,7 +539,6 @@ maxset_3_cores:
- cmake -DTEST_NP=3 .
- make -t && make check_unit_tests && make check_python_parallel_odd
tags:
- docker
- espresso
- cuda
- numa
Expand Down
6 changes: 6 additions & 0 deletions cmake/FindCUDACompilerClang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ set(gpu_interface_flags "${CUDA_NVCC_FLAGS} ${CUDA_NVCC_FLAGS_${CMAKE_BUILD_TYPE
if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11)
set(gpu_interface_flags "${gpu_interface_flags} --cuda-gpu-arch=sm_30")
endif()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "12.0.0" AND
CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "13.0.0" AND
CUDA_VERSION VERSION_GREATER_EQUAL "11.0" AND
CUDA_VERSION VERSION_LESS "12.0")
set(gpu_interface_flags "${gpu_interface_flags} -Wno-unknown-cuda-version")
endif()

function(find_gpu_library)
cmake_parse_arguments(LIBRARY "REQUIRED" "NAMES;VARNAME" "" ${ARGN})
Expand Down
14 changes: 14 additions & 0 deletions doc/sphinx/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*****************************************/
/* customization for the alabaster theme */
/*****************************************/

/* color links to python objects */
div.bodywrapper a.reference.internal code {
Expand Down Expand Up @@ -31,3 +33,15 @@ div.admonition p {
div.document {
padding-right: 260px;
}

/*************************************/
/* customization for the basic theme */
/*************************************/

/* remove automatic hyphenation */
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: manual;
-ms-hyphens: manual;
-webkit-hyphens: manual;
hyphens: manual;
}
2 changes: 1 addition & 1 deletion doc/sphinx/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ release = '@PROJECT_VERSION@'
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
Loading

0 comments on commit 8a92c36

Please sign in to comment.