From 8a68f8824a9889197ca298605636c4cb7d5271cd Mon Sep 17 00:00:00 2001 From: jenkins <jenkins@sbalzarini-mac-15.mpi-cbg.de> Date: Mon, 21 Mar 2016 13:24:57 +0100 Subject: [PATCH] Fixing OSX installation --- configure.ac | 5 +++++ src/Makefile.am | 2 +- src/PSE/Kernels_unit_tests.hpp | 15 ++++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fd294d1e..4196b04d 100755 --- a/configure.ac +++ b/configure.ac @@ -253,6 +253,11 @@ AX_SUITESPARSE([],[echo "suitesparse not found" AX_EIGEN([],[echo "eigen not found" exit 206]) +###### Checking for libquadmath + +AC_CHECK_LIB(quadmath, sinq, [ LIBQUADMATH=-lquadmath ], [ LIBQUADMATH= ]) +AC_SUBST(LIBQUADMATH) + ###### Checking for compiler flags -fext-numeric-literals my_save_cflags="$CFLAGS" diff --git a/src/Makefile.am b/src/Makefile.am index 28643fb1..57dffb1f 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,7 +5,7 @@ noinst_PROGRAMS = numerics numerics_SOURCES = main.cpp ../../openfpm_vcluster/src/VCluster.cpp ../../openfpm_devices/src/memory/HeapMemory.cpp ../../openfpm_devices/src/memory/PtrMemory.cpp ../../openfpm_devices/src/Memleak_check.cpp numerics_CXXFLAGS = $(AM_CXXFLAGS) $(HDF5_CPPFLAGS) $(INCLUDES_PATH) $(BOOST_CPPFLAGS) $(SUITESPARSE_INCLUDE) $(METIS_INCLUDE) $(PARMETIS_INCLUDE) $(EIGEN_INCLUDE) -Wno-deprecated-declarations -Wno-unused-local-typedefs numerics_CFLAGS = $(CUDA_CFLAGS) -numerics_LDADD = $(LINKLIBS) -lquadmath -lparmetis -lmetis +numerics_LDADD = $(LINKLIBS) -lparmetis -lmetis nobase_include_HEADERS = PSE/Kernels.hpp PSE/Kernels_test_util.hpp .cu.o : diff --git a/src/PSE/Kernels_unit_tests.hpp b/src/PSE/Kernels_unit_tests.hpp index 80e9b105..a1cfe2f4 100644 --- a/src/PSE/Kernels_unit_tests.hpp +++ b/src/PSE/Kernels_unit_tests.hpp @@ -9,7 +9,9 @@ #define OPENFPM_NUMERICS_SRC_PSE_KERNELS_UNIT_TESTS_HPP_ #include "PSE/Kernels_test_util.hpp" +#if defined(__GNUG__) && !defined(__clang__) #include <boost/multiprecision/float128.hpp> +#endif BOOST_AUTO_TEST_SUITE( pse_kernels_unit_tests ) @@ -36,12 +38,16 @@ BOOST_AUTO_TEST_CASE( pse_ker ) /////// Order 2 ////////////// +#if defined(__GNUG__) && !defined(__clang__) + PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,2>>(i,2,err); y.last().add(err.linf_error); PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,2>>(i,4,err); y.last().add(err.linf_error); +#endif + PSE_test<double,Lap_PSE<1,double,2>>(i,2,err); y.last().add(err.linf_error); @@ -56,28 +62,35 @@ BOOST_AUTO_TEST_CASE( pse_ker ) //////// Order 4 ///////////// +#if defined(__GNUG__) && !defined(__clang__) + PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,4>>(i,2,err); y.last().add(err.linf_error); PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,4>>(i,4,err); y.last().add(err.linf_error); - //////// Order 6 ///////////// + PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,6>>(i,2,err); y.last().add(err.linf_error); PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,6>>(i,4,err); y.last().add(err.linf_error); + //////// Order 8 ///////////// + PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,8>>(i,8,err); y.last().add(err.linf_error); PSE_test<boost::multiprecision::float128,Lap_PSE<1,boost::multiprecision::float128,8>>(i,16,err); y.last().add(err.linf_error); + +#endif + } // Check the result -- GitLab