- changed status to wontfix
Error compiling with Intel 2017-2019 on Linux
Hi,
I'm having difficulty building Blaze on Linux. I pull latest source, include <blaze/Blaze.h> and compile an empty main with Intel Compiler 2017 (2018, or 2019) on CentOS 7.1. The icpc line is
icpc -std=c++11
The first few lines of the error message is
In file included from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/util/constraints/FloatingPoint.h(43),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/Accuracy.h(43),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Math.h(43),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Blaze.h(43),
from main.cpp(13):
/home/zhewang/Tool/blaze-3.4-opt/include/blaze/util/typetraits/IsFloatingPoint.h(95): error: "IsFloatingPoint_v" is not a function or static data member
constexpr bool IsFloatingPoint_v = IsFloatingPoint<T>::value;
^
In file included from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/util/constraints/FloatingPoint.h(43),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/Accuracy.h(43),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Math.h(43),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Blaze.h(43),
from main.cpp(13):
/home/zhewang/Tool/blaze-3.4-opt/include/blaze/util/typetraits/IsFloatingPoint.h(95): error: "constexpr" is not valid here
constexpr bool IsFloatingPoint_v = IsFloatingPoint<T>::value;
^
In file included from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/views/Forward.h(44),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/typetraits/IsBand.h(43),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/constraints/Band.h(43),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/Band.h(44),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Math.h(46),
from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Blaze.h(43),
from main.cpp(13):
/home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/expressions/Forward.h(190): error: expected an identifier
decltype(auto) operator+( const DenseVector<VT1,TF>&, const DenseVector<VT2,TF>& );
^
It seems I did something wrong again.. Could you please help? Thanks.
Comments (10)
-
-
reporter Klaus,
Thanks for your response and pointing out variable templates. Intel does support variable templates stated here. GNU supports the same set of C++14 features. With -std=c++14 enabled for Intel, the errors become:
In file included from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/expressions/DenseMatrix.h(43), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/typetraits/IsDenseMatrix.h(43), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/views/band/BaseTemplate.h(43), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/views/Forward.h(45), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/typetraits/IsBand.h(43), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/constraints/Band.h(43), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/Band.h(44), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Math.h(46), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Blaze.h(43), from main.cpp(13): /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/expressions/Matrix.h(107): error: cannot overload functions distinguished by return type alone BLAZE_ALWAYS_INLINE constexpr const MatrixType& operator~() const noexcept { ^ In file included from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/sparse/CompressedMatrix.h(57), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/CompressedMatrix.h(45), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Math.h(48), from /home/zhewang/Tool/blaze-3.4-opt/include/blaze/Blaze.h(43), from main.cpp(13): /home/zhewang/Tool/blaze-3.4-opt/include/blaze/math/sparse/ValueIndexPair.h(223): error: no instance of overloaded function "blaze::ValueIndexPair<Type>::operator=" matches the specified type inline constexpr auto ValueIndexPair<Type>::operator=( const Other& rhs ) ^
Do you have any clue? Thanks.
-
Hi Zhen!
Your are correct, Intel states that they support variable templates and many other C++14 features. Unfortunately the implementation of many of these features is too buggy to be of any use. We have experienced so many bugs with variable templates,
constexpr
anddecltype(auto)
(just to name a few) that we have decided that it is not worth anymore to wait until these issues are fixed or to implement workarounds. The two errors you posted, for instance, are clear compiler bugs withconstexpr
and trailing return types. I hope this explanation helps to understand the decision.Best regards,
Klaus!
-
reporter Klaus,
I see. Thanks a lot for your explanation.
-
Since you are using static asserts to check for the compiler in
system/Compiler.h
, could you add an error message? Like "We do not support this compiler any longer/at the moment." -
Hi Jannik!
As you correctly state, "we don't support this compiler at the moment". Our hope, however, is that Intel will eventually catch up and that with a future release it will be possible to compile Blaze as cleanly as with all other compilers. Adding an error message would prevent this, since even in case a new release of the Intel compiler would compile cleanly you would get a compilation error. Thus we will not add any kind of compile time restriction. Still, thanks for the suggestion,
Best regards,
Klaus!
-
For reference: No luck with the 2020 release on macos as well (icpc 19.1.1.216). Just from including <blaze/Math.h>:
/usr/local/include/blaze/math/views/subvector/Dense.h(661): error: expected a ")"
IsSIMDCombinable_v< ElementType, ElementType_t<VT2> > );
-
Hi Christoph!
Thanks for the heads up. We’ll investigate how many problems remain once we get access to this version ourselves. In case only a few problems remain we might be able to provide a couple of workarounds. Thanks again,
Best regards,
Klaus!
-
I just tried with intel 20.0.1 and still no luck. However, if you use -qnextgen it will work but you are compiling with the llvm backend.
Best,
David
-
Hi David!
Thanks for testing this with Intel 20.0.1, that is valuable feedback.
Best regards,
Klaus!
- Log in to comment
Hi Zhen!
Thanks for creating this issue. Since Blaze 3.4 we no longer support the Intel compiler. The major reason is that it still does not provide full support of C++14, in particular variable templates. On the Blaze Bitbucket page you can still read the according announcement:
Hopefully Intel will resolve these issues of the Intel compiler soon, such we can provide support for Intel again.
Best regards,
Klaus!