Commit 7a4e05c0 authored by incardon's avatar incardon

Fixing CUDA compilation

parent 45b00269
......@@ -203,6 +203,16 @@ fi
INCLUDES_PATH+="-I. -Iconfig -I../../openfpm_devices/src -I../../openfpm_io/src"
####### include /usr/local/lib and /usr/local/lib64 if they exist
if [ -d "/usr/local/lib64" ]; then
LOCAL_LIBS="/usr/local/lib64"
else
if [ -d "/usr/local/lib" ]; then
LOCAL_LIBS="/usr/local/lib"
fi
fi
####### Checking for GPU support
AX_CUDA
......@@ -303,6 +313,7 @@ esac
AC_SUBST(NVCCFLAGS)
AC_SUBST(INCLUDES_PATH)
AC_SUBST(OPT_LIBS)
AC_SUBST(LOCAL_LIBS)
# Checks for typedefs, structures, and compiler characteristics.
......
......@@ -31,8 +31,6 @@ template<unsigned int dim> void test_all_grid(size_t sz)
for (size_t i = 0 ; i < dim ; i++)
{szz.push_back(sz);}
#ifdef CUDA_GPU
{grid_cpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
test_layout_gridNd<dim>(c3,sz);}
......@@ -41,6 +39,8 @@ template<unsigned int dim> void test_all_grid(size_t sz)
c3.template setMemory();
test_layout_gridObjNd<dim>(c3,sz);}
#ifdef CUDA_GPU
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
test_layout_gridNd<dim>(c3,sz);}
......@@ -59,6 +59,8 @@ template<unsigned int dim> void test_all_grid(size_t sz)
c3.template setMemory();
test_layout_gridNd<dim>(c3,sz);}
#ifdef CUDA_GPU
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
test_layout_gridNd<dim>(c3,sz);}
......@@ -66,6 +68,8 @@ template<unsigned int dim> void test_all_grid(size_t sz)
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
test_layout_gridObjNd<dim>(c3,sz);}
#endif
}
......@@ -836,12 +840,12 @@ BOOST_AUTO_TEST_CASE( grid_use)
test_layout_grid3d(c3,i);
}
#endif
{grid_cpu<3, Point_test<float> > c3(sz);
c3.setMemory();
test_layout_grid3d(c3,i);}
#endif
{
//! [Definition and allocation of a 3D grid on CPU memory]
grid_cpu<3, Point_test<float> > c3(sz);
......
......@@ -13,8 +13,6 @@
#include "memory/ExtPreAlloc.hpp"
#include "util/util_debug.hpp"
#include "util/Pack_stat.hpp"
//#include "Vector/map_vector.hpp"
//#include "Pack_selector.hpp"
#include <boost/fusion/include/mpl.hpp>
#include <boost/fusion/sequence/intrinsic/at_c.hpp>
#include <boost/fusion/include/at_c.hpp>
......
LINKLIBS = $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(CUDA_LIBS) $(BOOST_IOSTREAMS_LIB)
LINKLIBS = $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIB) $(CUDA_LIBS) $(BOOST_IOSTREAMS_LIB) $(LOCAL_LIBS)
if BUILDCUDA
CUDA_SOURCES=../../openfpm_devices/src/memory/CudaMemory.cu
......@@ -11,7 +11,7 @@ noinst_PROGRAMS = mem_map
mem_map_SOURCES = ../../openfpm_devices/src/Memleak_check.cpp main.cpp $(CUDA_SOURCES) ../../openfpm_devices/src/memory/HeapMemory.cpp ../../openfpm_devices/src/memory/PtrMemory.cpp
mem_map_CXXFLAGS = $(CUDA_CFLAGS) $(INCLUDES_PATH) $(BOOST_CPPFLAGS) -I/usr/local/include
mem_map_CFLAGS = $(CUDA_CFLAGS)
mem_map_LDADD = $(LINKLIBS) $(CUDA_LIBS) -L/usr/local/lib -L/usr/local/lib64
mem_map_LDADD = $(LINKLIBS)
nobase_include_HEADERS= data_type/scalar.hpp data_type/aggregate.hpp \
Graph/graph_unit_tests.hpp Graph/map_graph.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