Skip to content

Commit

Permalink
Merge pull request #46 from CExA-project/add-threads-backend
Browse files Browse the repository at this point in the history
Add threads backend
  • Loading branch information
yasahi-hpc authored Feb 9, 2024
2 parents 2dfd5c3 + b8927d8 commit 9b47ab4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ jobs:
c_compiler: gcc
cxx_compiler: g++
cmake_flags: -DKokkos_ENABLE_OPENMP=ON
- name: threads
image: gcc
c_compiler: gcc
cxx_compiler: g++
cmake_flags: -DKokkos_ENABLE_THREADS=ON
- name: serial
image: gcc
c_compiler: gcc
cxx_compiler: g++
cmake_flags: -DKokkos_ENABLE_SERIAL=ON
- name: cuda
image: nvcc
c_compiler: gcc
Expand Down Expand Up @@ -90,6 +100,14 @@ jobs:
name: openmp
target:
name: host_device
- backend:
name: threads
target:
name: host_device
- backend:
name: serial
target:
name: host_device

steps:
- name: Free Disk Space (Ubuntu)
Expand Down Expand Up @@ -176,6 +194,14 @@ jobs:
- name: openmp
image: gcc
runner: ubuntu-latest
# run Threads tests on Azure server
- name: threads
image: gcc
runner: ubuntu-latest
# run Serial tests on Azure server
- name: serial
image: gcc
runner: ubuntu-latest

steps:
- name: Get artifacts
Expand All @@ -199,8 +225,8 @@ jobs:
ctest --output-on-failure
if: ${{ matrix.backend.name == 'cuda' }}

- name: Run OpenMP tests within Docker image
- name: Run OpenMP/Threads/Serial tests within Docker image
run: |
docker run -v $PWD/build:/work/build -w /work/build ghcr.io/cexa-project/kokkos-fft/base_${{ matrix.backend.image }}_${{ needs.check_docker_files.outputs.image_suffix }}:${{ needs.check_docker_files.outputs.image_tag }} \
ctest --output-on-failure
if: ${{ matrix.backend.name == 'openmp' }}
if: ${{ matrix.backend.name == 'openmp' || matrix.backend.name == 'threads' || matrix.backend.name == 'serial' }}
2 changes: 2 additions & 0 deletions cmake/KokkosFFTConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ elseif(@Kokkos_ENABLE_SYCL@)
endif()
elseif(@Kokkos_ENABLE_OPENMP@)
find_dependency(FFTW MODULE)
elseif(@Kokkos_ENABLE_THREADS@)
find_dependency(FFTW MODULE)
elseif(@Kokkos_ENABLE_SERIAL@)
find_dependency(FFTW MODULE)
endif()
Expand Down
4 changes: 4 additions & 0 deletions common/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ elseif(Kokkos_ENABLE_OPENMP)
find_package(FFTW MODULE REQUIRED)
target_link_libraries(common INTERFACE FFTW::Float FFTW::Double FFTW::FloatOpenMP FFTW::DoubleOpenMP)
target_compile_definitions(common INTERFACE KOKKOSFFT_ENABLE_TPL_FFTW)
elseif(Kokkos_ENABLE_THREADS)
find_package(FFTW MODULE REQUIRED)
target_link_libraries(common INTERFACE FFTW::Float FFTW::Double FFTW::FloatThreads FFTW::DoubleThreads)
target_compile_definitions(common INTERFACE KOKKOSFFT_ENABLE_TPL_FFTW)
elseif(Kokkos_ENABLE_SERIAL)
find_package(FFTW MODULE REQUIRED)
target_link_libraries(common INTERFACE FFTW::Float FFTW::Double)
Expand Down

0 comments on commit 9b47ab4

Please sign in to comment.