Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor CMake logic for the CUDA compiler #3582

Merged
merged 31 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2d1f600
Define C++ version and load CUDA first
jngrad Mar 11, 2020
c271344
Load the CUDA compiler selected by the user
jngrad Mar 11, 2020
f148cca
Check the CUDA version for all compilers
jngrad Mar 11, 2020
8008f8d
Document CUDA compiler selection mechanism
jngrad Mar 11, 2020
57e1e99
Document how to access CMake variables
jngrad Mar 11, 2020
64a13a5
Remove outdated CMake advice
jngrad Mar 11, 2020
6bac9e9
New CUDA compiler selection mechanism in CI
jngrad Mar 12, 2020
b1277d8
Make the default value of WITH_CUDA option OFF
jngrad Mar 12, 2020
932a3e9
Patch hipcc environment variables in ROCm 3.X
jngrad Mar 13, 2020
662d03f
Print CMake version during configuration
jngrad Mar 13, 2020
f8457a3
Modern CMake: naming convention for CUDA variables
jngrad Mar 13, 2020
929e16c
Fix nvcc compiler error
jngrad Mar 13, 2020
4447570
Fix clang compiler error
jngrad Mar 14, 2020
8061ba8
Refactor optimization flags, simplify CI script
jngrad Mar 14, 2020
df04e08
Remove obsolete CI options
jngrad Mar 14, 2020
47e8418
Refactor build type and CUDA compiler selection
jngrad Mar 14, 2020
6865fe9
Update CMake documentation and license headers
jngrad Mar 14, 2020
ff2f98f
Add oversubscription guard
jngrad Mar 16, 2020
b8e22a9
Fix GPU optimization flag for Coverage builds
jngrad Mar 16, 2020
74c4c4c
Add a RelWithAssert build type
jngrad Apr 2, 2020
5e67a3a
Test the Release build type in CI
jngrad Apr 2, 2020
dcbc98f
Print the complete list of CMake options
jngrad Apr 2, 2020
a109f6c
Merge branch 'python' into refactor-cmake-with_gpu
jngrad Apr 3, 2020
6b87f2a
Apply clang-format
jngrad Apr 3, 2020
de9f0b3
Factor out coverage flags
jngrad Apr 3, 2020
7336b0b
Detect CUDA libraries installed via nvidia-cuda-toolkit
jngrad Apr 9, 2020
50342b6
Modern CMake
jngrad Apr 16, 2020
be61c3a
Simplify HIP detection
jngrad Apr 17, 2020
b798fab
Fix Travis shell error
jngrad Apr 17, 2020
b53e4c9
Merge branch 'python' into refactor-cmake-with_gpu
jngrad Apr 17, 2020
58978df
Correctly detect CUDA versions with Clang
jngrad Apr 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 20 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ style_doxygen:
- mkdir build
- cd build
- cp ../maintainer/configs/maxset.hpp myconfig.hpp
- cmake ..
- cmake .. -DWITH_CUDA=OFF
- bash ../maintainer/CI/dox_warnings.sh
tags:
- docker
Expand All @@ -86,7 +86,7 @@ maxset:
<<: *global_job_definition
stage: build
script:
- export myconfig=maxset with_coverage=true
- export with_cuda=false myconfig=maxset with_coverage=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -96,7 +96,7 @@ no_rotation:
<<: *global_job_definition
stage: build
script:
- export myconfig=no_rotation with_coverage=true
- export with_cuda=false myconfig=no_rotation with_coverage=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand Down Expand Up @@ -168,7 +168,7 @@ cuda10-maxset:
stage: build
image: docker.pkg.github.com/espressomd/docker/ubuntu-cuda-10.1:c9fe9d6d79ffd7e3e89ef282548e0b5278afde2c
script:
- export myconfig=maxset with_coverage=false test_timeout=900 srcdir=${CI_PROJECT_DIR}
- export myconfig=maxset with_cuda=true with_coverage=false test_timeout=900 srcdir=${CI_PROJECT_DIR}
- export cmake_params="-DIPYTHON_EXECUTABLE=$(which jupyter)"
- bash maintainer/CI/build_cmake.sh
artifacts:
Expand All @@ -185,7 +185,7 @@ cuda9-maxset:
stage: build
image: docker.pkg.github.com/espressomd/docker/ubuntu-cuda-9.0:c9fe9d6d79ffd7e3e89ef282548e0b5278afde2c
script:
- export myconfig=maxset with_coverage=true test_timeout=900 srcdir=${CI_PROJECT_DIR}
- export myconfig=maxset with_cuda=true with_coverage=true test_timeout=900 srcdir=${CI_PROJECT_DIR}
- sed -i 's/ or "DISPLAY" in os.environ/ or True/' src/python/espressomd/visualization.pyx
- bash maintainer/CI/build_cmake.sh
artifacts:
Expand All @@ -203,7 +203,7 @@ tutorials-samples-maxset:
stage: build
image: docker.pkg.github.com/espressomd/docker/ubuntu-cuda-10.1:c9fe9d6d79ffd7e3e89ef282548e0b5278afde2c
script:
- export myconfig=maxset with_coverage=false make_check_unit_tests=false make_check_python=false
- export myconfig=maxset with_cuda=true with_coverage=false make_check_unit_tests=false make_check_python=false
- export make_check_tutorials=true make_check_samples=true make_check_benchmarks=false test_timeout=1200
- bash maintainer/CI/build_cmake.sh
tags:
Expand All @@ -216,7 +216,7 @@ tutorials-samples-default:
stage: build
image: docker.pkg.github.com/espressomd/docker/ubuntu-cuda-10.1:c9fe9d6d79ffd7e3e89ef282548e0b5278afde2c
script:
- export myconfig=default with_coverage=false make_check_unit_tests=false make_check_python=false
- export myconfig=default with_cuda=true with_coverage=false make_check_unit_tests=false make_check_python=false
- export make_check_tutorials=true make_check_samples=true make_check_benchmarks=false test_timeout=1200
- bash maintainer/CI/build_cmake.sh
tags:
Expand All @@ -231,7 +231,7 @@ tutorials-samples-empty:
stage: build
image: docker.pkg.github.com/espressomd/docker/ubuntu-cuda-10.1:c9fe9d6d79ffd7e3e89ef282548e0b5278afde2c
script:
- export myconfig=empty with_coverage=false make_check_unit_tests=false make_check_python=false
- export myconfig=empty with_cuda=true with_coverage=false make_check_unit_tests=false make_check_python=false
- export make_check_tutorials=true make_check_samples=true make_check_benchmarks=false test_timeout=1200 with_scafacos=false
- bash maintainer/CI/build_cmake.sh
tags:
Expand All @@ -246,7 +246,7 @@ tutorials-samples-no-gpu:
stage: build
image: docker.pkg.github.com/espressomd/docker/ubuntu-cuda-10.1:c9fe9d6d79ffd7e3e89ef282548e0b5278afde2c
script:
- export myconfig=maxset with_coverage=false make_check_unit_tests=false make_check_python=false
- export myconfig=maxset with_cuda=true with_coverage=false make_check_unit_tests=false make_check_python=false
- export make_check_tutorials=true make_check_samples=true make_check_benchmarks=false test_timeout=1200 hide_gpu=true
- bash maintainer/CI/build_cmake.sh
tags:
Expand All @@ -260,12 +260,10 @@ installation:
stage: build
image: docker.pkg.github.com/espressomd/docker/ubuntu-cuda-10.1:c9fe9d6d79ffd7e3e89ef282548e0b5278afde2c
script:
- export myconfig=maxset with_coverage=false make_check_unit_tests=false make_check_python=false
- export srcdir=${CI_PROJECT_DIR} test_timeout=1800
- export myconfig=maxset with_cuda=true with_coverage=false make_check_unit_tests=false make_check_python=false
- export srcdir=${CI_PROJECT_DIR} test_timeout=1800 build_type=Release
- bash maintainer/CI/build_cmake.sh
- cd build
# install ESPResSo (in CI, pypresso will run up to 5 times slower when
# located outside the build directory, hence the larger timeout value)
- make install
# get path of installed files
- CI_INSTALL_DIR="/tmp/espresso-unit-tests"
Expand All @@ -274,24 +272,22 @@ installation:
- 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
# skip long tests
- sed -i "/tutorial_11-ferrofluid_3/d" testsuite/scripts/tutorials/CTestTestfile.cmake
- make -j2 check_python_skip_long
- make -j2 check_python
- make -j2 check_samples
- make -j2 check_tutorials
tags:
- docker
- linux
- cuda
timeout: 3h
timeout: 2h
when: manual

