From ba7282b3ddd176968439d377657c4ee7596b0c5f Mon Sep 17 00:00:00 2001 From: aurianer Date: Mon, 22 Jan 2024 13:19:29 +0100 Subject: [PATCH] Refactor hip and performance CSCS CI pipeline --- .gitlab/includes/hip_pipeline.yml | 63 +++---------------- .../includes/performance_gcc13_pipeline.yml | 56 ++--------------- 2 files changed, 12 insertions(+), 107 deletions(-) diff --git a/.gitlab/includes/hip_pipeline.yml b/.gitlab/includes/hip_pipeline.yml index 65941dfad1..10de484753 100644 --- a/.gitlab/includes/hip_pipeline.yml +++ b/.gitlab/includes/hip_pipeline.yml @@ -23,76 +23,27 @@ include: -DCMAKE_HIP_ARCHITECTURES=$GPU_TARGET -DPIKA_WITH_STDEXEC=ON" gcc12_hip5_spack_compiler_image: - stage: spack_compiler - needs: [base_spack_image] extends: - - .container-builder + - .compiler_image_template - .variables_gcc12_hip5_config - before_script: - - export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16` - - CONFIG_TAG=`echo $DOCKERFILE_SHA-$ARCH-$BASE_IMAGE-$COMPILER | sha256sum - | head -c 16` - - compiler=${COMPILER/@/-} - - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler:$CONFIG_TAG - - echo -e "compiler=$compiler" >> compiler.env - - echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env - variables: - DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler - DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER"]' - artifacts: - reports: - dotenv: compiler.env gcc12_hip5_spack_image: - stage: spack_dependencies timeout: 4 hours needs: [gcc12_hip5_spack_compiler_image] extends: - - .container-builder + - .dependencies_image_template - .variables_gcc12_hip5_config - before_script: - - export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16` - - CONFIG_TAG=`echo $DOCKERFILE_SHA-$BASE_IMAGE-$SPACK_SPEC | sha256sum - | head -c 16` - - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler-dependencies:$CONFIG_TAG - - echo -e "compiler=$compiler" >> dependencies.env - - echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> dependencies.env - variables: - DOCKERFILE: .gitlab/docker/Dockerfile.spack_dependencies - DOCKER_BUILD_ARGS: '["BASE_IMAGE","SPACK_SPEC"]' - artifacts: - reports: - dotenv: dependencies.env gcc12_hip5_debug_build: - stage: build + needs: [gcc12_hip5_spack_image] extends: - - .container-builder + - .build_template - .variables_gcc12_hip5_config - - .build_variables_common - - .cmake_variables_common - needs: - - gcc12_hip5_spack_image - before_script: - - export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16` - - build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'` - - configuration=$DOCKERFILE_SHA-$BASE_IMAGE-$BUILD_DIR-$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA-$SOURCE_DIR - - 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 - artifacts: - reports: - dotenv: build.env gcc12_hip5_debug_test: + needs: [gcc12_hip5_debug_build] extends: - - .variables_gcc12_hip5_config + - .test_template - .test_common_gpu_clariden_hip + - .variables_gcc12_hip5_config - .cmake_variables_common - needs: - - gcc12_hip5_debug_build - script: - - spack arch - - export CTEST_XML=$PWD/ctest.xml - - trap "${SOURCE_DIR}/.gitlab/scripts/collect_ctest_metrics.sh ${CTEST_XML}" EXIT - - spack -e pika_ci build-env $spack_spec -- bash -c "ctest --output-junit ${CTEST_XML} --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(($(nproc)/2)) --timeout 120 --output-on-failure --no-compress-output --no-tests=error" - image: $PERSIST_IMAGE_NAME diff --git a/.gitlab/includes/performance_gcc13_pipeline.yml b/.gitlab/includes/performance_gcc13_pipeline.yml index 8602d796ee..15a8ad2570 100644 --- a/.gitlab/includes/performance_gcc13_pipeline.yml +++ b/.gitlab/includes/performance_gcc13_pipeline.yml @@ -19,74 +19,28 @@ include: CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPIKA_WITH_CXX_STANDARD=$CXXSTD" performance_gcc13_spack_compiler_image: - stage: spack_compiler - needs: [base_spack_image] extends: - - .container-builder + - .compiler_image_template - .variables_performance_gcc13_config - before_script: - - export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16` - - CONFIG_TAG=`echo $DOCKERFILE_SHA-$ARCH-$BASE_IMAGE-$COMPILER | sha256sum - | head -c 16` - - compiler=${COMPILER/@/-} - - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler:$CONFIG_TAG - - echo -e "compiler=$compiler" >> compiler.env - - echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env - variables: - DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler - DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER"]' - artifacts: - reports: - dotenv: compiler.env performance_gcc13_spack_image: - stage: spack_dependencies needs: [performance_gcc13_spack_compiler_image] extends: - - .container-builder + - .dependencies_image_template - .variables_performance_gcc13_config - before_script: - - export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16` - - CONFIG_TAG=`echo $DOCKERFILE_SHA-$BASE_IMAGE-$SPACK_SPEC | sha256sum - | head -c 16` - - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler-dependencies:$CONFIG_TAG - - echo -e "compiler=$compiler" >> dependencies.env - - echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> dependencies.env - variables: - DOCKERFILE: .gitlab/docker/Dockerfile.spack_dependencies - DOCKER_BUILD_ARGS: '["BASE_IMAGE","SPACK_SPEC"]' - artifacts: - reports: - dotenv: dependencies.env performance_gcc13_release_build: - stage: build + needs: [performance_gcc13_spack_image] extends: - - .container-builder + - .build_template - .variables_performance_gcc13_config - - .cmake_variables_common - needs: - - performance_gcc13_spack_image - before_script: - - export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16` - - build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'` - - configuration=$DOCKERFILE_SHA-$BASE_IMAGE-$BUILD_DIR-$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA-$SOURCE_DIR - - 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_performance - DOCKER_BUILD_ARGS: '["BASE_IMAGE","SOURCE_DIR","BUILD_DIR","CMAKE_COMMON_FLAGS","CMAKE_FLAGS"]' - artifacts: - reports: - dotenv: build.env performance_gcc13_release_test: extends: - .variables_performance_gcc13_config - .test_common_mc - .cmake_variables_common - needs: - - performance_gcc13_release_build + needs: [performance_gcc13_release_build] image: $PERSIST_IMAGE_NAME script: - export MIMALLOC_EAGER_COMMIT_DELAY=0