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 1378cd6736..6fb14a5f68 100644 --- a/ci/azure/azure-gcc-12-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-12-ubuntu-mpich.yml @@ -2,7 +2,7 @@ ############## Warning this is a generated file---do not modify ############### ############################################################################### -name: PR tests (gcc-12, ubuntu, mpich, verbose) +name: PR tests (gcc-12, ubuntu, mpich, verbose, kokkos) trigger: branches: @@ -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/" 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 db4ef0469a..92c8a28e75 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -44,6 +44,28 @@ case $CXX in && export NVCC_WRAPPER_DEFAULT_COMPILER;; esac +if test "${VT_KOKKOS_ENABLED:-0}" -eq 1 +then + echo "The variable VT_KOKKOS_ENABLED is set." + + if test -d "kokkos" + then + rm -Rf kokkos + fi + + git clone -b master https://github.com/kokkos/kokkos.git + export KOKKOS_DIR=$PWD/kokkos + export KOKKOS_BUILD=${build_dir}/kokkos/build + export KOKKOS_INSTALL="$KOKKOS_BUILD/install" + mkdir -p "$KOKKOS_BUILD" + cd "$KOKKOS_BUILD" + cmake -G "${CMAKE_GENERATOR:-Ninja}" \ + -DCMAKE_INSTALL_PREFIX="$KOKKOS_INSTALL" \ + "$KOKKOS_DIR" + cmake --build . ${dashj} --target install + cd "${build_dir}" +fi + if test -d "checkpoint" then rm -Rf checkpoint @@ -68,6 +90,7 @@ else cd build cmake -G "${CMAKE_GENERATOR:-Ninja}" \ -DCMAKE_INSTALL_PREFIX="$CHECKPOINT_BUILD/install" \ + -Dkokkos_DIR="$KOKKOS_INSTALL" \ "$CHECKPOINT" cmake --build . ${dashj} --target install 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..e7ba1a75fb 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" @@ -138,13 +139,14 @@ docker_target = "[% linux %]-cpp-clean-noinstall" output_name = ci/azure/azure-gcc-11-ubuntu-mpich.yml [PR-tests-gcc-12] -test_configuration = "gcc-12, ubuntu, mpich, verbose" +test_configuration = "gcc-12, ubuntu, mpich, verbose, kokkos" compiler_type = gnu compiler = gcc-12 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"