From f1d68b82e1c627d29a4c88992f2e17964decf959 Mon Sep 17 00:00:00 2001 From: aurianer Date: Wed, 15 Nov 2023 22:55:14 +0100 Subject: [PATCH 1/4] Add a pipeline with cuda12 --- .gitlab/includes/gcc12_cuda12_pipeline.yml | 74 ++++++++++++++++++++++ .gitlab/pipeline.yml | 1 + 2 files changed, 75 insertions(+) create mode 100644 .gitlab/includes/gcc12_cuda12_pipeline.yml diff --git a/.gitlab/includes/gcc12_cuda12_pipeline.yml b/.gitlab/includes/gcc12_cuda12_pipeline.yml new file mode 100644 index 000000000..abd198d37 --- /dev/null +++ b/.gitlab/includes/gcc12_cuda12_pipeline.yml @@ -0,0 +1,74 @@ +# Copyright (c) 2023 ETH Zurich +# +# SPDX-License-Identifier: BSL-1.0 +# Distributed under the Boost Software License, Version 1.0. (See accompanying +# file BOOST_LICENSE_1_0.rst or copy at http://www.boost.org/LICENSE_1_0.txt) + +include: + - local: '.gitlab/includes/common_pipeline.yml' + - local: '.gitlab/includes/common_spack_pipeline.yml' + +.variables_gcc12_cuda12_config: + variables: + ARCH: linux-ubuntu22.04-zen3 + BUILD_TYPE: Debug + COMPILER: gcc@12.1.0 + CXXSTD: 17 + SPACK_SPEC: "pika@main arch=$ARCH %${COMPILER} +cuda malloc=system cxxstd=$CXXSTD \ + ^boost@1.82.0 ^hwloc@2.9.1 ^cuda@12.0.0 ^fmt@10.0.0" + +gcc12_cuda12_spack_image: + stage: spack_configs + needs: [base_spack_image] + extends: + - .container-builder + - .variables_gcc12_cuda12_config + before_script: + - CONFIG_TAG=`echo $SPACK_SPEC-$SPACK_COMMIT | sha256sum - | head -c 16` + - compiler=${COMPILER/@/-} + - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/pika-$compiler:$CONFIG_TAG + - echo -e "compiler=$compiler\nBASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env + variables: + BASE_IMAGE: $CSCS_REGISTRY_PATH/pika-spack-base:$SPACK_COMMIT + DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler + DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER","SPACK_SPEC"]' + artifacts: + reports: + dotenv: compiler.env + +gcc12_cuda12_debug_build: + stage: build + extends: + - .container-builder + - .variables_gcc12_cuda12_config + - .cmake_variables_common + needs: + - gcc12_cuda12_spack_image + before_script: + - build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'` + - configuration=$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA + - configuration=${configuration//-D/} + - CONFIG_TAG=`echo $configuration | sha256sum - | head -c 16` + - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/pika-$compiler-$build_type-build:$CONFIG_TAG + - echo -e "PERSIST_IMAGE_NAME=$PERSIST_IMAGE_NAME" > build.env + variables: + DOCKERFILE: .gitlab/docker/Dockerfile.spack_build + CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPIKA_WITH_CXX_STANDARD=$CXXSTD \ + -DPIKA_WITH_CUDA=ON -DPIKA_WITH_MALLOC=system \ + -DCMAKE_CUDA_ARCHITECTURES=80 -DPIKA_WITH_CXX_LAMBDA_CAPTURE_DECLTYPE=OFF" +# PIKA_WITH_CXX_LAMBDA_CAPTURE_DECLTYPE is OFF to test the fallback implementation of PIKA_FORWARD. + DOCKER_BUILD_ARGS: '["BASE_IMAGE","SOURCE_DIR","BUILD_DIR","CMAKE_COMMON_FLAGS","CMAKE_FLAGS"]' + artifacts: + reports: + dotenv: build.env + +gcc12_cuda12_debug_test: + extends: + - .variables_gcc12_cuda12_config + - .test_common_gpu_clariden_cuda + needs: + - gcc12_cuda12_debug_build + script: + - spack arch + - spack build-env $spack_spec -- bash -c "ctest --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(nproc) --timeout 120 --output-on-failure --no-compress-output --no-tests=error" + image: $PERSIST_IMAGE_NAME diff --git a/.gitlab/pipeline.yml b/.gitlab/pipeline.yml index 83db21ee9..1939cda36 100644 --- a/.gitlab/pipeline.yml +++ b/.gitlab/pipeline.yml @@ -10,6 +10,7 @@ include: - local: '.gitlab/includes/gcc9_cuda11_pipeline.yml' - local: '.gitlab/includes/gcc11_pipeline.yml' - local: '.gitlab/includes/gcc12_pipeline.yml' + - local: '.gitlab/includes/gcc12_cuda12_pipeline.yml' - local: '.gitlab/includes/gcc13_pipeline.yml' - local: '.gitlab/includes/clang11_pipeline.yml' - local: '.gitlab/includes/clang12_pipeline.yml' From 2c8b8a6d45c2a8893f9174c8abc1005fb1131b1c Mon Sep 17 00:00:00 2001 From: aurianer Date: Wed, 6 Dec 2023 12:14:57 +0100 Subject: [PATCH 2/4] Add the architecture flag for CUDA too --- .gitlab/includes/gcc12_cuda12_pipeline.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab/includes/gcc12_cuda12_pipeline.yml b/.gitlab/includes/gcc12_cuda12_pipeline.yml index abd198d37..f7c8584ba 100644 --- a/.gitlab/includes/gcc12_cuda12_pipeline.yml +++ b/.gitlab/includes/gcc12_cuda12_pipeline.yml @@ -14,8 +14,9 @@ include: BUILD_TYPE: Debug COMPILER: gcc@12.1.0 CXXSTD: 17 - SPACK_SPEC: "pika@main arch=$ARCH %${COMPILER} +cuda malloc=system cxxstd=$CXXSTD \ - ^boost@1.82.0 ^hwloc@2.9.1 ^cuda@12.0.0 ^fmt@10.0.0" + GPU_TARGET: "80" + SPACK_SPEC: "pika@main arch=$ARCH %${COMPILER} +cuda cuda_arch=${GPU_TARGET} malloc=system \ + cxxstd=$CXXSTD ^boost@1.82.0 ^hwloc@2.9.1 ^cuda@12.0.0 ^fmt@10.0.0" gcc12_cuda12_spack_image: stage: spack_configs @@ -55,7 +56,8 @@ gcc12_cuda12_debug_build: DOCKERFILE: .gitlab/docker/Dockerfile.spack_build CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPIKA_WITH_CXX_STANDARD=$CXXSTD \ -DPIKA_WITH_CUDA=ON -DPIKA_WITH_MALLOC=system \ - -DCMAKE_CUDA_ARCHITECTURES=80 -DPIKA_WITH_CXX_LAMBDA_CAPTURE_DECLTYPE=OFF" + -DCMAKE_CUDA_ARCHITECTURES=$GPU_TARGET \ + -DPIKA_WITH_CXX_LAMBDA_CAPTURE_DECLTYPE=OFF" # PIKA_WITH_CXX_LAMBDA_CAPTURE_DECLTYPE is OFF to test the fallback implementation of PIKA_FORWARD. DOCKER_BUILD_ARGS: '["BASE_IMAGE","SOURCE_DIR","BUILD_DIR","CMAKE_COMMON_FLAGS","CMAKE_FLAGS"]' artifacts: From cb49acf8aaa7cbd1d052c3c5c17585d0205a295d Mon Sep 17 00:00:00 2001 From: aurianer Date: Wed, 6 Dec 2023 12:21:39 +0100 Subject: [PATCH 3/4] Disable the testing step for cuda 12, driver on clariden is not sufficient --- .gitlab/includes/gcc12_cuda12_pipeline.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitlab/includes/gcc12_cuda12_pipeline.yml b/.gitlab/includes/gcc12_cuda12_pipeline.yml index f7c8584ba..afa3348e6 100644 --- a/.gitlab/includes/gcc12_cuda12_pipeline.yml +++ b/.gitlab/includes/gcc12_cuda12_pipeline.yml @@ -64,13 +64,13 @@ gcc12_cuda12_debug_build: reports: dotenv: build.env -gcc12_cuda12_debug_test: - extends: - - .variables_gcc12_cuda12_config - - .test_common_gpu_clariden_cuda - needs: - - gcc12_cuda12_debug_build - script: - - spack arch - - spack build-env $spack_spec -- bash -c "ctest --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(nproc) --timeout 120 --output-on-failure --no-compress-output --no-tests=error" - image: $PERSIST_IMAGE_NAME +#gcc12_cuda12_debug_test: +# extends: +# - .variables_gcc12_cuda12_config +# - .test_common_gpu_clariden_cuda +# needs: +# - gcc12_cuda12_debug_build +# script: +# - spack arch +# - spack build-env $spack_spec -- bash -c "ctest --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(nproc) --timeout 120 --output-on-failure --no-compress-output --no-tests=error" +# image: $PERSIST_IMAGE_NAME From 134cbdb0391bbee65302a9cdedc86b5a46bc5a17 Mon Sep 17 00:00:00 2001 From: aurianer Date: Thu, 7 Dec 2023 14:13:29 +0100 Subject: [PATCH 4/4] Add a comment mentioning the issue to reenable the test step --- .gitlab/includes/gcc12_cuda12_pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/includes/gcc12_cuda12_pipeline.yml b/.gitlab/includes/gcc12_cuda12_pipeline.yml index afa3348e6..27ef9cc13 100644 --- a/.gitlab/includes/gcc12_cuda12_pipeline.yml +++ b/.gitlab/includes/gcc12_cuda12_pipeline.yml @@ -64,6 +64,8 @@ gcc12_cuda12_debug_build: reports: dotenv: build.env +# Test step currently commented as the cuda driver is too old on clariden: +# https://github.com/pika-org/pika/issues/884 #gcc12_cuda12_debug_test: # extends: # - .variables_gcc12_cuda12_config