Commit 699c8959 authored by incardon's avatar incardon

Restructuring configure.ac

parent f382ac89
......@@ -8,8 +8,6 @@ AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR([src/main.cpp])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([src/config/config.h])
m4_ifdef([MYSQL_FOUND],,[m4_include([m4/ax_lib_mysql.m4])])
m4_ifdef([AX_CHECK_COMPILER_FLAGS],,[m4_include([m4/ax_check_compiler_flags.m4])])
m4_ifdef([ACX_PTHREAD],,[m4_include([m4/acx_pthread.m4])])
m4_ifdef([AX_CHECK_CL],,[m4_include([m4/ax_opencl.m4])])
m4_ifdef([AX_BOOST_BASE],,[m4_include([m4/ax_boost_base.m4])])
......@@ -17,11 +15,9 @@ m4_ifdef([AX_BOOST_PROGRAM_OPTIONS],,[m4_include([m4/ax_boost_program_options.m4
m4_ifdef([AX_BOOST_THREAD],,[m4_include([m4/ax_boost_thread.m4])])
m4_ifdef([ACX_MPI],,[m4_include([m4/acx_mpi.m4])])
m4_ifdef([AX_OPENMP],,[m4_include([m4/ax_openmp.m4])])
m4_ifdef([AX_GCC_X86_CPUID],,[m4_include([m4/ax_gcc_x86_cpuid.m4])])
m4_ifdef([AX_GCC_ARCHFLAG],,[m4_include([m4/ax_gcc_archflag.m4])])
m4_ifdef([AX_CUDA],,[m4_include([m4/ax_cuda.m4])])
CXXFLAGS+=" --std=c++11 "
CXXFLAGS+=" --std=c++11 -march=native -mtune=native "
NVCCFLAGS=" "
INCLUDES_PATH=" "
......@@ -34,7 +30,7 @@ AC_CANONICAL_HOST
# Check target architetture
AX_GCC_ARCHFLAG([], [CXXFLAGS="$CXXFLAGS $ax_cv_gcc_archflag"], [])
#AX_GCC_ARCHFLAG([], [CXXFLAGS="$CXXFLAGS $ax_cv_gcc_archflag"], [])
###### Check for debug compilation
......@@ -57,14 +53,13 @@ if test x"$debuger" = x"yes"; then
CXXFLAGS="$CXXFLAGS -g3 -Wall -O0 "
NVCCFLAGS+="$NVCCFLAGS -g -O0 "
else
CXXFLAGS="$CXXFLAGS -Wall -O3 -g3 "
CXXFLAGS="$CXXFLAGS -Wall -O3 -g3 -flto -funroll-loops "
NVCCFLAGS+="$NVCCFLAGS -O3 "
fi
## Check for memcheck
AC_MSG_CHECKING(whether to build with memcheck capabilities)
debuger=no
AC_ARG_ENABLE(memcheck,
AC_HELP_STRING(
[--enable-memcheck],
......@@ -89,21 +84,25 @@ INCLUDES_PATH+="-I. -Isrc/config/ -I../../metis_install/include -I../../OpenFPM_
AX_CUDA
AC_MSG_CHECKING(whether to build with GPU support)
gpu_support=no
AC_ARG_ENABLE(gpu,
## detect for NVCC
if test x"$NVCC_EXIST" = x"yes"; then
AC_MSG_CHECKING(whether to build with GPU support)
gpu_support=yes
AC_ARG_ENABLE(gpu,
AC_HELP_STRING(
[--enable-gpu],
[enable gpu support]
),
gpu_support="$enableval"
)
)
AC_MSG_RESULT($gpu_support)
if test x"$gpu_support" = x"yes"; then
AC_MSG_RESULT($gpu_support)
if test x"$gpu_support" = x"yes"; then
AC_DEFINE([GPU],[],[GPU support])
fi
else
gpu_support=no
fi
......@@ -119,20 +118,6 @@ AC_DEFINE([HAVE_MPI],[],[MPI Enabled])
#####
no_avx=no
no_sse42=no
no_sse41=no
no_sse3=no
no_sse2=no
no_sse=no
no_mmx=no
AX_CHECK_COMPILER_FLAGS([-msse4.2],[CXXFLAGS="$CXXFLAGS -mavx"],[no_avx=yes])
AX_CHECK_COMPILER_FLAGS([-msse4.2],[CXXFLAGS="$CXXFLAGS -msse4.2"],[no_sse42=yes])
AX_CHECK_COMPILER_FLAGS([-msse4.1],[CXXFLAGS="$CXXFLAGS -msse4.1"],[no_sse41=yes])
AX_CHECK_COMPILER_FLAGS([-msse3],[CXXFLAGS="$CXXFLAGS -msse3"],[no_sse3=yes])
AX_CHECK_COMPILER_FLAGS([-msse2],[CXXFLAGS="$CXXFLAGS -msse2"],[no_sse2=yes])
AX_CHECK_COMPILER_FLAGS([-msse],[CXXFLAGS="$CXXFLAGS -msse"],[no_sse=yes])
AX_CHECK_COMPILER_FLAGS([-mmmx],[CXXFLAGS="$CXXFLAGS -mmmx"],[no_mmx=yes])
AX_CHECK_COMPILER_FLAGS([-Wno-unused-but-set-variable],[CXXFLAGS="$CXXFLAGS -Wno-unused-but-set-variable"],[])
AC_SUBST(NVCCFLAGS)
......@@ -147,59 +132,21 @@ AC_OUTPUT
echo ""
echo "***********************************"
echo "* *"
arch_str="${ax_cv_gcc_archflag#-march=#-mtune=}"
arch_str="${arch_str#-mtune=}"
n_arch_str=${#arch_str}
for (( X=0; X<23-n_arch_str; X++ ))
do
arch_str="$arch_str "
done
echo "* arch: $arch_str*"
if [ test x"$no_sse42" = x"no" ]; then
echo "* sse4.2: yes *"
else
echo "* sse4.2: no *"
fi
if [ test x"$no_sse41" = x"no" ]; then
echo "* sse4.1: yes *"
else
echo "* sse4.1: no *"
fi
if [ test x"$no_sse3" = x"no" ]; then
echo "* sse3: yes *"
else
echo "* sse3: no *"
fi
if [ test x"$no_sse2" = x"no" ]; then
echo "* sse2: yes *"
else
echo "* sse2: no *"
fi
if [ test x"$no_sse" = x"no" ]; then
echo "* sse: yes *"
else
echo "* sse: no *"
fi
if [ test x"$no_mmx" = x"no" ]; then
echo "* mmx: yes *"
else
echo "* mmx: no *"
fi
if [ test x"$profiler" = x"yes" ]; then
echo "* profiler: yes *"
else
echo "* profiler: no *"
fi
if [ test x"$memcheck" = x"yes" ]; then
echo "* memcheck: yes *"
else
echo "* memcheck: no *"
fi
if [ test x"$debuger" = x"yes" ]; then
echo "* debug: yes *"
else
echo "* debug: no *"
fi
if [ test x"$no_64" = x"no" ]; then
echo "* 64 bit: yes *"
else
echo "* 64 bit: no *"
fi
if [ test x"$gpu_support" = x"no" ]; then
echo "* gpu: no *"
else
......
pdata-HeapMemory.o: ../../OpenFPM_devices/src/memory/HeapMemory.cpp \
/usr/include/stdc-predef.h \
../../OpenFPM_devices/src/memory/HeapMemory.hpp config.h \
../../OpenFPM_devices/src/memory/HeapMemory.hpp ../src/config/config.h \
../../OpenFPM_data/src/memory.hpp \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/stddef.h \
/usr/include/c++/4.8.3/cstddef \
......@@ -72,10 +72,9 @@ pdata-HeapMemory.o: ../../OpenFPM_devices/src/memory/HeapMemory.cpp \
/usr/include/sys/types.h /usr/include/sys/select.h \
/usr/include/bits/select.h /usr/include/bits/sigset.h \
/usr/include/sys/sysmacros.h /usr/include/alloca.h \
/usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \
/usr/include/c++/4.8.3/cstdio /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
/usr/include/bits/sys_errlist.h /usr/include/bits/stdio.h \
/usr/include/bits/stdlib-float.h /usr/include/c++/4.8.3/cstdio \
/usr/include/libio.h /usr/include/_G_config.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
/usr/include/c++/4.8.3/cerrno /usr/include/errno.h \
/usr/include/bits/errno.h /usr/include/linux/errno.h \
/usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
......@@ -96,21 +95,13 @@ pdata-HeapMemory.o: ../../OpenFPM_devices/src/memory/HeapMemory.cpp \
/usr/include/c++/4.8.3/bits/basic_ios.tcc \
/usr/include/c++/4.8.3/bits/ostream.tcc /usr/include/c++/4.8.3/istream \
/usr/include/c++/4.8.3/bits/istream.tcc /usr/include/c++/4.8.3/cstring \
/usr/include/string.h ../../OpenFPM_data/src/Memleak_check.hpp \
/usr/include/c++/4.8.3/map /usr/include/c++/4.8.3/bits/stl_tree.h \
/usr/include/c++/4.8.3/bits/alloc_traits.h \
/usr/include/c++/4.8.3/bits/ptr_traits.h \
/usr/include/c++/4.8.3/bits/stl_map.h /usr/include/c++/4.8.3/tuple \
/usr/include/c++/4.8.3/utility /usr/include/c++/4.8.3/bits/stl_relops.h \
/usr/include/c++/4.8.3/array /usr/include/c++/4.8.3/stdexcept \
/usr/include/c++/4.8.3/bits/uses_allocator.h \
/usr/include/c++/4.8.3/bits/stl_multimap.h
/usr/include/string.h
/usr/include/stdc-predef.h:
../../OpenFPM_devices/src/memory/HeapMemory.hpp:
config.h:
../src/config/config.h:
../../OpenFPM_data/src/memory.hpp:
......@@ -304,8 +295,6 @@ config.h:
/usr/include/alloca.h:
/usr/include/bits/stdlib-bsearch.h:
/usr/include/bits/stdlib-float.h:
/usr/include/c++/4.8.3/cstdio:
......@@ -318,8 +307,6 @@ config.h:
/usr/include/bits/sys_errlist.h:
/usr/include/bits/stdio.h:
/usr/include/c++/4.8.3/cerrno:
/usr/include/errno.h:
......@@ -373,29 +360,3 @@ config.h:
/usr/include/c++/4.8.3/cstring:
/usr/include/string.h:
../../OpenFPM_data/src/Memleak_check.hpp:
/usr/include/c++/4.8.3/map:
/usr/include/c++/4.8.3/bits/stl_tree.h:
/usr/include/c++/4.8.3/bits/alloc_traits.h:
/usr/include/c++/4.8.3/bits/ptr_traits.h:
/usr/include/c++/4.8.3/bits/stl_map.h:
/usr/include/c++/4.8.3/tuple:
/usr/include/c++/4.8.3/utility:
/usr/include/c++/4.8.3/bits/stl_relops.h:
/usr/include/c++/4.8.3/array:
/usr/include/c++/4.8.3/stdexcept:
/usr/include/c++/4.8.3/bits/uses_allocator.h:
/usr/include/c++/4.8.3/bits/stl_multimap.h:
pdata-Memleak_check.o: ../../OpenFPM_data/src/Memleak_check.cpp \
/usr/include/stdc-predef.h config.h \
/usr/include/stdc-predef.h ../src/config/config.h \
../../OpenFPM_data/src/Memleak_check.hpp /usr/include/c++/4.8.3/iostream \
/usr/include/c++/4.8.3/x86_64-redhat-linux/bits/c++config.h \
/usr/include/bits/wordsize.h \
......@@ -69,10 +69,9 @@ pdata-Memleak_check.o: ../../OpenFPM_data/src/Memleak_check.cpp \
/usr/include/sys/types.h /usr/include/sys/select.h \
/usr/include/bits/select.h /usr/include/bits/sigset.h \
/usr/include/sys/sysmacros.h /usr/include/alloca.h \
/usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \
/usr/include/c++/4.8.3/cstdio /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
/usr/include/bits/sys_errlist.h /usr/include/bits/stdio.h \
/usr/include/bits/stdlib-float.h /usr/include/c++/4.8.3/cstdio \
/usr/include/libio.h /usr/include/_G_config.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
/usr/include/c++/4.8.3/cerrno /usr/include/errno.h \
/usr/include/bits/errno.h /usr/include/linux/errno.h \
/usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
......@@ -104,7 +103,7 @@ pdata-Memleak_check.o: ../../OpenFPM_data/src/Memleak_check.cpp \
/usr/include/stdc-predef.h:
config.h:
../src/config/config.h:
../../OpenFPM_data/src/Memleak_check.hpp:
......@@ -296,8 +295,6 @@ config.h:
/usr/include/alloca.h:
/usr/include/bits/stdlib-bsearch.h:
/usr/include/bits/stdlib-float.h:
/usr/include/c++/4.8.3/cstdio:
......@@ -310,8 +307,6 @@ config.h:
/usr/include/bits/sys_errlist.h:
/usr/include/bits/stdio.h:
/usr/include/c++/4.8.3/cerrno:
/usr/include/errno.h:
......
......@@ -75,10 +75,9 @@ pdata-VCluster.o: ../../OpenFPM_vcluster/src/VCluster.cpp \
/usr/include/sys/types.h /usr/include/sys/select.h \
/usr/include/bits/select.h /usr/include/bits/sigset.h \
/usr/include/sys/sysmacros.h /usr/include/alloca.h \
/usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \
/usr/include/c++/4.8.3/cstdio /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
/usr/include/bits/sys_errlist.h /usr/include/bits/stdio.h \
/usr/include/bits/stdlib-float.h /usr/include/c++/4.8.3/cstdio \
/usr/include/libio.h /usr/include/_G_config.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
/usr/include/c++/4.8.3/cerrno /usr/include/errno.h \
/usr/include/bits/errno.h /usr/include/linux/errno.h \
/usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
......@@ -146,7 +145,7 @@ pdata-VCluster.o: ../../OpenFPM_vcluster/src/VCluster.cpp \
/usr/include/c++/4.8.3/bits/vector.tcc \
../../OpenFPM_vcluster/src/VObject.hpp \
../../OpenFPM_data/src/Vector/map_vector.hpp \
../../OpenFPM_data/src/Grid/map_grid.hpp config.h \
../../OpenFPM_data/src/Grid/map_grid.hpp ../src/config/config.h \
/usr/include/boost/fusion/include/mpl.hpp \
/usr/include/boost/fusion/adapted/mpl.hpp \
/usr/include/boost/fusion/adapted/mpl/detail/begin_impl.hpp \
......@@ -789,8 +788,7 @@ pdata-VCluster.o: ../../OpenFPM_vcluster/src/VCluster.cpp \
/usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
/usr/include/bits/inf.h /usr/include/bits/nan.h \
/usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
/usr/include/bits/mathinline.h /usr/include/c++/4.8.3/sstream \
/usr/include/c++/4.8.3/bits/sstream.tcc \
/usr/include/c++/4.8.3/sstream /usr/include/c++/4.8.3/bits/sstream.tcc \
/usr/include/boost/type_traits/is_compound.hpp \
/usr/include/boost/type_traits/is_floating_point.hpp \
/usr/include/boost/type_traits/is_member_object_pointer.hpp \
......@@ -839,10 +837,12 @@ pdata-VCluster.o: ../../OpenFPM_vcluster/src/VCluster.cpp \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/tmmintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/smmintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/popcntintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/wmmintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/immintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/avxintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/fxsrintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xsaveintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xsaveoptintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/adxintrin.h \
/usr/include/c++/4.8.3/bits/random.tcc /usr/include/c++/4.8.3/numeric \
/usr/include/c++/4.8.3/bits/stl_numeric.h \
......@@ -1173,8 +1173,6 @@ pdata-VCluster.o: ../../OpenFPM_vcluster/src/VCluster.cpp \
/usr/include/alloca.h:
/usr/include/bits/stdlib-bsearch.h:
/usr/include/bits/stdlib-float.h:
/usr/include/c++/4.8.3/cstdio:
......@@ -1187,8 +1185,6 @@ pdata-VCluster.o: ../../OpenFPM_vcluster/src/VCluster.cpp \
/usr/include/bits/sys_errlist.h:
/usr/include/bits/stdio.h:
/usr/include/c++/4.8.3/cerrno:
/usr/include/errno.h:
......@@ -1339,7 +1335,7 @@ pdata-VCluster.o: ../../OpenFPM_vcluster/src/VCluster.cpp \
../../OpenFPM_data/src/Grid/map_grid.hpp:
config.h:
../src/config/config.h:
/usr/include/boost/fusion/include/mpl.hpp:
......@@ -2695,8 +2691,6 @@ config.h:
/usr/include/bits/mathcalls.h:
/usr/include/bits/mathinline.h:
/usr/include/c++/4.8.3/sstream:
/usr/include/c++/4.8.3/bits/sstream.tcc:
......@@ -2805,6 +2799,8 @@ config.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/popcntintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/wmmintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/immintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/avxintrin.h:
......@@ -2813,6 +2809,8 @@ config.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xsaveintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xsaveoptintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/adxintrin.h:
/usr/include/c++/4.8.3/bits/random.tcc:
......
......@@ -68,10 +68,9 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
/usr/include/sys/types.h /usr/include/sys/select.h \
/usr/include/bits/select.h /usr/include/bits/sigset.h \
/usr/include/sys/sysmacros.h /usr/include/alloca.h \
/usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \
/usr/include/c++/4.8.3/cstdio /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
/usr/include/bits/sys_errlist.h /usr/include/bits/stdio.h \
/usr/include/bits/stdlib-float.h /usr/include/c++/4.8.3/cstdio \
/usr/include/libio.h /usr/include/_G_config.h \
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
/usr/include/c++/4.8.3/cerrno /usr/include/errno.h \
/usr/include/bits/errno.h /usr/include/linux/errno.h \
/usr/include/asm/errno.h /usr/include/asm-generic/errno.h \
......@@ -91,10 +90,10 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
/usr/include/c++/4.8.3/bits/locale_facets.tcc \
/usr/include/c++/4.8.3/bits/basic_ios.tcc \
/usr/include/c++/4.8.3/bits/ostream.tcc /usr/include/c++/4.8.3/istream \
/usr/include/c++/4.8.3/bits/istream.tcc config.h \
/usr/include/c++/4.8.3/bits/istream.tcc ../src/config/config.h \
Graph/CartesianGraphFactory.hpp \
../../OpenFPM_data/src/Vector/map_vector.hpp \
../../OpenFPM_data/src/Grid/map_grid.hpp config.h \
../../OpenFPM_data/src/Grid/map_grid.hpp \
/usr/include/boost/fusion/include/mpl.hpp \
/usr/include/boost/fusion/adapted/mpl.hpp \
/usr/include/boost/fusion/adapted/mpl/detail/begin_impl.hpp \
......@@ -738,8 +737,7 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
/usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
/usr/include/bits/inf.h /usr/include/bits/nan.h \
/usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
/usr/include/bits/mathinline.h /usr/include/c++/4.8.3/sstream \
/usr/include/c++/4.8.3/bits/sstream.tcc \
/usr/include/c++/4.8.3/sstream /usr/include/c++/4.8.3/bits/sstream.tcc \
/usr/include/boost/type_traits/is_compound.hpp \
/usr/include/boost/type_traits/is_floating_point.hpp \
/usr/include/boost/type_traits/is_member_object_pointer.hpp \
......@@ -797,10 +795,12 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/tmmintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/smmintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/popcntintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/wmmintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/immintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/avxintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/fxsrintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xsaveintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xsaveoptintrin.h \
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/adxintrin.h \
/usr/include/c++/4.8.3/bits/random.tcc /usr/include/c++/4.8.3/numeric \
/usr/include/c++/4.8.3/bits/stl_numeric.h \
......@@ -1083,7 +1083,6 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
/usr/include/boost/math/tools/user.hpp \
/usr/include/boost/detail/fenv.hpp /usr/include/c++/4.8.3/fenv.h \
/usr/include/fenv.h /usr/include/bits/fenv.h \
/usr/include/bits/fenvinline.h \
/usr/include/boost/math/special_functions/math_fwd.hpp \
/usr/include/boost/math/special_functions/detail/round_fwd.hpp \
/usr/include/boost/math/tools/promotion.hpp \
......@@ -1297,6 +1296,16 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
../../metis_install/include/metis.h /usr/include/inttypes.h \
../../OpenFPM_IO/src/VTKWriter.hpp dec_optimizer.hpp \
../../OpenFPM_data/src/NN/CellList/CellDecomposer.hpp \
/usr/include/c++/4.8.3/unordered_map \
/usr/include/c++/4.8.3/bits/hashtable.h \
/usr/include/c++/4.8.3/bits/hashtable_policy.h \
/usr/include/c++/4.8.3/bits/unordered_map.h \
../../OpenFPM_data/src/NN/CellList/CellList.hpp \
../../OpenFPM_data/src/NN/CellList/CellListFast.hpp \
../../OpenFPM_data/src/NN/CellList/CellDecomposer.hpp \
../../OpenFPM_data/src/NN/CellList/CellNNIterator.hpp \
../../OpenFPM_data/src/NN/CellList/CellListBal.hpp \
../../OpenFPM_data/src/NN/CellList/CellListMem.hpp \
../../OpenFPM_data/src/util.hpp unit_test_init_cleanup.hpp \
Decomposition/ORB_unit_test.hpp Decomposition/ORB.hpp \
../../OpenFPM_data/src/data_type/scalar.hpp \
......@@ -1503,8 +1512,6 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
/usr/include/alloca.h:
/usr/include/bits/stdlib-bsearch.h:
/usr/include/bits/stdlib-float.h:
/usr/include/c++/4.8.3/cstdio:
......@@ -1517,8 +1524,6 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
/usr/include/bits/sys_errlist.h:
/usr/include/bits/stdio.h:
/usr/include/c++/4.8.3/cerrno:
/usr/include/errno.h:
......@@ -1569,7 +1574,7 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \
/usr/include/c++/4.8.3/bits/istream.tcc:
config.h:
../src/config/config.h:
Graph/CartesianGraphFactory.hpp:
......@@ -1577,8 +1582,6 @@ Graph/CartesianGraphFactory.hpp:
../../OpenFPM_data/src/Grid/map_grid.hpp:
config.h:
/usr/include/boost/fusion/include/mpl.hpp:
/usr/include/boost/fusion/adapted/mpl.hpp:
......@@ -2937,8 +2940,6 @@ config.h:
/usr/include/bits/mathcalls.h:
/usr/include/bits/mathinline.h:
/usr/include/c++/4.8.3/sstream:
/usr/include/c++/4.8.3/bits/sstream.tcc:
......@@ -3065,6 +3066,8 @@ config.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/popcntintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/wmmintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/immintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/avxintrin.h:
......@@ -3073,6 +3076,8 @@ config.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xsaveintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/xsaveoptintrin.h:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/include/adxintrin.h:
/usr/include/c++/4.8.3/bits/random.tcc:
......@@ -3711,8 +3716,6 @@ config.h:
/usr/include/bits/fenv.h:
/usr/include/bits/fenvinline.h:
/usr/include/boost/math/special_functions/math_fwd.hpp:
/usr/include/boost/math/special_functions/detail/round_fwd.hpp:
......@@ -4191,6 +4194,26 @@ dec_optimizer.hpp:
../../OpenFPM_data/src/NN/CellList/CellDecomposer.hpp:
/usr/include/c++/4.8.3/unordered_map:
/usr/include/c++/4.8.3/bits/hashtable.h:
/usr/include/c++/4.8.3/bits/hashtable_policy.h:
/usr/include/c++/4.8.3/bits/unordered_map.h:
../../OpenFPM_data/src/NN/CellList/CellList.hpp:
../../OpenFPM_data/src/NN/CellList/CellListFast.hpp:
../../OpenFPM_data/src/NN/CellList/CellDecomposer.hpp:
../../OpenFPM_data/src/NN/CellList/CellNNIterator.hpp:
../../OpenFPM_data/src/NN/CellList/CellListBal.hpp:
../../OpenFPM_data/src/NN/CellList/CellListMem.hpp:
../../OpenFPM_data/src/util.hpp:
unit_test_init_cleanup.hpp:
......
This diff is collapsed.
......@@ -84,15 +84,12 @@ subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_lib_mysql.m4 \
$(top_srcdir)/m4/ax_check_compiler_flags.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compiler_flags.m4 \
$(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/ax_opencl.m4 \
$(top_srcdir)/m4/ax_boost_base.m4 \
$(top_srcdir)/m4/ax_boost_program_options.m4 \
$(top_srcdir)/m4/ax_boost_thread.m4 \
$(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/ax_openmp.m4 \
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
$(top_srcdir)/m4/ax_cuda.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -186,7 +183,7 @@ CUDA_CFLAGS = -I -I -I/usr/local/cuda-5.5/include
CUDA_LIBS = -L -L -L/usr/local/cuda-5.5/lib64 -lcuda -lcudart
CXX = mpic++
CXXDEPMODE = depmode=gcc3
CXXFLAGS = --std=c++11 -mtune=corei7 -Wall -O3 -g3 -mavx -msse4.2 -msse4.1 -msse3 -msse2 -msse -mmmx -Wno-unused-but-set-variable
CXXFLAGS = --std=c++11 -march=native -mtune=native -Wall -O3 -g3 -flto -funroll-loops -Wno-unused-but-set-variable
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
......@@ -218,7 +215,6 @@ PACKAGE_TARNAME = full-package-name
PACKAGE_URL =
PACKAGE_VERSION = VERSION
PATH_SEPARATOR = :
PRTDIAG =
SET_MAKE =
SHELL = /bin/sh
STRIP =
......
......@@ -84,15 +84,12 @@ subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_lib_mysql.m4 \
$(top_srcdir)/m4/ax_check_compiler_flags.m4 \
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compiler_flags.m4 \
$(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/ax_opencl.m4 \
$(top_srcdir)/m4/ax_boost_base.m4 \
$(top_srcdir)/m4/ax_boost_program_options.m4 \
$(top_srcdir)/m4/ax_boost_thread.m4 \
$(top_srcdir)/m4/acx_mpi.m4 $(top_srcdir)/m4/ax_openmp.m4 \
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
$(top_srcdir)/m4/ax_cuda.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -218,7 +215,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PRTDIAG = @PRTDIAG@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......
......@@ -15,10 +15,15 @@
#include "Vector/vector_dist_key.hpp"
#include "memory/PreAllocHeapMemory.hpp"
#include "memory/PtrMemory.hpp"
#include "NN/CellList/CellList.hpp"
#include "common.hpp"
#define NO_ID false
#define ID true
#define GET 1
#define PUT 2
/*! \brief Distributed vector
*
*/
......@@ -28,6 +33,9 @@ class vector_dist
{
private:
// indicate from where the ghost particle start in the vector
size_t ghost_pointer;
//! Space Decomposition
Decomposition dec;
......@@ -40,6 +48,12 @@ private:
// Virtual cluster
Vcluster & v_cl;
// Geometrical cell list
CellList<point::dims,typename point::coord_type,FAST> geo_cell;
// Label particles
public:
/*! \brief Constructor
......@@ -50,6 +64,8 @@ public:
vector_dist(size_t np, Box box)
:dec(Decomposition(*global_v_cluster)),v_cl(*global_v_cluster)
{
typedef ::Box<point::dims,typename point::coord_type> b;
// Allocate unassigned particles vectors
v_pos = v_cl.template allocate<openfpm::vector<point>>(1);
v_prp = v_cl.template allocate<openfpm::vector<prop>>(1);
......@@ -74,6 +90,26 @@ public:
// Create the sub-domains
dec.setParameters(div,box);
// Get the bounding box containing the processor domain +- one sub-domain spacing
::Box<point::dims,typename point::coord_type> & bbound = dec.getProcessorBounds();
// the smallest sub-division of the domain on each dimension
typename point::coord_type smallest_doms[point::dims];
// convert spacing divisions
size_t n_g[point::dims];
for (size_t i = 0 ; i < point::dims ; i++)
{
n_g[i] = box.template getBase<b::p2>(i) / smallest_doms[i];
}
point p;
p.zero();
// Initialize the geo cell list
geo_cell.Initialize(box,n_g,p,8);
}
/*! \brief Get position of an object
......@@ -292,6 +328,76 @@ public:
v_prp.get(0).remove(opart,o_p_id);
}
// ghost particles sending buffer
openfpm::vector<HeapMemory> ghost_send_hp;
// Each entry contain the size of the ghost sending buffer
std::unordered_map<size_t,size_t> ghost_prc_sz;
// ghost particle labels
openfpm::vector<size_t> ghost_lbl_p;
/*! \brief It synchronize getting the ghost particles
*
* \prp Properties to get
* \opt options
* NO_RELABEL: If the particles does not move avoid to relabel
*
*/
template<unsigned int N> void ghost_get(const size_t prp[N], size_t opt)
{
// outgoing particles-id
openfpm::vector<size_t> opart;
ghost_prc_sz.clear();
// Label the internal (assigned) particles
auto it = v_pos.get(0).getIterator();
// Label all the particles with the processor id, where they should go
while (it.isNext())
{
auto key = it.get();
size_t p_id = dec.ghost_processorID(v_pos.get(0).get(key));
ghost_lbl_p.get(key) = p_id;
// It has to communicate
if (p_id != v_cl.getProcessUnitID())
{
// add particle to communicate
ghost_prc_sz[p_id]++;
opart.add(key);
}
++it;
}
// Create memory allocator for the send buffers
size_t i = 0;
ghost_send_hp.resize(ghost_prc_sz.size());
for ( auto it = ghost_prc_sz.begin(); it != ghost_prc_sz.end(); ++it )
{
// we are sending only some properties, so calculate the size of the sending buffer
size_t element_size = ele_size<N,typename prop::type>(prp);
ghost_send_hp.get(i).resize(it->second * element_size);
i++;
}
//
// ca
// send and receive the properties of the particles
// add the received particles to the vector
}
// Heap memory receiver
HeapMemory hp_recv;
......
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */
/* Debug */
#define DEBUG /**/
/* Debug */
#define DEBUG_MODE /**/
/* GPU support */
/* #undef GPU */