From 9f86299a56cf1c61b31c68cdcbd337cdb0fa05b6 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Wed, 26 Jan 2022 10:53:38 +0100 Subject: [PATCH] [cpp17] require gcc>=9.3 (#96) - it was observed in the past that OpenMP required this (#269) --- epochX/cudacpp/ee_mumu/src/mgOnGpuConfig.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/epochX/cudacpp/ee_mumu/src/mgOnGpuConfig.h b/epochX/cudacpp/ee_mumu/src/mgOnGpuConfig.h index 31b1a8161d..841948d903 100644 --- a/epochX/cudacpp/ee_mumu/src/mgOnGpuConfig.h +++ b/epochX/cudacpp/ee_mumu/src/mgOnGpuConfig.h @@ -190,7 +190,14 @@ using mgOnGpu::fptype; // For SANITY CHECKS: check that neppR, neppM, neppV... are powers of two (https://stackoverflow.com/a/108360) inline constexpr bool ispoweroftwo( int n ){ return ( n > 0 ) && !( n & ( n - 1 ) ); } -// Compiler version support (#96): need CUDA >= 11.2 to use C++17 (see #333) +// Compiler version support (#96): require gcc >= 9.3, e.g. for some OMP issues (see #269) +#if defined __GNUC__ +#if ( __GNUC__ < 9 ) || ( __GNUC__ == 9 && __GNUC_MINOR__ < 3 ) +#error Unsupported gcc version: please gcc >= 9.3 +#endif +#endif + +// Compiler version support (#96): require CUDA >= 11.2, e.g. to use C++17 (see #333) #ifdef __CUDACC__ #if ( __CUDACC_VER_MAJOR__ < 11 ) || ( __CUDACC_VER_MAJOR__ == 11 && __CUDACC_VER_MINOR__ < 2 ) #error Unsupported CUDA version: please use CUDA >= 11.2