Re: [eigen] check for old gcc (inadvertently?) catching intel compiler and disabling SSE |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] check for old gcc (inadvertently?) catching intel compiler and disabling SSE
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 11 Apr 2013 19:44:38 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=H7oHiMV8LA0esRbfZ9ybxEfd/szvccxLPv5blvz/uWY=; b=YBky3ZQHz4i77sSMRrux/DsZOujEMF/+oa/8I1BgopvC2At1gXUX2EVVgimIFl7LkL oCgzkOFMElOcpE5x8ZVEQKcexViA1OvYn0kD3Rjkt3Xs9ZQYNCCuYiVR3dKw/maBDOI+ llT1nDGxtbBn0KK/nUFLlleP6lOuOAvU18QGEgFbYm1LDzzahVqaWoKUJtohnbmox7xA 8PGtV8YsPYABZNliS2u0/6WF2ya1OqDsjkcOble5Ka2hRO7klKdjXaEMJyYeiojSwSGa yXlLFtYms9+4+hy4cmbz9KbGOaPwhcnFoqjqaZBvRcHtZyKo5TAVWLhzubOIAgxE1Vjo OFaA==
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
>
>