Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Rizzi committed Nov 10, 2024
1 parent 647029c commit e243785
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/ci-kokkos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ jobs:
- ubuntu-gnu-kokkos-cpu-serial-11
- ubuntu-gnu-kokkos-cpu-openmp-11
build_type:
- Release
- Debug
cmake_extra_args:
- ''

runs-on: ubuntu-latest
container:
Expand All @@ -38,7 +35,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
env:
eigen_version: 3.4.0
num_cpus: 2 # $(cat /proc/cpuinfo | grep processor -c)

steps:
Expand All @@ -53,12 +49,10 @@ jobs:
-D CMAKE_CXX_FLAGS='-Wall -Werror' \
-D CMAKE_INSTALL_PREFIX:PATH=../install \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
${{ matrix.cmake_extra_args }} \
-D PRESSIO_OPS_ENABLE_TESTS:BOOL=ON \
-D PRESSIO_ENABLE_TPL_EIGEN:BOOL=OFF \
-D PRESSIO_ENABLE_TPL_KOKKOS:BOOL=ON \
-D Kokkos_ROOT=/kokkos/install \
-D KokkosKernels_ROOT=/kokkos-kernels/install
-D KokkosKernels_ROOT=/kokkos-kernels/install \
-D PRESSIO_OPS_ENABLE_TESTS:BOOL=ON \
- name: Build
run: |
Expand Down
4 changes: 0 additions & 4 deletions tests/cmake/.macrosForCreatingUnitTests.cmake.~undo-tree~

This file was deleted.

19 changes: 7 additions & 12 deletions tests/cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,20 @@ if(PRESSIO_ENABLE_TPL_KOKKOS)
message(">> Enabling Kokkos since PRESSIO_ENABLE_TPL_KOKKOS=ON")
add_definitions(-DPRESSIO_ENABLE_TPL_KOKKOS)

# when trilinos is enabled it links kokkos too
# if kokkos is used as standalone lib, then user
# needs to define: Kokkos_ROOT and KokkosKernels_ROOT
if(NOT PRESSIO_ENABLE_TPL_TRILINOS)
# if kokkos is used as standalone lib, then we are more specific
# user needs to define: Kokkos_ROOT and KokkosKernels_ROOT
if (NOT Kokkos_ROOT OR NOT KokkosKernels_ROOT)
message(FATAL_ERROR "Missing Kokkos installation directories. KOKKOS needs:
message(
FATAL_ERROR
"Missing Kokkos installation directories. KOKKOS needs:
-D Kokkos_ROOT=<full-path-to-kokkos-installation>
-D KokkosKernels_ROOT=<full-path-to-kokkos-kernels-installation>
")
-D KokkosKernels_ROOT=<full-path-to-kokkos-kernels-installation>"
)
endif()

# set(KOKKOS_LIB_NAMES kokkoscontainers kokkoscore kokkoskernels)
# include_directories(SYSTEM ${KOKKOS_ROOT}/include ${KOKKOS_KERNELS_ROOT}/include)
# link_directories(${KOKKOS_ROOT}/lib ${KOKKOS_ROOT}/lib64
# ${KOKKOS_KERNELS_ROOT}/lib ${KOKKOS_KERNELS_ROOT}/lib64)

find_package(Kokkos REQUIRED)
find_package(KokkosKernels REQUIRED)

link_libraries(Kokkos::kokkos Kokkos::kokkoskernels)
endif()
endif()
Expand Down

0 comments on commit e243785

Please sign in to comment.