Re: [eigen] check for old gcc (inadvertently?) catching intel compiler and disabling SSE

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

that should be easy to fix. I'm not 100% sure about the exact reason,
but I think that's because gcc 4.1 has an incomplete support for SSE2.

gael


On Thu, Apr 11, 2013 at 3:43 PM, Mark Borgerding <mark@xxxxxxxxxxxxxx> wrote:
> in Eigen/Core, there is a check that disables SSE for gcc compilers < 4.2.
> Unfortunately it gets triggered under the *intel* compiler.
>
>   #if (defined __SSE2__) && ( (!defined __GNUC__) ||
> EIGEN_GNUC_AT_LEAST(4,2) )
>     #define EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC
>   #endif
>
> The intel compiler masquerades by defining __GNUC__ and related version
> variables to mimic the gcc version installed on the system.
> The effect in Eigen is that the intel compiler may not get a chance to use
> SSE even if it can[1].
>
> e.g.
>
>     [user@centos58-64 ~/]$ gcc --version
>     gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)
>
>     [user@centos58-64 ~/]$  icpc -dM -E - < /dev/null  |  grep GNUC
>     #define __GNUC__ 4
>     #define __GNUC_MINOR__ 1
>     #define __GNUC_PATCHLEVEL__ 2
>
> Intel compilers at least as recent as 12.1.3 20120212 exhibit this GNUC
> mimicry.
>
>
> [1] What is the problem with gcc 4.1 and SIMD?  The version check in Eigen
> seems originate at changeset  246:566b4821dd1b , but I could not easily tell
> what problem it was fixing.
> I have some systems still running RedHat 5.x, which has gcc 4.1 as the
> default compiler.  I'd like to support them with Eigen+SIMD on Intel(first
> choice), and/or platform-default gcc.
>
>
> -- Mark
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/