Skip to content

Activate kokkos serial CI for the redesign

Issue/feature addressed

  • Operator defaulting is disable by default
  • Pre-build Kokkos library during configuration
  • Activate Kokkos unit test on the CI

Proposed solution

NEKTAR_ENABLE_KOKKOS has now three options (OFF, Serial, CUDA)

Implementation

Kokkos is now pre-built by using a series of EXECUTE_PROCESS command

    EXECUTE_PROCESS(COMMAND rm -rf ${TPSRC}/kokkos-4.3.00)
    EXECUTE_PROCESS(COMMAND rm -rf ${TPBUILD}/kokkos-4.3.00)
    EXECUTE_PROCESS(COMMAND git clone -b release-candidate-4.3.00 https://github.com/kokkos/kokkos ${TPSRC}/kokkos-4.3.00)
    IF (NEKTAR_ENABLE_KOKKOS STREQUAL "Serial")
        EXECUTE_PROCESS(COMMAND 
                    cmake ${TPSRC}/kokkos-4.3.00 
                    -B ${TPBUILD}/kokkos-4.3.00
                    -DCMAKE_CXX_COMPILER=g++
                    -DCMAKE_CXX_FLAGS=-fPIC
                    -DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
                    -DCMAKE_INSTALL_LIBDIR:PATH=${TPDIST}/lib)

    ELSEIF (NEKTAR_ENABLE_KOKKOS STREQUAL "CUDA")
        EXECUTE_PROCESS(COMMAND 
                    cmake ${TPSRC}/kokkos-4.3.00 
                    -B ${TPBUILD}/kokkos-4.3.00
                    -DCMAKE_CXX_COMPILER=g++
                    -DCMAKE_CXX_FLAGS=-fPIC
                    -DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
                    -DCMAKE_INSTALL_LIBDIR:PATH=${TPDIST}/lib
                    -DKokkos_ENABLE_CUDA=ON 
                    -DKokkos_ENABLE_CUDA_LAMBDA=ON 
                    -DKokkos_ENABLE_CUDA_CONSTEXPR=ON)
    ENDIF()

Tests

Suggested reviewers

Please suggest any people who would be appropriate to review your code.

Notes

Please add any other information that could be useful for reviewers.

Checklist

  • Functions and classes, or changes to them, are documented.
  • [ ] User guide/documentation is updated.
  • [ ] Changelog is updated.
  • Suitable tests added for new functionality.
  • [ ] Contributed code is correctly formatted. (See the contributing guidelines).
  • [ ] License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Jacques Xing

Merge request reports

Loading