Commit d50f09bb authored by incardon's avatar incardon

Disable gpu for build script compilation

parent 06dc94b7
......@@ -16,7 +16,7 @@ git clone git@ppmcore.mpi-cbg.de:incardon/openfpm_devices.git OpenFPM_devices
cd "$1/OpenFPM_data"
sh ./autogen.sh
sh ./configure
sh ./configure --disable-gpu
make
./src/mem_map
......
......@@ -49,7 +49,7 @@ if test x"$debuger" = x"yes"; then
CXXFLAGS="$CXXFLAGS -g3 -Wall -O0 "
NVCCFLAGS+="$NVCCFLAGS -g -O0 "
else
CXXFLAGS="$CXXFLAGS -Wall -O3 -g3 -flto -funroll-loops "
CXXFLAGS="$CXXFLAGS -Wall -O3 -g3 -funroll-loops "
NVCCFLAGS+="$NVCCFLAGS -O3 "
fi
......@@ -93,7 +93,7 @@ if test x"$NVCC_EXIST" = x"yes"; then
AC_MSG_RESULT($gpu_support)
if test x"$gpu_support" = x"yes"; then
AC_DEFINE([GPU],[],[GPU support])
AC_DEFINE([CUDA_GPU],[],[CUDA GPU support])
fi
else
gpu_support=no
......@@ -104,7 +104,7 @@ fi
#
AM_CONDITIONAL(BUILDCUDA, test ! x$NVCC = x"no")
AM_CONDITIONAL(BUILDCUDA, test x$gpu_support = x"yes")
###########################
......
......@@ -25,24 +25,32 @@ template<unsigned int dim> void test_all_grid(size_t sz)
for (int i = 0 ; i < dim ; i++)
{szz.push_back(sz);}
#ifdef CUDA_GPU
{grid_cpu<dim, Point_test<float> > c3(szz);
c3.template setMemory<CudaMemory>();
test_layout_gridNd<dim>(c3,sz);}
{grid_cpu<dim, Point_test<float> > c3(szz);
c3.template setMemory<HeapMemory>();
c3.template setMemory<CudaMemory>();
test_layout_gridObjNd<dim>(c3,sz);}
{grid_cpu<dim, Point_test<float> > c3(szz);
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory<CudaMemory>();
test_layout_gridNd<dim>(c3,sz);}
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory<CudaMemory>();
test_layout_gridObjNd<dim>(c3,sz);}
#endif
{grid_cpu<dim, Point_test<float> > c3(szz);
c3.template setMemory<HeapMemory>();
test_layout_gridNd<dim>(c3,sz);}
test_layout_gridObjNd<dim>(c3,sz);}
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory<CudaMemory>();
{grid_cpu<dim, Point_test<float> > c3(szz);
c3.template setMemory<HeapMemory>();
test_layout_gridNd<dim>(c3,sz);}
{grid_gpu<dim, Point_test<float> > c3(szz);
......@@ -52,10 +60,6 @@ template<unsigned int dim> void test_all_grid(size_t sz)
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory<HeapMemory>();
test_layout_gridObjNd<dim>(c3,sz);}
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory<CudaMemory>();
test_layout_gridObjNd<dim>(c3,sz);}
}
......@@ -551,20 +555,24 @@ BOOST_AUTO_TEST_CASE( grid_use)
sz.push_back(i);
sz.push_back(i);
#ifdef CUDA_GPU
{grid_gpu<3, Point_test<float> > c3(sz);
c3.setMemory<CudaMemory>();
test_layout_grid3d(c3,i);}
{grid_cpu<3, Point_test<float> > c3(sz);
c3.setMemory<CudaMemory>();
test_layout_grid3d(c3,i);}
#endif
{grid_gpu<3, Point_test<float> > c3(sz);
c3.setMemory<HeapMemory>();
test_layout_grid3d(c3,i);}
// Test the 3d cpu grid with Cudamemory and HeapMemory
{grid_cpu<3, Point_test<float> > c3(sz);
c3.setMemory<CudaMemory>();
test_layout_grid3d(c3,i);}
{grid_cpu<3, Point_test<float> > c3(sz);
c3.setMemory<HeapMemory>();
test_layout_grid3d(c3,i);}
......
LINKLIBS = $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(CUDA_LIBS) $(BOOST_THREAD_LIB)
if BUILDCUDA
CUDA_SOURCES=../../OpenFPM_devices/src/memory/CudaMemory.cu
else
CUDA_SOURCES=
endif
bin_PROGRAMS = mem_map
mem_map_SOURCES = main.cpp Memleak_check.cpp ../../OpenFPM_devices/src/memory/CudaMemory.cu ../../OpenFPM_devices/src/memory/HeapMemory.cpp ../../OpenFPM_devices/src/memory/PtrMemory.cpp
mem_map_SOURCES = main.cpp Memleak_check.cpp $(CUDA_SOURCES) ../../OpenFPM_devices/src/memory/HeapMemory.cpp ../../OpenFPM_devices/src/memory/PtrMemory.cpp
mem_map_CXXFLAGS = $(CUDA_CFLAGS) $(INCLUDES_PATH)
mem_map_CFLAGS = $(CUDA_CFLAGS)
mem_map_LDADD = $(LINKLIBS) -L/usr/lib64/nvidia-bumblebee/ -lboost_unit_test_framework
......
#define BOOST_DISABLE_ASSERTS
#include "config.h"
#define BOOST_TEST_MODULE "C++ test module for OpenFPM_data project"
#include <boost/test/included/unit_test.hpp>
......@@ -8,7 +8,9 @@
#include <boost/mpl/int.hpp>
#include <typeinfo>
#include <ct_array.hpp>
#ifdef CUDA_GPU
#include "memory/CudaMemory.cuh"
#endif
#include "memory/HeapMemory.hpp"
#include "memory_conf.hpp"
#include "Grid/map_grid.hpp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment