From 8dfb76ae847606e3217e53d7d1c87bea6a7d0af1 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Wed, 5 Jun 2024 22:28:13 +0200 Subject: [PATCH] #2296: Correctly generate CI workflows --- ci/azure/azure-clang-10-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-11-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-12-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-13-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-14-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-9-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-alpine-mpich.yml | 1 + ci/azure/azure-gcc-10-ubuntu-openmpi.yml | 1 + ci/azure/azure-gcc-11-ubuntu-mpich.yml | 1 + ci/azure/azure-gcc-12-ubuntu-mpich.yml | 2 +- ci/azure/azure-gcc-8-ubuntu-mpich.yml | 1 + ci/azure/azure-gcc-9-ubuntu-mpich.yml | 1 + ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml | 1 + ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml | 1 + ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml | 1 + ci/azure/azure-nvidia-12-ubuntu-mpich.yml | 1 + ci/build_cpp.sh | 12 ++++++------ ci/docker/ubuntu-gnu-cpp.dockerfile | 4 +++- docker-compose.yml | 1 + scripts/workflow-azure-template.yml | 1 + scripts/workflows-azure.ini | 2 ++ 21 files changed, 29 insertions(+), 8 deletions(-) diff --git a/ci/azure/azure-clang-10-ubuntu-mpich.yml b/ci/azure/azure-clang-10-ubuntu-mpich.yml index 7f2e25e8e9..c7ac31d435 100644 --- a/ci/azure/azure-clang-10-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-10-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-clang-11-ubuntu-mpich.yml b/ci/azure/azure-clang-11-ubuntu-mpich.yml index 608d7d51f6..efdf9d0d0c 100644 --- a/ci/azure/azure-clang-11-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-11-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-clang-12-ubuntu-mpich.yml b/ci/azure/azure-clang-12-ubuntu-mpich.yml index de09ff6a9d..8e0a9953c1 100644 --- a/ci/azure/azure-clang-12-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-12-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-clang-13-ubuntu-mpich.yml b/ci/azure/azure-clang-13-ubuntu-mpich.yml index 96b2ddb51a..93d412e21f 100644 --- a/ci/azure/azure-clang-13-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-13-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-clang-14-ubuntu-mpich.yml b/ci/azure/azure-clang-14-ubuntu-mpich.yml index 013d691431..aa8cca4c54 100644 --- a/ci/azure/azure-clang-14-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-14-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 1 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-clang-9-ubuntu-mpich.yml b/ci/azure/azure-clang-9-ubuntu-mpich.yml index 3de89b380b..f0356f37e0 100644 --- a/ci/azure/azure-clang-9-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-9-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 1 VT_INCLUSION: EXT_LIB VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-clang-alpine-mpich.yml b/ci/azure/azure-clang-alpine-mpich.yml index 31e493fcab..f4aa24175c 100644 --- a/ci/azure/azure-clang-alpine-mpich.yml +++ b/ci/azure/azure-clang-alpine-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-gcc-10-ubuntu-openmpi.yml b/ci/azure/azure-gcc-10-ubuntu-openmpi.yml index 8c5ccabeed..32b0501a21 100644 --- a/ci/azure/azure-gcc-10-ubuntu-openmpi.yml +++ b/ci/azure/azure-gcc-10-ubuntu-openmpi.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-gcc-11-ubuntu-mpich.yml b/ci/azure/azure-gcc-11-ubuntu-mpich.yml index c0b8f85dea..a6b8341955 100644 --- a/ci/azure/azure-gcc-11-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-11-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-gcc-12-ubuntu-mpich.yml b/ci/azure/azure-gcc-12-ubuntu-mpich.yml index 4c2e38038f..958bb1e38f 100644 --- a/ci/azure/azure-gcc-12-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-12-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 1 + VT_KOKKOS_ENABLED: 1 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" @@ -146,7 +147,6 @@ stages: dockerComposeCommand: 'run ubuntu-cpp-clean' env: CODECOV_TOKEN: $(codecov_token) - VT_KOKKOS_ENABLED: 1 - task: Bash@3 displayName: Put compilation's and tests' logs in PR comment continueOnError: true diff --git a/ci/azure/azure-gcc-8-ubuntu-mpich.yml b/ci/azure/azure-gcc-8-ubuntu-mpich.yml index 35dbd7a3c6..c1fec3df01 100644 --- a/ci/azure/azure-gcc-8-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-8-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-gcc-9-ubuntu-mpich.yml b/ci/azure/azure-gcc-9-ubuntu-mpich.yml index 9dc61ee609..4386004bc5 100644 --- a/ci/azure/azure-gcc-9-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-9-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 1 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml b/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml index 462f5c231f..3d3673dcc2 100644 --- a/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml +++ b/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml index 51d2302d3b..8c54d45a7d 100644 --- a/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml +++ b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 1 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml b/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml index 94c291d989..dd23034fa7 100644 --- a/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml +++ b/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/azure/azure-nvidia-12-ubuntu-mpich.yml b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml index 5210d57f14..5f491f96af 100644 --- a/ci/azure/azure-nvidia-12-ubuntu-mpich.yml +++ b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml @@ -55,6 +55,7 @@ variables: VT_BUILD_SHARED_LIBS: 0 VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 1 + VT_KOKKOS_ENABLED: 0 CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index bfcc4ab013..92c8a28e75 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -15,7 +15,7 @@ else target=${3:-install} fi -if [ -z "${4}" ]; then +if [ -z ${4} ]; then dashj="" else dashj="-j ${4}" @@ -62,7 +62,7 @@ then cmake -G "${CMAKE_GENERATOR:-Ninja}" \ -DCMAKE_INSTALL_PREFIX="$KOKKOS_INSTALL" \ "$KOKKOS_DIR" - cmake --build . "${dashj}" --target install + cmake --build . ${dashj} --target install cd "${build_dir}" fi @@ -92,7 +92,7 @@ else -DCMAKE_INSTALL_PREFIX="$CHECKPOINT_BUILD/install" \ -Dkokkos_DIR="$KOKKOS_INSTALL" \ "$CHECKPOINT" - cmake --build . "${dashj}" --target install + cmake --build . ${dashj} --target install fi fi @@ -195,7 +195,7 @@ then # To easily tell if compilation of given file succeeded special progress bar is used # (controlled by variable NINJA_STATUS) export NINJA_STATUS="[ninja][%f/%t] " - time cmake --build . "${dashj}" --target "${target}" | tee "$OUTPUT_TMP" + time cmake --build . ${dashj} --target "${target}" | tee "$OUTPUT_TMP" compilation_ret=${PIPESTATUS[0]} sed -i '/ninja: build stopped:/d' "$OUTPUT_TMP" @@ -204,7 +204,7 @@ then elif test "$GENERATOR" = "Unix Makefiles" then # Gcc outputs warnings and errors to stderr, so there's not much to do - time cmake --build . "${dashj}" --target "${target}" 2> >(tee "$OUTPUT_TMP") + time cmake --build . ${dashj} --target "${target}" 2> >(tee "$OUTPUT_TMP") compilation_ret=$? WARNS_ERRS=$(cat "$OUTPUT_TMP") fi @@ -213,7 +213,7 @@ then WARNS_ERRS=${WARNS_ERRS//$'\n'/$DELIMITER} echo "$WARNS_ERRS" > "$OUTPUT" else - time cmake --build . "${dashj}" --target "${target}" + time cmake --build . ${dashj} --target "${target}" compilation_ret=$? fi diff --git a/ci/docker/ubuntu-gnu-cpp.dockerfile b/ci/docker/ubuntu-gnu-cpp.dockerfile index 2361da7375..e5bf682cf7 100644 --- a/ci/docker/ubuntu-gnu-cpp.dockerfile +++ b/ci/docker/ubuntu-gnu-cpp.dockerfile @@ -111,6 +111,7 @@ ARG VT_ZOLTAN_ENABLED ARG CMAKE_CXX_STANDARD ARG VT_DEBUG_VERBOSE ARG VT_CI_BUILD +ARG VT_KOKKOS_ENABLED ENV BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ @@ -134,7 +135,8 @@ ENV BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ VT_ZOLTAN_ENABLED=${VT_ZOLTAN_ENABLED} \ CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} \ VT_DEBUG_VERBOSE=$(VT_DEBUG_VERBOSE) \ - VT_CI_BUILD=${VT_CI_BUILD} + VT_CI_BUILD=${VT_CI_BUILD} \ + VT_KOKKOS_ENABLED=${VT_KOKKOS_ENABLED} RUN /vt/ci/build_cpp.sh /vt /build diff --git a/docker-compose.yml b/docker-compose.yml index 2ee3246e89..6ed7dbba12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -105,6 +105,7 @@ x-vtopts: &vtopts VT_MPI_GUARD_ENABLED: ${VT_MPI_GUARD:-1} VT_EXTENDED_TESTS_ENABLED: ${VT_EXTENDED_TESTS:-1} VT_CODE_COVERAGE: ${VT_CODE_COVERAGE:-0} + VT_KOKKOS_ENABLED: ${VT_KOKKOS_ENABLED:-0} https_proxy: ${PROXY-} http_proxy: ${PROXY-} LSAN_OPTIONS: ${LSAN_OPTIONS-} diff --git a/scripts/workflow-azure-template.yml b/scripts/workflow-azure-template.yml index 3fc0793835..78ada35e6f 100644 --- a/scripts/workflow-azure-template.yml +++ b/scripts/workflow-azure-template.yml @@ -43,6 +43,7 @@ variables: VT_BUILD_SHARED_LIBS: [% vt_build_shared_libs %] VT_INCLUSION: [% vt_inclusion %] VT_DEBUG_VERBOSE: [% vt_debug_verbose %] + VT_KOKKOS_ENABLED: [% vt_kokkos_enabled %] CMAKE_CXX_STANDARD: [% cmake_cxx_standard %] TEST_LB_SCHEMA: [% test_lb_schema %] CACHE: "$(Agent.TempDirectory)/cache/" diff --git a/scripts/workflows-azure.ini b/scripts/workflows-azure.ini index 819e8e04f2..68f5716cc6 100644 --- a/scripts/workflows-azure.ini +++ b/scripts/workflows-azure.ini @@ -44,6 +44,7 @@ vt_build_shared_libs = 0 vt_inclusion = TPL cmake_cxx_standard = 17 vt_debug_verbose = 0 +vt_kokkos_enabled = 0 [PR-tests-intel-oneAPI] test_configuration = "intel icpx, ubuntu, mpich, verbose" @@ -145,6 +146,7 @@ distro = 22.04 output_name = ci/azure/azure-gcc-12-ubuntu-mpich.yml pr_pattern = "pr:\\n drafts: true\\n autoCancel: true\\n branches:\\n include:\\n - '*'\\n" vt_debug_verbose = 1 +vt_kokkos_enabled = 1 [PR-tests-clang-13-alpine] test_configuration = "clang-13, alpine, mpich"