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

Fixing cuda on cpu

parent 71ab382b
No related branches found
No related tags found
No related merge requests found
Pipeline #2558 failed
......@@ -52,7 +52,7 @@ if(ENABLE_GPU)
endif()
endif()
find_package(Boost 1.66.0 REQUIRED COMPONENTS unit_test_framework iostreams program_options fiber)
find_package(Boost 1.72.0 REQUIRED COMPONENTS unit_test_framework iostreams program_options fiber)
find_package(MPI REQUIRED)
find_package(HDF5 REQUIRED)
find_package(TinyObjLoader)
......@@ -89,10 +89,19 @@ if(PETSC_FOUND)
endif()
if (Boost_FOUND)
set(DEFINE_HAVE_BOOST "#define HAVE_BOOST")
set(DEFINE_HAVE_BOOST_IOSTREAMS "#define HAVE_BOOST_IOSTREAMS")
set(DEFINE_HAVE_BOOST_PROGRAM_OPTIONS "#define HAVE_BOOST_PROGRAM_OPTIONS")
set(DEFINE_HAVE_BOOST_UNIT_TEST_FRAMEWORK "#define HAVE_BOOST_UNIT_TEST_FRAMEWORK")
set(DEFINE_HAVE_BOOST "#define HAVE_BOOST")
set(DEFINE_HAVE_BOOST_IOSTREAMS "#define HAVE_BOOST_IOSTREAMS")
set(DEFINE_HAVE_BOOST_PROGRAM_OPTIONS "#define HAVE_BOOST_PROGRAM_OPTIONS")
set(DEFINE_HAVE_BOOST_UNIT_TEST_FRAMEWORK "#define HAVE_BOOST_UNIT_TEST_FRAMEWORK")
if (Boost_CONTEXT_FOUND)
set(DEFINE_HAVE_BOOST_CONTEXT "#define HAVE_BOOST_CONTEXT")
else()
#if context is not there CUDA_ON_CPU cannot be activated
set(CUDA_ON_CPU OFF)
endif()
if (Boost_FIBER_FOUND)
set(DEFINE_HAVE_BOOST_FIBER "#define HAVE_BOOST_FIBER")
endif()
else()
message( FATAL_ERROR "BOOST is required in order to install OpenFPM" )
endif()
......@@ -116,4 +125,5 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config/config_cmake.h.in ${CMAKE_
include_directories(SYSTEM ${MPI_INCLUDE_PATH})
add_subdirectory (src)
add_subdirectory (../openfpm_vcluster build)
......@@ -7,9 +7,9 @@ if [ -d "$1/BOOST" ]; then
exit 0
fi
wget http://ppmcore.mpi-cbg.de/upload/boost_1_68_0.tar.bz2
tar -xvf boost_1_68_0.tar.bz2
cd boost_1_68_0
wget http://ppmcore.mpi-cbg.de/upload/boost_1_72_0.tar.bz2
tar -xvf boost_1_72_0.tar.bz2
cd boost_1_72_0
if [ x"$4" != x"" ]; then
if [ -f $HOME/user-config.jam ]; then
mv $HOME/user-config.jam $HOME/user-config.jam_bck
......@@ -23,10 +23,10 @@ fi
./bootstrap.sh --with-toolset=$3
mkdir $1/BOOST
./b2 -j $2 install --prefix=$1/BOOST
rm -rf boost_1_68_0
rm -rf boost_1_72_0
if [ -f $HOME/user-config.jam_bck ]; then
mv $HOME/user-config.jam_bck $HOME/user-config.jam
fi
rm -rf boost_1_68_0.tar.bz2
rm -rf boost_1_72_0.tar.bz2
......@@ -9,12 +9,10 @@ endif()
add_executable(io main.cpp
MetaParser/MetaParser_unit_test.cpp
HDF5_wr/HDF5_writer_cuda.cu
ObjReader/ObjReader_unit_test.cpp
../../openfpm_vcluster/src/VCluster/VCluster.cpp
../../openfpm_devices/src/memory/CudaMemory.cu
../../openfpm_devices/src/memory/HeapMemory.cpp
../../openfpm_devices/src/memory/PtrMemory.cpp
../../openfpm_devices/src/util/cudify_vars.cpp)
ObjReader/ObjReader_unit_test.cpp)
add_dependencies(io ofpmmemory)
add_dependencies(io vcluster)
if ( CMAKE_COMPILER_IS_GNUCC )
target_compile_options(io PRIVATE "-Wno-deprecated-declarations")
......@@ -58,6 +56,8 @@ endif()
target_link_libraries(io ${Boost_LIBRARIES})
target_link_libraries(io ${HDF5_LIBRARIES})
target_link_libraries(io ${TINYOBJLOADER_LIBRARIES} )
target_link_libraries(io ofpmmemory)
target_link_libraries(io vcluster)
if (PETSC_FOUND)
target_link_libraries(io ${PETSC_LIBRARIES})
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