Skip to content
Snippets Groups Projects
Commit 9677bd3d authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Compilable cuda on cpu

parent 444fa6d8
Branches cuda_on_cpu
No related tags found
No related merge requests found
......@@ -27,6 +27,8 @@ set(METIS_DIR ${METIS_ROOT})
set(PARMETIS_DIR ${PARMETIS_ROOT})
set(OPENBLAS_ROOT CACHE PATH "Root path for blas library")
set(SuiteSparse_ROOT ${SUITESPARSE_ROOT})
set(ALPAKA_ROOT CACHE PATH "Alpaka root path")
set(CUDA_ON_CPU CACHE BOOL "Make Cuda work on heap")
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CUDA_STANDARD 14)
......@@ -62,7 +64,7 @@ if(ENABLE_GPU)
endif()
endif()
find_package(Boost 1.72.0 REQUIRED COMPONENTS unit_test_framework iostreams program_options)
find_package(Boost 1.72.0 REQUIRED COMPONENTS unit_test_framework iostreams program_options fiber)
find_package(MPI REQUIRED)
find_package(PETSc)
find_package(HDF5)
......
......@@ -2,10 +2,15 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
########################### Executables
if (CUDA_ON_CPU)
add_definitions(-DCUDA_ON_CPU)
endif()
if (CUDA_FOUND)
set(CUDA_SOURCES Operators/Vector/vector_dist_operators_unit_tests.cu
Operators/Vector/vector_dist_operators_apply_kernel_unit_tests.cu)
else()
set(CUDA_SOURCES ../../openfpm_devices/src/util/cudify_vars.cpp)
endif()
add_executable(numerics ${OPENFPM_INIT_FILE} ${CUDA_SOURCES}
......@@ -55,6 +60,7 @@ target_include_directories (numerics PUBLIC ${HDF5_ROOT}/include)
target_include_directories (numerics PUBLIC ${LIBHILBERT_INCLUDE_DIRS})
target_include_directories (numerics PUBLIC ${Boost_INCLUDE_DIRS})
target_include_directories (numerics PUBLIC ${Vc_INCLUDE_DIR})
target_include_directories (numerics PUBLIC ${ALPAKA_ROOT}/include)
if(EIGEN3_FOUND)
target_include_directories (numerics PUBLIC ${EIGEN3_INCLUDE_DIR})
endif()
......
......@@ -9,7 +9,6 @@
#define OPENFPM_NUMERICS_SRC_OPERATORS_VECTOR_VECTOR_DIST_OPERATORS_FUNCTIONS_HPP_
#ifdef __NVCC__
#include "util/cuda/moderngpu/kernel_reduce.hxx"
#include "cuda/vector_dist_operators_cuda.cuh"
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment