From 32282d7bc032e314d0b09018906bdc2c1b23a594 Mon Sep 17 00:00:00 2001 From: Pietro Incardona <incardon@mpi-cbg.de> Date: Mon, 5 Nov 2018 17:02:50 +0100 Subject: [PATCH] Latest modules --- CMakeFiles/FindLibHilbert.cmake | 99 ------------------- .../FindEigen3.cmake | 0 {CMakeFiles => cmake_modules}/FindMetis.cmake | 0 {CMakeFiles => cmake_modules}/FindPETSc.cmake | 0 .../FindParMetis.cmake | 0 example/Vector/7_SPH_dlb_gpu_opt/main.cu | 2 - install | 4 +- openfpm_data | 2 +- script/conf_PETSC | 2 +- src/Vector/vector_dist.hpp | 5 +- src/config/config_cmake.h.in | 3 + 11 files changed, 9 insertions(+), 108 deletions(-) delete mode 100644 CMakeFiles/FindLibHilbert.cmake rename {CMakeFiles => cmake_modules}/FindEigen3.cmake (100%) rename {CMakeFiles => cmake_modules}/FindMetis.cmake (100%) rename {CMakeFiles => cmake_modules}/FindPETSc.cmake (100%) rename {CMakeFiles => cmake_modules}/FindParMetis.cmake (100%) diff --git a/CMakeFiles/FindLibHilbert.cmake b/CMakeFiles/FindLibHilbert.cmake deleted file mode 100644 index 9b6f2b35..00000000 --- a/CMakeFiles/FindLibHilbert.cmake +++ /dev/null @@ -1,99 +0,0 @@ -# - Try to find LibHilbert -# Once done this will define -# -# LIBHILBERT_FOUND - system has LibHilbert -# LIBHILBERT_INCLUDE_DIRS - include directories for PETSc -# LIBHILBERT_LIBRARY_DIRS - library directories for PETSc -# LIBHILBERT_LIBRARIES - libraries for PETSc -# -#============================================================================= -# Copyright (C) 2010-2016 Pietro Incardona -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -#============================================================================= - - -if (LIBHILBERT_FOUND) - return() -endif() - -add_library(libhilbert INTERFACE IMPORTED) - -# Add libraries (static) -set(_libs "-L${LIBHILBERT_ROOT}/lib -llibhilbert") -set_property(TARGET libhilbert PROPERTY INTERFACE_LINK_LIBRARIES "${_libs}") - - -# Create LibHilbert test program -set(LIBHILBERT_TEST_LIB_CPP - "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/libhilbert_test_lib.cpp") - - -file(WRITE ${LIBHILBERT_TEST_LIB_CPP} " -extern \"C\" -{ -#include \"hilbertKey.h\" -} - int main() -{ - //An integer to handle errors - int err; - - //Array to handle output - uint64_t nextCoord[2]; - - //Get the coordinates of the next cell - getIntCoordFromHKey(nextCoord, 4, 2, 0, &err); - - return 0; -} -") - -# Try to run test program (static linking) -try_run( - LIBHILBERT_TEST_LIB_EXITCODE - LIBHILBERT_TEST_LIB_COMPILED - ${CMAKE_CURRENT_BINARY_DIR} - ${LIBHILBERT_TEST_LIB_CPP} - CMAKE_FLAGS - "-DINCLUDE_DIRECTORIES:STRING=${LIBHILBERT_ROOT}/include" - "-DLINK_LIBRARIES:STRING=${LIBHILBERT_ROOT}/lib" - LINK_LIBRARIES libhilbert - COMPILE_OUTPUT_VARIABLE LIBHILBERT_TEST_LIB_COMPILE_OUTPUT - RUN_OUTPUT_VARIABLE LIBHILBERT_TEST_LIB_OUTPUT) - -if (LIBHILBERT_TEST_LIB_COMPILED AND LIBHILBERT_TEST_LIB_EXITCODE EQUAL 0) - message(STATUS "Test LibHilbert_TEST_RUNS static linking - Success") - set(LIBHILBERT_TEST_RUNS TRUE) - set(LIBHILBERT_FOUND TRUE) - set(LIBHILBERT_INCLUDE_DIRS ${LIBHILBERT_ROOT}/include) - set(LIBHILBERT_LIBRARY_DIRS ${LIBHILBERT_ROOT}/lib) - set(LIBHILBERT_LIBRARIES -llibhilbert) -else() - message(STATUS "Test LibHilbert_TEST_RUNS static linking - Failed") - set(LIBHILBERT_TEST_RUNS FALSE) -endif() - diff --git a/CMakeFiles/FindEigen3.cmake b/cmake_modules/FindEigen3.cmake similarity index 100% rename from CMakeFiles/FindEigen3.cmake rename to cmake_modules/FindEigen3.cmake diff --git a/CMakeFiles/FindMetis.cmake b/cmake_modules/FindMetis.cmake similarity index 100% rename from CMakeFiles/FindMetis.cmake rename to cmake_modules/FindMetis.cmake diff --git a/CMakeFiles/FindPETSc.cmake b/cmake_modules/FindPETSc.cmake similarity index 100% rename from CMakeFiles/FindPETSc.cmake rename to cmake_modules/FindPETSc.cmake diff --git a/CMakeFiles/FindParMetis.cmake b/cmake_modules/FindParMetis.cmake similarity index 100% rename from CMakeFiles/FindParMetis.cmake rename to cmake_modules/FindParMetis.cmake diff --git a/example/Vector/7_SPH_dlb_gpu_opt/main.cu b/example/Vector/7_SPH_dlb_gpu_opt/main.cu index 69f0ac3e..163421c3 100644 --- a/example/Vector/7_SPH_dlb_gpu_opt/main.cu +++ b/example/Vector/7_SPH_dlb_gpu_opt/main.cu @@ -407,8 +407,6 @@ template<typename CellList> inline void calc_forces(particles & vd, CellList & N calc_forces_gpu<<<part.wthr,part.thr>>>(vd.toKernel_sorted(),NN.toKernel(),W_dap,cbar); vd.merge_sort<force,drho,red>(NN); -// vd.merge_sort<rho>(NN); -// vd.merge_sort<red>(NN); max_visc = reduce<red,_max_>(vd); } diff --git a/install b/install index f5ae54e5..ac1c75cd 100755 --- a/install +++ b/install @@ -275,7 +275,7 @@ if [ -d "$i_dir/PARMETIS" ]; then configure_options=" $configure_options --with-parmetis=$i_dir/PARMETIS " fi if [ -d "$i_dir/HDF5" ]; then - configure_options=" $configure_options --with-hdf5=$i_dir/HDF5/bin/h5pcc " + configure_options=" $configure_options --with-hdf5=$i_dir/HDF5/ " fi if [ -d "$i_dir/LIBHILBERT" ]; then configure_options=" $configure_options --with-libhilbert=$i_dir/LIBHILBERT " @@ -378,7 +378,7 @@ else exit 1 fi ./script/install_HDF5.sh $i_dir $ncore - configure_options=" $configure_options --with-hdf5=$i_dir/HDF5/bin/h5pcc " + configure_options=" $configure_options --with-hdf5=$i_dir/HDF5/ " HDF5_installed=1 elif [ $conf_err -eq 210 ]; then echo "LIBHILBERT not found try to install" diff --git a/openfpm_data b/openfpm_data index d8f45e69..92d2fa5c 160000 --- a/openfpm_data +++ b/openfpm_data @@ -1 +1 @@ -Subproject commit d8f45e69a4c75e526d0a5c8e73b2cc426f898676 +Subproject commit 92d2fa5c78269d4f5fb9937155ded8de13ba12af diff --git a/script/conf_PETSC b/script/conf_PETSC index 928c9dde..1cec5f4f 100755 --- a/script/conf_PETSC +++ b/script/conf_PETSC @@ -20,7 +20,7 @@ function conf_PETSC() lin_alg_dir="$lin_alg_dir -L$i_dir/OPENBLAS/lib" lin_alg_lib="$lin_alg_lib -lopenblas" lin_alg_inc="$lin_alg_inc -I$i_dir/OPENBLAS/include" - configure_blas_option="--with-blas=-L$i_dir/OPENBLAS/lib -lopenblas" + configure_blas_option="--with-blas=-L$i_dir/OPENBLAS/" fi if [ -d "$i_dir/SCALAPACK" ]; then lin_alg_dir="$lin_alg_dir -L$i_dir/SCALAPACK/lib" diff --git a/src/Vector/vector_dist.hpp b/src/Vector/vector_dist.hpp index 84d0b6b9..a3287a83 100644 --- a/src/Vector/vector_dist.hpp +++ b/src/Vector/vector_dist.hpp @@ -246,13 +246,12 @@ private: //! the second element contain unassigned particles openfpm::vector<prop,Memory,typename layout_base<prop>::type,layout_base> v_prp; -#ifdef CUDA_GPU - + //! reordered v_pos buffer openfpm::vector<prop,Memory,typename layout_base<prop>::type,layout_base> v_prp_out; + //! reordered v_prp buffer openfpm::vector<Point<dim, St>,Memory,typename layout_base<Point<dim,St>>::type,layout_base> v_pos_out; -#endif //! Virtual cluster Vcluster<Memory> & v_cl; diff --git a/src/config/config_cmake.h.in b/src/config/config_cmake.h.in index a0d62c9e..02de32fc 100644 --- a/src/config/config_cmake.h.in +++ b/src/config/config_cmake.h.in @@ -104,6 +104,9 @@ ${DEFINE_HAVE_SYS_TYPES_H} /* Define to 1 if you have the <unistd.h> header file. */ ${DEFINE_HAVE_UNISTD_H} +/* Test TinyObjLoader */ +${DEFINE_HAVE_TINYOBJLOADER} + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" -- GitLab