Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vc-1.2.0 does not work with Intel C/C++ compiler 17.0.0 #143

Closed
amadio opened this issue Oct 7, 2016 · 5 comments
Closed

Vc-1.2.0 does not work with Intel C/C++ compiler 17.0.0 #143

amadio opened this issue Oct 7, 2016 · 5 comments
Assignees
Milestone

Comments

@amadio
Copy link
Collaborator

amadio commented Oct 7, 2016

I cannot compile any code using Vc with the Intel C/C++ compiler 17.0.0. Please see below for details:

antares ~ $ icc --version
icc (ICC) 17.0.0 20160721
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

antares ~ $ cat test.cc
#include <Vc/Vc>

int main()
{
  return 0;
}
antares ~ $ icc -Wall -std=c++11 -march=native -o test test.cc 
In file included from /usr/include/Vc/vector.h(192),
                 from /usr/include/Vc/Vc(31),
                 from test.cc(1):
/usr/include/Vc/common/simdarray.h(506): error: bad attribute argument substitution
  class alignas(((Common::nextPowerOfTwo(N) * (sizeof(V) / V::size()) - 1) & 127) +
                ^
          detected during:
            instantiation of class "Vc_1::SimdArray<T, N, V, Wt> [with T=unsigned short, N=32UL, V=Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, Wt=16UL]" at line 108 of "/usr/include/Vc/scalar/../common/../traits/type_traits.h"
            instantiation of class "Vc_1::Traits::vector_size_internal<T, true> [with T=Vc_1::Traits::decay<Vc_1::SimdArray<unsigned short, 32UL, Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, 16UL>>]" at line 172 of "/usr/include/Vc/scalar/../common/../traits/type_traits.h"
            instantiation of class "Vc_1::Traits::simd_vector_size<T> [with T=Vc_1::SimdArray<unsigned short, 32UL, Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, 16UL>]" at line 1357
            processing of template argument list for "Vc_1::result_vector_type_internal::evaluate" based on template arguments <short, Vc_1::SimdArray<unsigned short, 32UL, Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, 16UL>> at line 1411
            instantiation of type "Vc_1::result_vector_type<short, Vc_1::SimdArray<unsigned short, 32UL, Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, 16UL>>" at line 1414

In file included from /usr/include/Vc/vector.h(192),
                 from /usr/include/Vc/Vc(31),
                 from test.cc(1):
/usr/include/Vc/common/simdarray.h(83): error: bad attribute argument substitution
      ((Common::nextPowerOfTwo(N) * (sizeof(VectorType_) / VectorType_::size()) - 1) & 127) +
      ^
          detected during:
            instantiation of class "Vc_1::SimdArray<T, N, VectorType_, N> [with T=unsigned short, N=16UL, VectorType_=Vc_1::Common::select_best_vector_type<unsigned short, 16UL>]" at line 532
            instantiation of class "Vc_1::SimdArray<T, N, V, Wt> [with T=unsigned short, N=32UL, V=Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, Wt=16UL]" at line 108 of "/usr/include/Vc/scalar/../common/../traits/type_traits.h"
            instantiation of class "Vc_1::Traits::vector_size_internal<T, true> [with T=Vc_1::Traits::decay<Vc_1::SimdArray<unsigned short, 32UL, Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, 16UL>>]" at line 172 of "/usr/include/Vc/scalar/../common/../traits/type_traits.h"
            instantiation of class "Vc_1::Traits::simd_vector_size<T> [with T=Vc_1::SimdArray<unsigned short, 32UL, Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, 16UL>]" at line 1357
            processing of template argument list for "Vc_1::result_vector_type_internal::evaluate" based on template arguments <short, Vc_1::SimdArray<unsigned short, 32UL, Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, 16UL>> at line 1411
            instantiation of type "Vc_1::result_vector_type<short, Vc_1::SimdArray<unsigned short, 32UL, Vc_1::Common::select_best_vector_type<unsigned short, 32UL>, 16UL>>" at line 1414

In file included from /usr/include/Vc/vector.h(229),
                 from /usr/include/Vc/Vc(31),
                 from test.cc(1):
/usr/include/Vc/common/simdmaskarray.h(56): error: bad attribute argument substitution
      ((Common::nextPowerOfTwo(N) * (sizeof(VectorType_) / VectorType_::size()) - 1) & 127) +
      ^
          detected during instantiation of class "Vc_1::SimdMaskArray<T, N, VectorType_, N> [with T=int, N=4UL, VectorType_=Vc_1::SSE::int_v]" at line 85 of "/usr/include/Vc/sse/math.h"

In file included from /usr/include/Vc/vector.h(234),
                 from /usr/include/Vc/Vc(31),
                 from test.cc(1):
/usr/include/Vc/common/simdmaskarray.h(285): error: bad attribute argument substitution
  class alignas(((Common::nextPowerOfTwo(N) * (sizeof(V) / V::size()) - 1) & 127) +
                ^
          detected during instantiation of class "Vc_1::SimdMaskArray<T, N, V, Wt> [with T=int, N=8UL, V=Vc_1::SSE::int_v, Wt=4UL]" at line 225 of "/usr/include/Vc/avx/math.h"

compilation aborted for test.cc (code 2)
@mattkretz mattkretz added this to the Vc 1.3 milestone Oct 7, 2016
@mattkretz mattkretz self-assigned this Oct 7, 2016
@mattkretz
Copy link
Member

Yes, that's a bug in ICC. I have a workaround in current master of Vc. I'm working on finalizing Vc 1.3 so that you can have the fix in a release.

@amadio
Copy link
Collaborator Author

amadio commented Oct 8, 2016

Thank you. If you are going to make a new release, though, I recommend checking the KNC build too. I've had problems with Vc on KNC even with ICC 16. Best,

@mattkretz
Copy link
Member

yes, thanks. I think I also fixed those. At least my nightlies for master have been looking good.

@noma
Copy link

noma commented Oct 17, 2016

Exactly that bug was reported to Intel in May. :-/ Glad to read you've worked around it, and Vc can be used with the Intel Compiler again.

@mattkretz
Copy link
Member

mattkretz commented Oct 18, 2016

Thanks for the heads up. Good that Intel has this bug on its plate. (I seriously sometimes wonder about their QA. ICC has way more regressions than any other compiler I work with.)

In case you need it: The workaround required moving the alignas from the class declaration down to the first data member of the class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants