diff --git a/CMakeLists.txt b/CMakeLists.txt index c62caabc3a768c906fdee77e87b73a495798cfd2..174015bc79c764926767047274701f73941a71e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,9 +227,6 @@ mark_as_advanced ( WALBERLA_CXX_COMPILER_IS_CLANG ) if( CMAKE_CXX_COMPILER_ID MATCHES Cray ) option ( WALBERLA_CXX_COMPILER_IS_CRAY "Use Cray compiler" ON ) - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.4) - message( FATAL_ERROR "Insufficient Cray Compiler Environment version" ) - endif() else() option ( WALBERLA_CXX_COMPILER_IS_CRAY "Use Cray compiler" OFF ) endif() @@ -690,8 +687,14 @@ endif( Boost_FOUND ) ## ############################################################################################################################ -if ( NOT WIN32 ) - add_flag( CMAKE_CXX_FLAGS "-pthread" ) +set( THREADS_PREFER_PTHREAD_FLAG TRUE ) +find_package(Threads) +if ( Threads_FOUND ) + if( CMAKE_USE_PTHREADS_INIT ) + add_flag( CMAKE_CXX_FLAGS "-pthread" ) + else() + add_flag( CMAKE_CXX_FLAGS "${CMAKE_THREAD_LIBS_INIT}" ) + endif() endif() @@ -975,10 +978,7 @@ endif() option ( WALBERLA_THREAD_SAFE_LOGGING "Enables/Disables thread-safe logging" ON ) if ( WALBERLA_BUILD_WITH_OPENMP ) - if ( WALBERLA_CXX_COMPILER_IS_INTEL AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "16.0.3" ) - add_flag ( CMAKE_C_FLAGS "-openmp" ) - add_flag ( CMAKE_CXX_FLAGS "-openmp" ) - elseif ( WALBERLA_CXX_COMPILER_IS_NEC ) + if ( WALBERLA_CXX_COMPILER_IS_NEC ) add_flag ( CMAKE_C_FLAGS "-Popenmp" ) add_flag ( CMAKE_CXX_FLAGS "-Popenmp" ) else() @@ -1089,31 +1089,7 @@ endif() ## ############################################################################################################################ if ( WALBERLA_BUILD_WITH_LTO ) - - if( WALBERLA_CXX_COMPILER_IS_INTEL ) - add_flag( CMAKE_CXX_FLAGS_RELEASE "-ip -ipo3" ) - add_flag( CMAKE_C_FLAGS_RELEASE "-ip -ipo3" ) - endif() - - if ( CMAKE_COMPILER_IS_GNUCXX ) - add_flag ( CMAKE_C_FLAGS_RELEASE "-flto=3" ) - add_flag ( CMAKE_CXX_FLAGS_RELEASE "-flto=3" ) - add_flag ( CMAKE_EXE_LINKER_FLAGS "-fuse-linker-plugin" ) - endif ( ) - - if( WALBERLA_CXX_COMPILER_IS_MSVC ) - add_flag ( CMAKE_CXX_FLAGS_RELEASE "/GL" ) - add_flag ( CMAKE_EXE_LINKER_FLAGS_RELEASE "/LTCG" ) - add_flag ( CMAKE_SHARED_LINKER_FLAGS_RELEASE "/LTCG" ) - add_flag ( CMAKE_MODULE_LINKER_FLAGS_RELEASE "/LTCG" ) - endif ( ) - - if( WALBERLA_CXX_COMPILER_IS_IBM ) - add_flag ( CMAKE_C_FLAGS_RELEASE "-qipa" ) - add_flag ( CMAKE_CXX_FLAGS_RELEASE "-qipa" ) - add_flag ( CMAKE_EXE_LINKER_FLAGS "-qipa" ) - endif( ) - + set( CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE ) endif ( ) ############################################################################################################################ diff --git a/apps/showcases/PhaseFieldAllenCahn/CPU/contact.cpp b/apps/showcases/PhaseFieldAllenCahn/CPU/contact.cpp index 4e87ab28f4c6e5c011d2e78dda90efc08f0e6c94..8253e1d4cd26c071e4c1abd775d8aee82e27ce26 100644 --- a/apps/showcases/PhaseFieldAllenCahn/CPU/contact.cpp +++ b/apps/showcases/PhaseFieldAllenCahn/CPU/contact.cpp @@ -36,7 +36,7 @@ namespace lbm namespace internal_boundary_contact { -static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_indexVector, double* RESTRICT _data_phase, +static FUNC_PREFIX void contact_angle_treatment(uint8_t* WALBERLA_RESTRICT const _data_indexVector, double* WALBERLA_RESTRICT _data_phase, int64_t const _stride_phase_0, int64_t const _stride_phase_1, int64_t const _stride_phase_2, int64_t indexVectorSize, double alpha) { @@ -58,8 +58,8 @@ static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_in const double a = cos(alpha); const double W = 5; - double* RESTRICT _phase_wall = _data_phase + _stride_phase_1 * y + _stride_phase_2 * z; - double* RESTRICT _phase_interior = _data_phase + _stride_phase_1 * y1 + _stride_phase_2 * z1; + double* WALBERLA_RESTRICT _phase_wall = _data_phase + _stride_phase_1 * y + _stride_phase_2 * z; + double* WALBERLA_RESTRICT _phase_interior = _data_phase + _stride_phase_1 * y1 + _stride_phase_2 * z1; if (h < 0.001) { _phase_wall[_stride_phase_0 * x] = 1.0; } else if (a > 1e-8 || a < -1e-8) { @@ -98,7 +98,7 @@ void contact::run(IBlock* block, IndexVectors::Type type) auto& alpha = this->alpha_; WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(phaseField->nrOfGhostLayers())) - double* RESTRICT _data_phase = phaseField->dataAt(0, 0, 0, 0); + double* WALBERLA_RESTRICT _data_phase = phaseField->dataAt(0, 0, 0, 0); const auto _stride_pdfs_0 = int64_t(phaseField->xStride()); const auto _stride_pdfs_1 = int64_t(phaseField->yStride()); const auto _stride_pdfs_2 = int64_t(phaseField->zStride()); diff --git a/apps/showcases/PhaseFieldAllenCahn/CPU/contact.h b/apps/showcases/PhaseFieldAllenCahn/CPU/contact.h index c534195169519a8634fad6fd0dc00b836b1b0634..dbaf4a560b3a717c96b34ae811a58f048776eff8 100644 --- a/apps/showcases/PhaseFieldAllenCahn/CPU/contact.h +++ b/apps/showcases/PhaseFieldAllenCahn/CPU/contact.h @@ -31,14 +31,6 @@ #include <set> #include <vector> -#ifdef __GNUC__ -# define RESTRICT __restrict__ -#elif _MSC_VER -# define RESTRICT __restrict -#else -# define RESTRICT -#endif - namespace walberla { namespace lbm diff --git a/apps/showcases/PhaseFieldAllenCahn/GPU/contact.cu b/apps/showcases/PhaseFieldAllenCahn/GPU/contact.cu index 6a42483ba1376328e71bff03d8bb234dbfb0474d..48d26d1c5d7ec8e9353e48cd9a81731179ce4de4 100644 --- a/apps/showcases/PhaseFieldAllenCahn/GPU/contact.cu +++ b/apps/showcases/PhaseFieldAllenCahn/GPU/contact.cu @@ -41,25 +41,25 @@ namespace lbm namespace internal_boundary_contact { -static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_indexVector, double* RESTRICT _data_phase, +static FUNC_PREFIX void contact_angle_treatment(uint8_t* WALBERLA_RESTRICT const _data_indexVector, double* WALBERLA_RESTRICT _data_phase, int64_t const _stride_phase_0, int64_t const _stride_phase_1, int64_t const _stride_phase_2, int64_t indexVectorSize, double alpha) { if (blockDim.x * blockIdx.x + threadIdx.x < indexVectorSize) { - uint8_t* RESTRICT _data_indexVector_10 = _data_indexVector; + uint8_t* WALBERLA_RESTRICT _data_indexVector_10 = _data_indexVector; const int32_t x = *((int32_t*) (&_data_indexVector_10[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); - uint8_t* RESTRICT _data_indexVector_14 = _data_indexVector + 4; + uint8_t* WALBERLA_RESTRICT _data_indexVector_14 = _data_indexVector + 4; const int32_t y = *((int32_t*) (&_data_indexVector_14[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); - uint8_t* RESTRICT _data_indexVector_18 = _data_indexVector + 8; + uint8_t* WALBERLA_RESTRICT _data_indexVector_18 = _data_indexVector + 8; const int32_t z = *((int32_t*) (&_data_indexVector_18[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); - uint8_t* RESTRICT _data_indexVector_112 = _data_indexVector + 12; + uint8_t* WALBERLA_RESTRICT _data_indexVector_112 = _data_indexVector + 12; const int32_t nx = *((int32_t*) (&_data_indexVector_112[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); const int32_t x1 = x + nx; - uint8_t* RESTRICT _data_indexVector_116 = _data_indexVector + 16; + uint8_t* WALBERLA_RESTRICT _data_indexVector_116 = _data_indexVector + 16; const int32_t ny = *((int32_t*) (&_data_indexVector_116[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); const int32_t y1 = y + ny; - uint8_t* RESTRICT _data_indexVector_200 = _data_indexVector + 20; + uint8_t* WALBERLA_RESTRICT _data_indexVector_200 = _data_indexVector + 20; const int32_t nz = *((int32_t*) (&_data_indexVector_200[24 * blockDim.x * blockIdx.x + 24 * threadIdx.x])); const int32_t z1 = z + nz; @@ -67,8 +67,8 @@ static FUNC_PREFIX void contact_angle_treatment(uint8_t* RESTRICT const _data_in const double a = cos(alpha); const double W = 5; - double* RESTRICT _phase_wall = _data_phase + _stride_phase_1 * y + _stride_phase_2 * z; - double* RESTRICT _phase_interior = _data_phase + _stride_phase_1 * y1 + _stride_phase_2 * z1; + double* WALBERLA_RESTRICT _phase_wall = _data_phase + _stride_phase_1 * y + _stride_phase_2 * z; + double* WALBERLA_RESTRICT _phase_interior = _data_phase + _stride_phase_1 * y1 + _stride_phase_2 * z1; if (h < 0.001) { _phase_wall[_stride_phase_0 * x] = 1.0; } else if (a > 1e-8 || a < -1e-8) { @@ -107,7 +107,7 @@ void contact::run(IBlock* block, IndexVectors::Type type, cudaStream_t stream) auto& alpha = this->alpha_; WALBERLA_ASSERT_GREATER_EQUAL(0, -int_c(phaseField->nrOfGhostLayers())) - double* RESTRICT _data_phase = phaseField->dataAt(0, 0, 0, 0); + double* WALBERLA_RESTRICT _data_phase = phaseField->dataAt(0, 0, 0, 0); const auto _stride_pdfs_0 = int64_t(phaseField->xStride()); const auto _stride_pdfs_1 = int64_t(phaseField->yStride()); const auto _stride_pdfs_2 = int64_t(phaseField->zStride()); diff --git a/apps/showcases/PhaseFieldAllenCahn/GPU/contact.h b/apps/showcases/PhaseFieldAllenCahn/GPU/contact.h index 2ce5deefbe2f41df6ed295d9a8e9a44e863f6756..f2cd84cd0c67577ab7a40d8ac720fda46f6e7fe3 100644 --- a/apps/showcases/PhaseFieldAllenCahn/GPU/contact.h +++ b/apps/showcases/PhaseFieldAllenCahn/GPU/contact.h @@ -32,14 +32,6 @@ #include <set> #include <vector> -#ifdef __GNUC__ -# define RESTRICT __restrict__ -#elif _MSC_VER -# define RESTRICT __restrict -#else -# define RESTRICT -#endif - namespace walberla { namespace lbm diff --git a/src/blockforest/BlockForest.cpp b/src/blockforest/BlockForest.cpp index 62affa8372cdddb8da498c7ee393dd98d266bd13..70b1fdaf4d4ef2521d81a1a977032376cddad65d 100644 --- a/src/blockforest/BlockForest.cpp +++ b/src/blockforest/BlockForest.cpp @@ -1661,7 +1661,7 @@ bool BlockForest::determineBlockTargetLevels( bool & additionalRefreshCycleRequi minTargetLevels[id] = minTargetLevel; } } -#ifndef NDEBUF +#ifndef NDEBUG else { WALBERLA_ASSERT_LESS_EQUAL( minTargetLevel, level + uint_t(1) ); diff --git a/src/blockforest/BlockID.cpp b/src/blockforest/BlockID.cpp index 886567ed93a2812dd5c176ff800ea5c192f4e32d..865cfcb2ede67d3c8542fb649379b4508f05fcd0 100644 --- a/src/blockforest/BlockID.cpp +++ b/src/blockforest/BlockID.cpp @@ -135,11 +135,9 @@ void BlockID::toByteArray( std::vector< uint8_t >& array, const uint_t offset, c #else -#ifdef WALBERLA_CXX_COMPILER_IS_MSVC -namespace { char dummy; } // disable MSVC warning LNK4221: This object file does not define any previously - // undefined public symbols, so it will not be used by any link operation that - // consumes this library -#endif +namespace internal { +char dummy; // silence linker warning about object file with no symbols +} #endif diff --git a/src/core/NonCreateable.h b/src/core/NonCreateable.h index 42dc0057b102454f492bb2ec8918320a2227495b..fb291a3a93afcf49ae1a9b9225cf42c8ba3ccea1 100644 --- a/src/core/NonCreateable.h +++ b/src/core/NonCreateable.h @@ -35,34 +35,8 @@ namespace walberla{ class NonCreateable { -#ifndef _MSC_VER - - // non-MSVC-Build - -private: - - NonCreateable(); - ~NonCreateable(); - - NonCreateable(const NonCreateable&); - NonCreateable& operator=(const NonCreateable&); - -#else - - // MSVC-Build (eliminating warning C4624) - -private: - - NonCreateable(); - NonCreateable(const NonCreateable&); - - NonCreateable& operator=(const NonCreateable&); - -protected: - - ~NonCreateable(); - -#endif +public: + NonCreateable() = delete; }; diff --git a/src/core/Sanitizer.h b/src/core/Sanitizer.h index 8ccb5f7b868a053643d0518bac63c020a330a49c..86ff575167a338a45514216eaba3fb0fba25463b 100644 --- a/src/core/Sanitizer.h +++ b/src/core/Sanitizer.h @@ -21,16 +21,15 @@ #pragma once -#if (( defined WALBERLA_CXX_COMPILER_IS_CLANG ) && ( __clang_major__ >=4 ) ) \ - || (( defined WALBERLA_CXX_COMPILER_IS_GNU ) && ( __GNUC__ >= 5 ) ) +#if defined(WALBERLA_CXX_COMPILER_IS_CLANG) || defined(WALBERLA_CXX_COMPILER_IS_GNU) # define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) #else # define ATTRIBUTE_NO_SANITIZE_ADDRESS #endif -#if ( ( defined WALBERLA_CXX_COMPILER_IS_GNU ) && ( __GNUC__ >= 5 ) ) +#if defined(WALBERLA_CXX_COMPILER_IS_GNU) # define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined)) -#elif (( defined WALBERLA_CXX_COMPILER_IS_CLANG ) && ( __clang_major__ >= 4 ) ) +#elif defined(WALBERLA_CXX_COMPILER_IS_CLANG) # define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined"))) #else # define ATTRIBUTE_NO_SANITIZE_UNDEFINED diff --git a/src/core/Sleep.cpp b/src/core/Sleep.cpp index ae26ea9cfa1a738fe4279a491a76cf818d2ee913..8706a72ecfa210734663477cc48bac425a7e9089 100644 --- a/src/core/Sleep.cpp +++ b/src/core/Sleep.cpp @@ -22,36 +22,13 @@ #include "Sleep.h" #include "waLBerlaDefinitions.h" -#ifdef WALBERLA_CXX_COMPILER_IS_MSVC - -#include <windows.h> +#include <thread> namespace walberla { - void sleep( uint_t seconds ) - { - ::Sleep( static_cast<DWORD>( uint_t(1000) * seconds ) ); - } - +void sleep( uint_t seconds ) +{ + std::this_thread::sleep_for(std::chrono::seconds(static_cast<int>(seconds))); } -#else - -#ifdef WALBERLA_CXX_COMPILER_IS_IBM -#ifndef _POSIX_SOURCE -#define _POSIX_SOURCE -#endif -#endif - -#include <unistd.h> - -namespace walberla { - - void sleep( uint_t seconds ) - { - ::sleep( static_cast<unsigned int>(seconds) ); - } - } - -#endif \ No newline at end of file diff --git a/src/core/Template.h b/src/core/Template.h deleted file mode 100644 index 861c7bebde4811d9d4053445fad2932af7490b25..0000000000000000000000000000000000000000 --- a/src/core/Template.h +++ /dev/null @@ -1,65 +0,0 @@ -//====================================================================================================================== -// -// This file is part of waLBerla. waLBerla is free software: you can -// redistribute it and/or modify it under the terms of the GNU General Public -// License as published by the Free Software Foundation, either version 3 of -// the License, or (at your option) any later version. -// -// waLBerla is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -// for more details. -// -// You should have received a copy of the GNU General Public License along -// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>. -// -//! \file Template.h -//! \ingroup core -//! \author Klaus Iglberger -//! \author Sebastian Eibl <sebastian.eibl@fau.de> -// -//====================================================================================================================== - -#pragma once - - -//************************************************************************************************* -/*! \cond internal */ -/*!\brief Compiler specific patch for nested template disambiguation. - * \ingroup util - * - * The WALBERLA_TEMPLATE is a patch for the Microsoft Visual C++ compiler that does not correctly - * parse definitions of nested templates of the following form: - - \code - template< typename T > - class Alloc { - public: - ... - template< typename Other > - class rebind { - public: - typedef Alloc<Other> other; - }; - ... - }; - - typedef Alloc<int> AI; - typedef AI::template rebind<double>::other Other; // Compilation error with Visual C++ - \endcode - - * In order to circumvent this compilation error, the WALBERLA_TEMPLATE macro should be used instead - * the \a template keyword: - - \code - ... - typedef AI::WALBERLA_TEMPLATE rebind<double>::other Other; // No compilation errors - \endcode - */ -#if defined(_MSC_VER) -# define WALBERLA_TEMPLATE -#else -# define WALBERLA_TEMPLATE template -#endif -/*! \endcond */ -//************************************************************************************************* diff --git a/src/core/math/Constants.h b/src/core/math/Constants.h index 79e97e97ed716524712878b36566379a01d36c24..92e49678d67bce580b9ce0dd46fd004f96609e28 100644 --- a/src/core/math/Constants.h +++ b/src/core/math/Constants.h @@ -30,12 +30,6 @@ #include <cmath> #include <core/DataTypes.h> -// Disable false warnings in GCC 5 -#if (defined __GNUC__) && (__GNUC__ == 5) && (__GNUC_MINOR__ == 1) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wunused-variable" -#endif - namespace walberla { namespace math diff --git a/src/core/math/Parser.cpp b/src/core/math/Parser.cpp index b3a4575677d319efd1cd2d198cbcedd228bb561e..7c39e5e9da6402e5981cabbf9e2685ee58988084 100644 --- a/src/core/math/Parser.cpp +++ b/src/core/math/Parser.cpp @@ -31,9 +31,7 @@ # pragma warning( disable : 4706 ) #elif ( defined WALBERLA_CXX_COMPILER_IS_GNU ) || ( defined WALBERLA_CXX_COMPILER_IS_CLANG ) # pragma GCC diagnostic push -# if !( ( __clang_major__ == 3 ) && ( __clang_minor__ <= 4 ) ) -# pragma GCC diagnostic ignored "-Wpragmas" -# endif +# pragma GCC diagnostic ignored "-Wpragmas" # pragma GCC diagnostic ignored "-Wsign-conversion" # pragma GCC diagnostic ignored "-Wconversion" # pragma GCC diagnostic ignored "-Wshorten-64-to-32" diff --git a/src/core/math/Uint.cpp b/src/core/math/Uint.cpp index 38f8003e746a3534fcb312a408bbb51b5f0fe6fb..347f639b88802d1c2582f6985fe5520ec417e000 100644 --- a/src/core/math/Uint.cpp +++ b/src/core/math/Uint.cpp @@ -49,11 +49,5 @@ template<> uint_t uintMSBPosition< uint64_t >( uint64_t value ) { // for the doc return ( i != 0 ) ? (8 + msbLookupTable[i]) : msbLookupTable[value]; } -#ifndef WALBERLA_CXX_COMPILER_IS_MSVC - -const uint_t int_ld<1>::exp; - -#endif - } // namespace math } // namespace walberla diff --git a/src/core/math/Uint.h b/src/core/math/Uint.h index 5a76bc8fa8f52b30c4e52efc16ccc3f8d25c3381..3b0ab172171024aa8151f986b996980e145fe1d9 100644 --- a/src/core/math/Uint.h +++ b/src/core/math/Uint.h @@ -222,8 +222,8 @@ struct leastUnsignedInteger }; /// \cond internal -static const uint_t UINT_BITS = static_cast< uint_t >( std::numeric_limits< uint_t >::digits ); -static const uint_t UINT_BYTES = static_cast< uint_t >( std::numeric_limits< uint_t >::digits ) >> 3; +static constexpr uint_t UINT_BITS = static_cast< uint_t >( std::numeric_limits< uint_t >::digits ); +static constexpr uint_t UINT_BYTES = static_cast< uint_t >( std::numeric_limits< uint_t >::digits ) >> 3; static_assert( !(UINT_BITS & (UINT_BITS - 1)), "Type \"uint_t\" must consist of 2^x Bits!" ); // power of two @@ -231,18 +231,17 @@ template< int N > struct int_ld { static_assert( N >= 1 && !(N & (N - 1)), "Calculating log_2(N) -> \"N\" must be a power of two!" ); - static const uint_t exp = 1 + int_ld< (N >> 1) >::exp; + static constexpr uint_t exp = 1 + int_ld< (N >> 1) >::exp; + static_assert( exp > 0 ); }; -template< int N > const uint_t int_ld<N>::exp; - template<> struct int_ld<1> { - static const uint_t exp = 0; + static constexpr uint_t exp = 0; }; -static const uint_t UINT_BITS_LD = int_ld< std::numeric_limits< uint_t >::digits >::exp; +static constexpr uint_t UINT_BITS_LD = int_ld< std::numeric_limits< uint_t >::digits >::exp; /// \endcond } // namespace math diff --git a/src/core/mpi/BufferDataTypeExtensions.h b/src/core/mpi/BufferDataTypeExtensions.h index 3196b5362bd1803582bf64dcd47f2819f1065e9d..69f3e52e9d1f2fb5f5e69b38c3d509c5c94d5953 100644 --- a/src/core/mpi/BufferDataTypeExtensions.h +++ b/src/core/mpi/BufferDataTypeExtensions.h @@ -143,13 +143,6 @@ void sendContainer( GenericSendBuffer<T,G> & buf, const Cont & container ) } -#ifdef WALBERLA_CXX_COMPILER_IS_GNU -#if __GNUC__ == 4 && __GNUC_MINOR__ == 9 || __GNUC__ == 6 -#pragma GCC push_options -#pragma GCC optimize(2) -#endif -#endif - template< typename T, // Element type of RecvBuffer typename Cont> // Container void recvContainer( GenericRecvBuffer<T> & buf, Cont & container ) @@ -162,12 +155,6 @@ void recvContainer( GenericRecvBuffer<T> & buf, Cont & container ) buf >> *it; } -#ifdef WALBERLA_CXX_COMPILER_IS_GNU -#if __GNUC__ == 4 && __GNUC_MINOR__ == 9 || __GNUC__ == 6 -#pragma GCC pop_options -#endif -#endif - template< typename T, // Element type of SendBuffer diff --git a/src/field/iterators/IteratorMacros.h b/src/field/iterators/IteratorMacros.h index 08e8d5d9786ccb9fb5705f005b101567a3b1f87b..ed5b98711891b1f35ee3bbeef15520bf039bf7a0 100644 --- a/src/field/iterators/IteratorMacros.h +++ b/src/field/iterators/IteratorMacros.h @@ -149,7 +149,7 @@ #ifdef _OPENMP -#ifdef WALBERLA_CXX_COMPILER_IS_MSVC +#if (defined(_MSC_VER) && _MSC_VER < 1926) #define WALBERLA_FOR_ALL_CELLS_XYZ_OMP( field, omp, CODE ) \ { WALBERLA_ASSERT_NOT_NULLPTR_1( (field) ); \ @@ -875,7 +875,7 @@ } \ } } -#else // == not WALBERLA_CXX_COMPILER_IS_MSVC +#else // == MSVC >= 2019 16.6 or not MSVC #define WALBERLA_FOR_ALL_CELLS_XYZ_OMP( field, omp, CODE ) \ { WALBERLA_ASSERT_NOT_NULLPTR_1( (field) ); \ diff --git a/src/lbm/field/initializer/ExprSystemInitFunction.cpp b/src/lbm/field/initializer/ExprSystemInitFunction.cpp index abb2f028c79a1f737d8fd954ba7904208eb2bcf1..bb3f5ebcd44d6adfaca910d1a67f9c930b43c149 100644 --- a/src/lbm/field/initializer/ExprSystemInitFunction.cpp +++ b/src/lbm/field/initializer/ExprSystemInitFunction.cpp @@ -27,9 +27,7 @@ # pragma warning( disable : 4706 ) #elif ( defined WALBERLA_CXX_COMPILER_IS_GNU ) || ( defined WALBERLA_CXX_COMPILER_IS_CLANG ) # pragma GCC diagnostic push -# if !( ( __clang_major__ == 3 ) && ( __clang_minor__ <= 4 ) ) -# pragma GCC diagnostic ignored "-Wpragmas" -# endif +# pragma GCC diagnostic ignored "-Wpragmas" # pragma GCC diagnostic ignored "-Wsign-conversion" # pragma GCC diagnostic ignored "-Wconversion" # pragma GCC diagnostic ignored "-Wshorten-64-to-32" diff --git a/src/pe/rigidbody/Owner.cpp b/src/pe/rigidbody/Owner.cpp deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/python_coupling/PythonWrapper.h b/src/python_coupling/PythonWrapper.h index 7ae14bada961b0bafec2d32f80e2597bca85a40b..3909af0521faa0673fe7ada7b6c19c2acbe0df9f 100644 --- a/src/python_coupling/PythonWrapper.h +++ b/src/python_coupling/PythonWrapper.h @@ -28,23 +28,6 @@ #ifdef WALBERLA_BUILD_WITH_PYTHON // macro defined in waLBerlaDefinitions.h -#ifdef _MSC_VER -#pragma warning ( push, 3 ) -#pragma warning ( disable: 4244 4275 4800 4251 4267 ) -#ifndef HAVE_ROUND -#define HAVE_ROUND 1 -#define __CREATED_HAVE_ROUND -#endif -#endif - #include "pybind11/pybind11.h" -#ifdef _MSC_VER -#ifdef __CREATED_HAVE_ROUND -#undef HAVE_ROUND -#undef __CREATED_HAVE_ROUND -#endif -#pragma warning ( pop ) -#endif - #endif diff --git a/src/simd/SIMD.h b/src/simd/SIMD.h index d0feb81e71504eef64201e8d6b925afb25fb0234..2998cef34775dfe799a287db98ab0f22ef0ee3e9 100644 --- a/src/simd/SIMD.h +++ b/src/simd/SIMD.h @@ -127,7 +127,7 @@ namespace simd { template<typename T> struct is_vector4_type { static const bool value = false; }; -#if ( defined WALBERLA_CXX_COMPILER_IS_GNU ) && ( __GNUC__ >= 6 ) +#ifdef WALBERLA_CXX_COMPILER_IS_GNU # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wignored-attributes" #endif @@ -168,7 +168,7 @@ template<typename T> struct is_vector4_type { static const bool value = false; #endif -#if ( defined WALBERLA_CXX_COMPILER_IS_GNU ) && ( __GNUC__ >= 6 ) +#ifdef WALBERLA_CXX_COMPILER_IS_GNU # pragma GCC diagnostic pop #endif diff --git a/src/stencil/Directions.h b/src/stencil/Directions.h index 4d42e24cd80ee5c15000bb976906a13663a82d7d..cc3cfa29b1e320ca1b0f9c49f118402585036e21 100644 --- a/src/stencil/Directions.h +++ b/src/stencil/Directions.h @@ -10,7 +10,6 @@ // core includes #include "core/DataTypes.h" -#include "core/NonCreateable.h" #include "core/cell/Cell.h" #include "core/debug/Debug.h" diff --git a/tests/simd/CMakeLists.txt b/tests/simd/CMakeLists.txt index 060dd5b616511af6b610875464cab33a6deb2c60..6fa07c3c58231be9683bfc0f8c4eeeb1469177aa 100644 --- a/tests/simd/CMakeLists.txt +++ b/tests/simd/CMakeLists.txt @@ -8,12 +8,8 @@ # builds the test -if ( CMAKE_COMPILER_IS_GNUCXX ) - if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0" ) - set( MarchNativeString "" ) - else() - set( MarchNativeString "-march=native" ) - endif() +if ( WALBERLA_CXX_COMPILER_IS_GNU OR WALBERLA_CXX_COMPILER_IS_CLANG ) + set( MarchNativeString "-march=native" ) endif() waLBerla_compile_test( NAME AVX2_AVX_Equivalence FILES SIMD_Equivalence.cpp )