empty:
<<: *global_job_definition
stage: build
image: docker.pkg.github.com/espressomd/docker/clang:a1192b35590a1a474c55fe1e9a1e6c25758454ea
script:
- export myconfig=empty with_static_analysis=true
- export myconfig=empty with_cuda=true cmake_params="-DWITH_CUDA_COMPILER=clang" with_static_analysis=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -303,7 +299,7 @@ ubuntu:wo-dependencies:
stage: build
image: docker.pkg.github.com/espressomd/docker/ubuntu-wo-dependencies:446ff604bbfa63f30ddb462697fa0d0dc2630460
script:
- export myconfig=maxset make_check_unit_tests=false make_check_python=false
- export myconfig=maxset with_cuda=false make_check_unit_tests=false make_check_python=false
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -316,7 +312,7 @@ rocm-maxset:
stage: build
image: docker.pkg.github.com/espressomd/docker/rocm:446ff604bbfa63f30ddb462697fa0d0dc2630460
script:
- export myconfig=maxset
- export myconfig=maxset with_cuda=true cmake_params="-DWITH_CUDA_COMPILER=hip"
- bash maintainer/CI/build_cmake.sh
tags:
- amdgpu
Expand All @@ -326,7 +322,7 @@ rocm:latest:
stage: build
image: docker.pkg.github.com/espressomd/docker/rocm:latest_base
script:
- export myconfig=maxset
- export myconfig=maxset with_cuda=true cmake_params="-DWITH_CUDA_COMPILER=hip"
- bash maintainer/CI/build_cmake.sh
tags:
- amdgpu
Expand All @@ -350,7 +346,7 @@ clang:6.0:
stage: build
image: docker.pkg.github.com/espressomd/docker/clang:446ff604bbfa63f30ddb462697fa0d0dc2630460
script:
- export myconfig=maxset with_coverage=false with_static_analysis=true with_asan=true with_ubsan=true test_timeout=900
- export myconfig=maxset with_cuda=true cmake_params="-DWITH_CUDA_COMPILER=clang" with_coverage=false with_static_analysis=true with_asan=true with_ubsan=true test_timeout=900
- bash maintainer/CI/build_cmake.sh
timeout: 2h
tags:
Expand All @@ -364,8 +360,8 @@ intel:19:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/intel-python3:19
script:
- export myconfig=maxset with_coverage=false I_MPI_SHM_LMT=shm
- export cxx_flags=-O2
- export myconfig=maxset with_cuda=true with_coverage=false I_MPI_SHM_LMT=shm
- export cmake_params="-DCMAKE_CXX_FLAGS=-O2"
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand Down
Loading