diff --git a/CMakeLists.txt b/CMakeLists.txt index 5abc27fa3..3bcb4371d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -640,9 +640,7 @@ IF(HDF5_FOUND) ENDIF(ENABLE_PHDF5) ENDIF(HDF5_IS_PARALLEL) ELSE(HDF5_FOUND) - if(NOT QMC_PHI) - MESSAGE(FATAL_ERROR "Require hdf5 1.6.4 or higher. Set HDF5_ROOT") - endif() + MESSAGE(FATAL_ERROR "Require hdf5 1.6.4 or higher. Set HDF5_ROOT") ENDIF(HDF5_FOUND) #make sure we can find boost if it's not in /usr diff --git a/src/OhmmsSoA/VectorSoaContainer.h b/src/OhmmsSoA/VectorSoaContainer.h index ec051d0a4..7b7937010 100644 --- a/src/OhmmsSoA/VectorSoaContainer.h +++ b/src/OhmmsSoA/VectorSoaContainer.h @@ -28,13 +28,8 @@ namespace qmcplusplus template struct VectorSoaContainer { -#if (__cplusplus >= 201103L) using Type_t =TinyVector; using Element_t=T; -#else - typedef TinyVector Type_t; - typedef T Element_t; -#endif /////alias to ParticleAttrib //template using PosArray = ParticleAttrib >; ///number of elements @@ -78,7 +73,6 @@ namespace qmcplusplus return *this; } -#if (__cplusplus >= 201103L) ///move constructor VectorSoaContainer(VectorSoaContainer&& in): nLocal(in.nLocal),nGhosts(in.nGhosts) { @@ -88,7 +82,6 @@ namespace qmcplusplus in.myData=nullptr; in.nAllocated=0; } -#endif /** constructor with size n without initialization */ diff --git a/src/Optimize/NRCOptimization.h b/src/Optimize/NRCOptimization.h index 6746d0068..7c00b2d35 100644 --- a/src/Optimize/NRCOptimization.h +++ b/src/Optimize/NRCOptimization.h @@ -198,19 +198,11 @@ struct NRCOptimization qmcplusplus::invert_matrix(S, false); qmcplusplus::MatrixOperators::product(S, &(y[0]), &(coefs[0])); Lambda = QuarticMinimum (coefs); -#if (__cplusplus >= 201103L) if (std::abs(Lambda) > largeQuarticStep || std::isnan(Lambda)) return lineoptimization2(); cost = Func(Lambda); if (std::isnan(cost) || cost > start_cost) return lineoptimization2(); -#else - if (std::abs(Lambda) > largeQuarticStep || isnan(Lambda)) - return lineoptimization2(); - cost = Func(Lambda); - if (isnan(cost) || cost > start_cost) - return lineoptimization2(); -#endif } else { @@ -321,21 +313,12 @@ struct NRCOptimization { qmcplusplus::LinearFit(y,S,coefs); Lambda = QuarticMinimum (coefs); -#if (__cplusplus >= 201103L) if (std::abs(Lambda) > largeQuarticStep || std::isnan(Lambda) || (Lambda==0.0)) return lineoptimization2(largeQuarticStep); zeroCost = Func(Lambda); // std::cout <<"Start Cost:"<< start_cost<<" Lambda:"< start_cost) return lineoptimization2(largeQuarticStep); -#else - if (std::abs(Lambda) > largeQuarticStep || isnan(Lambda) || (Lambda==0.0)) - return lineoptimization2(largeQuarticStep); - zeroCost = Func(Lambda); -// std::cout <<"Start Cost:"<< start_cost<<" Lambda:"< start_cost) - return lineoptimization2(largeQuarticStep); -#endif } else { diff --git a/src/Particle/DistanceTableData.h b/src/Particle/DistanceTableData.h index 7020630e4..b1f27343a 100644 --- a/src/Particle/DistanceTableData.h +++ b/src/Particle/DistanceTableData.h @@ -79,7 +79,7 @@ struct DistanceTableData * k = copies (walkers) index. */ enum {WalkerIndex=0, SourceIndex, VisitorIndex, PairIndex}; -#if (__cplusplus >= 201103L) + using IndexType=QMCTraits::IndexType; using RealType=QMCTraits::RealType; using PosType=QMCTraits::PosType; @@ -87,15 +87,6 @@ struct DistanceTableData using TempDistType=TempDisplacement; using ripair=std::pair; using RowContainer=VectorSoaContainer; -#else - typedef QMCTraits::IndexType IndexType; - typedef QMCTraits::RealType RealType; - typedef QMCTraits::PosType PosType; - typedef aligned_vector IndexVectorType; - typedef TempDisplacement TempDistType; - typedef std::pair ripair; - typedef VectorSoaContainer RowContainer; -#endif ///type of cell int CellType; diff --git a/src/Particle/SoaDistanceTableAA.h b/src/Particle/SoaDistanceTableAA.h index a1f384965..7132d425f 100644 --- a/src/Particle/SoaDistanceTableAA.h +++ b/src/Particle/SoaDistanceTableAA.h @@ -33,10 +33,8 @@ struct SoaDistanceTableAA: public DTD_BConds, public DistanceTableData resize(target.getTotalNum()); } -#if (__cplusplus >= 201103L) SoaDistanceTableAA()=delete; SoaDistanceTableAA(const SoaDistanceTableAA&)=delete; -#endif ~SoaDistanceTableAA() {} size_t compute_size(int N) diff --git a/src/Particle/SoaDistanceTableBA.h b/src/Particle/SoaDistanceTableBA.h index d438c85b1..a4aa9eb25 100644 --- a/src/Particle/SoaDistanceTableBA.h +++ b/src/Particle/SoaDistanceTableBA.h @@ -54,10 +54,8 @@ struct SoaDistanceTableBA: public DTD_BConds, public DistanceTableData Temp_dr.resize(Nsources); } -#if (__cplusplus >= 201103L) SoaDistanceTableBA()=delete; SoaDistanceTableBA(const SoaDistanceTableBA&)=delete; -#endif ~SoaDistanceTableBA() {} /** evaluate the full table */ diff --git a/src/QMCDrivers/DMC/DMCUpdateAll.h b/src/QMCDrivers/DMC/DMCUpdateAll.h index 35e69a6ce..6c2886562 100644 --- a/src/QMCDrivers/DMC/DMCUpdateAll.h +++ b/src/QMCDrivers/DMC/DMCUpdateAll.h @@ -31,16 +31,10 @@ public: void advanceWalker(Walker_t& thisWalker, bool recompute); -#if (__cplusplus >= 201103L) - DMCUpdateAllWithRejection(const DMCUpdateAllWithRejection& a)=delete; - DMCUpdateAllWithRejection& operator=(const DMCUpdateAllWithRejection&)=delete; -#else -private: /// Copy Constructor (disabled) - DMCUpdateAllWithRejection(const DMCUpdateAllWithRejection &) = delete; + DMCUpdateAllWithRejection(const DMCUpdateAllWithRejection&) = delete; /// Copy operator (disabled). - DMCUpdateAllWithRejection & operator=(const DMCUpdateAllWithRejection &) = delete; -#endif + DMCUpdateAllWithRejection& operator=(const DMCUpdateAllWithRejection&) = delete; }; class DMCUpdateAllWithKill: public QMCUpdateBase @@ -55,16 +49,10 @@ public: void advanceWalker(Walker_t& thisWalker, bool recompute); -#if (__cplusplus >= 201103L) - DMCUpdateAllWithKill(const DMCUpdateAllWithKill& a)=delete; - DMCUpdateAllWithKill& operator=(const DMCUpdateAllWithKill&)=delete; -#else -private: /// Copy Constructor (disabled) - DMCUpdateAllWithKill(const DMCUpdateAllWithKill &) = delete; + DMCUpdateAllWithKill(const DMCUpdateAllWithKill&) = delete; /// Copy operator (disabled). - DMCUpdateAllWithKill & operator=(const DMCUpdateAllWithKill &) = delete; -#endif + DMCUpdateAllWithKill& operator=(const DMCUpdateAllWithKill&) = delete; }; } diff --git a/src/QMCWaveFunctions/BsplineFactory/SplineAdoptorBase.h b/src/QMCWaveFunctions/BsplineFactory/SplineAdoptorBase.h index 2e0e8e945..9ca9b343f 100644 --- a/src/QMCWaveFunctions/BsplineFactory/SplineAdoptorBase.h +++ b/src/QMCWaveFunctions/BsplineFactory/SplineAdoptorBase.h @@ -42,15 +42,9 @@ namespace qmcplusplus template struct SplineAdoptorBase { -#if (__cplusplus >= 201103L) using PointType=TinyVector; using SingleSplineType=UBspline_3d_d; using DataType=ST; -#else - typedef TinyVector PointType; - typedef UBspline_3d_d SingleSplineType; - typedef ST DataType; -#endif ///true if the computed values are complex bool is_complex; ///true, if it has only one k point and Gamma @@ -89,9 +83,7 @@ struct SplineAdoptorBase MyIndex(0),nunique_orbitals(0),first_spo(0),last_spo(0) { } -#if (__cplusplus >= 201103L) SplineAdoptorBase(const SplineAdoptorBase& rhs)=default; -#endif inline void init_base(int n) { diff --git a/src/QMCWaveFunctions/Jastrow/PolynomialFunctor3D.h b/src/QMCWaveFunctions/Jastrow/PolynomialFunctor3D.h index 0715ab8a8..33a68ad1c 100644 --- a/src/QMCWaveFunctions/Jastrow/PolynomialFunctor3D.h +++ b/src/QMCWaveFunctions/Jastrow/PolynomialFunctor3D.h @@ -185,18 +185,7 @@ struct PolynomialFunctor3D: public OptimizableFunctorBase IndepVar[col] = true; } while (max_abs < 1.0e-6); -#if ( ( __INTEL_COMPILER == 1700 ) && ( __cplusplus < 201103L ) ) - // the swap_rows is sick with Intel compiler 17 update 1, c++11 off - // manually swap the rows - for(int ind_col=0; ind_col= 201103L) SoaSphericalTensor(const SoaSphericalTensor& rhs)=default; -#endif ///compute Ylm void evaluate_bare(T x, T y, T z, T* Ylm) const; diff --git a/src/Utilities/NewTimer.h b/src/Utilities/NewTimer.h index 516b3fbdc..ffc0eba41 100644 --- a/src/Utilities/NewTimer.h +++ b/src/Utilities/NewTimer.h @@ -458,8 +458,6 @@ template struct TimerIDName_t const std::string name; }; -// C++ 11 type aliasing -#if __cplusplus >= 201103L template using TimerNameList_t = std::vector>; template void setup_timers(TimerList_t &timers, TimerNameList_t timer_list, @@ -471,7 +469,6 @@ template void setup_timers(TimerList_t &timers, TimerNameList_t tim timers[timer_list[i].id] = TimerManager.createTimer(timer_list[i].name, timer_level); } } -#endif struct TimerComparator diff --git a/src/Utilities/RandomGenerator.h b/src/Utilities/RandomGenerator.h index e5ec2c5da..b871f2739 100644 --- a/src/Utilities/RandomGenerator.h +++ b/src/Utilities/RandomGenerator.h @@ -88,9 +88,7 @@ extern RandomGenerator_t Random; #include "Utilities/BoostRandom.h" namespace qmcplusplus { -#if (__cplusplus>=201103L) template using RandomGenerator=BoostRandom; -#endif typedef BoostRandom RandomGenerator_t; extern RandomGenerator_t Random; } diff --git a/src/Utilities/tests/test_timer.cpp b/src/Utilities/tests/test_timer.cpp index 1c991c8c2..765ec85e5 100644 --- a/src/Utilities/tests/test_timer.cpp +++ b/src/Utilities/tests/test_timer.cpp @@ -391,7 +391,6 @@ TEST_CASE("test max exceeded message") } #endif -#if __cplusplus >=201103l // Define a list of timers indexed by an enum // First, define an enum with the timers enum TestTimer @@ -423,6 +422,5 @@ TEST_CASE("test setup timers","[utilities]") REQUIRE(Timers[MyTimer1]->get_num_calls() == 1); #endif } -#endif } diff --git a/src/config.h.cmake.in b/src/config.h.cmake.in index a0e82cf3e..345d2645b 100644 --- a/src/config.h.cmake.in +++ b/src/config.h.cmake.in @@ -188,9 +188,9 @@ /* Use SOA version of AA distance table */ #cmakedefine ENABLE_SOA @ENABLE_SOA@ -#if (__cplusplus >= 201103L) +#if defined(__cplusplus) #if defined(__INTEL_COMPILER) - #if defined(__KNC__) || defined(__AVX512F__) + #if defined(__AVX512F__) #define QMC_CLINE 64 #define QMC_ALIGNAS alignas(64) #define ASSUME_ALIGNED(x) __assume_aligned(x,64) @@ -210,13 +210,13 @@ #define ASSUME_ALIGNED(x) (x) = (__typeof__(x)) __builtin_assume_aligned(x,32) #endif #else - #define QMC_CLINE 32 - #define QMC_ALIGNAS - #define ASSUME_ALIGNED(x) + #define QMC_CLINE 32 + #define QMC_ALIGNAS alignas(32) + #define ASSUME_ALIGNED(x) #endif -#else //capture both C or non-c++11 - #if defined(__KNC__) || defined(__AVX512F__) +#else //capture C + #if defined(__AVX512F__) #define QMC_CLINE 64 #else #define QMC_CLINE 32 diff --git a/src/coulomb_types.h b/src/coulomb_types.h index afcb54ca4..07d30082d 100644 --- a/src/coulomb_types.h +++ b/src/coulomb_types.h @@ -14,7 +14,6 @@ #define QMCPLUSPLUS_COULOMB_TYPE_HPP #include //model to implement the mixed precision -#if (__cplusplus >= 201103L) #define DECLARE_COULOMB_TYPES \ using pRealType=OHMMS_PRECISION; \ @@ -23,15 +22,4 @@ using mComplexType=std::complex; \ using PosType=TinyVector; -#else - -#define DECLARE_COULOMB_TYPES \ - typedef OHMMS_PRECISION pRealType; \ - typedef OHMMS_PRECISION_FULL mRealType; \ - typedef std::complex pComplexType; \ - typedef std::complex mComplexType; \ - typedef TinyVector PosType; - -#endif - #endif diff --git a/src/qmc_common.h b/src/qmc_common.h index 43777c2f7..c96078ab8 100644 --- a/src/qmc_common.h +++ b/src/qmc_common.h @@ -23,7 +23,7 @@ namespace qmcplusplus { ///enumeration for main computing devices -enum {SMP=0, CUDA=1, PHI=2}; +enum {SMP=0, CUDA=1}; /** class to definte global variables to keep track a run */