From c04b6a776d25340da3d2a9d95acbebc7d2b2da1b Mon Sep 17 00:00:00 2001 From: eschnett Date: Sun, 18 Nov 2012 00:43:42 +0000 Subject: Add configure macro for OpenMP collapse clause Disable OpenMP collapse clause for certain versions of the Intel compiler that are known to mis-compile them. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4913 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/make/cctk_Config.h.in | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'lib') diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in index 5d7468cf..20e6109a 100644 --- a/lib/make/cctk_Config.h.in +++ b/lib/make/cctk_Config.h.in @@ -337,6 +337,14 @@ typedef enum {false, true} bool; # define CCTK_BUILTIN_EXPECT(x,y) (x) #endif +/* OpenMP collapse clause */ +#if defined __INTEL_COMPILER && __INTEL_COMPILER_BUILD_DATE < 20100801 +/* see http://software.intel.com/en-us/articles/intel-professional-edition-compilers-111-fixes-list/ */ +# define collapse(N) +#else +# undef collapse +#endif + #endif /* ! defined __cplusplus */ /****************************************************************************/ @@ -510,6 +518,14 @@ typedef enum {false, true} bool; # define CCTK_RESTRICT restrict #endif +/* OpenMP collapse clause */ +#if defined __INTEL_COMPILER && __INTEL_COMPILER_BUILD_DATE < 20100801 +/* see http://software.intel.com/en-us/articles/intel-professional-edition-compilers-111-fixes-list/ */ +# define collapse(N) +#else +# undef collapse +#endif + #endif /* __cplusplus */ /****************************************************************************/ @@ -526,6 +542,16 @@ typedef enum {false, true} bool; #undef HAVE_CCTK_FORTRAN_COMPLEX16 #undef HAVE_CCTK_FORTRAN_COMPLEX32 +/* OpenMP collapse clause */ +#if defined __INTEL_COMPILER && __INTEL_COMPILER_BUILD_DATE < 20100801 +/* see http://software.intel.com/en-us/articles/intel-professional-edition-compilers-111-fixes-list/ */ +# define collapse(N) +# define COLLAPSE(N) +#else +# undef collapse +# undef COLLAPSE +#endif + #endif /* FCODE */ /* Now include the code to pick an appropriate precison for reals and ints */ -- cgit v1.2.3