Failure to build the tests

Issue #458 open
Dimitrij Mijoski created an issue

The tests fail to build in master, v3.8.2 and v3.8.1. v3.8 is not affected.

Environment: Ubuntu 22.04 with its default compiler GCC 11. The bug appears with Clang, too.

Steps to reproduce (shell commands):

cd blazetest
vim Configfile
# set CXX=g++, everything else default
./configure
make

I get the following output:

Building the mathematical shims operation tests...
g++ -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o IncludeTest.o IncludeTest.cpp
g++ -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o OperationTest.o OperationTest.cpp

Building the SIMD operation tests...
g++ -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o Char.o Char.cpp
g++ -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o ComplexChar.o ComplexChar.cpp
g++ -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o ComplexDouble.o ComplexDouble.cpp
g++ -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o ComplexFloat.o ComplexFloat.cpp
g++ -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o ComplexInt.o ComplexInt.cpp
g++ -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o ComplexLong.o ComplexLong.cpp
In file included from /home/user/source/blaze/blaze/math/simd/Functions.h:61,
                 from /home/user/source/blaze/blaze/math/SIMD.h:45,
                 from /home/user/source/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:89,
                 from ComplexLong.cpp:43:
/home/user/source/blaze/blaze/math/simd/Equal.h: In instantiation of bool blaze::operator==(const blaze::SIMDci64<T>&, const blaze::SIMDci64<T>&) [with T = blaze::SIMDcint64]:
/home/user/source/blaze/blaze/math/shims/IsDefault.h:104:13:   required from bool blaze::isDefault(const Type&) [with blaze::RelaxationFlag RF = blaze::relaxed; Type = blaze::SIMDcint64; blaze::EnableIf_t<(IsScalar_v<Type> || IsSIMDPack_v<Type>)>* <anonymous> = 0]
/home/user/source/blaze/blaze/math/shims/IsDefault.h:243:29:   required from bool blaze::isDefault(const Type&) [with Type = blaze::SIMDcint64]
/home/user/source/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:770:18:   required from void blazetest::mathtest::simd::OperationTest<T>::testIsDefault() [with T = std::complex<long int>]
/home/user/source/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:414:4:   required from blazetest::mathtest::simd::OperationTest<T>::OperationTest() [with T = std::complex<long int>]
/home/user/source/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:3876:4:   required from void blazetest::mathtest::simd::runTest() [with T = std::complex<long int>]
ComplexLong.cpp:59:7:   required from here
/home/user/source/blaze/blaze/math/simd/Equal.h:486:24: error: use of deleted function bool blaze::equal(const blaze::SIMDci64<T>&, const blaze::SIMDci64<T>&) [with blaze::RelaxationFlag RF = blaze::strict; T = blaze::SIMDcint64]
  486 |    return equal<strict>( *a, *b );
      |           ~~~~~~~~~~~~~^~~~~~~~~~
/home/user/source/blaze/blaze/math/simd/Equal.h:435:26: note: declared here
  435 | BLAZE_ALWAYS_INLINE bool equal( const SIMDci64<T>& a, const SIMDci64<T>& b ) noexcept
      |                          ^~~~~
make[2]: *** [<builtin>: ComplexLong.o] Error 1
make[1]: *** [Makefile:55: simd] Error 2
make: *** [Makefile:48: mathtest] Error 2

I traced the bug with git bisect and found that it was introduced in the following commit https://bitbucket.org/blaze-lib/blaze/commits/13ad502b34e0e4caf8de4d55d1b0cb0fc80c960c . The parent commit and the few commits before that one might or might not be related. After some analysis I suspect the test itself in the file blazetest/mathtest/simd/OperationTest.h is problematic and maybe it should check if the operation that is tested (isDefault) is available on the SIMD type, similarly like it does for the various binary operations. Right now the test unconditionally tries to test the operation isDefault.

Let’s enable some more advanced SIMD instructions.

Steps to reproduce (shell commands):

cd blazetest
vim Configfile
# set CXX=g++, CXXFLAGS=-march=tigerlake
./configure
make clean
make

Now the output is:

Building the mathematical shims operation tests...
g++ -march=tigerlake -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o IncludeTest.o IncludeTest.cpp
g++ -march=tigerlake -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o OperationTest.o OperationTest.cpp

Building the SIMD operation tests...
g++ -march=tigerlake -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o Char.o Char.cpp
g++ -march=tigerlake -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o ComplexChar.o ComplexChar.cpp
g++ -march=tigerlake -isystem /home/user/source/blaze/blazetest -isystem /home/user/source/blaze   -c -o ComplexDouble.o ComplexDouble.cpp
In file included from /home/user/source/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:72,
                 from ComplexDouble.cpp:43:
/home/user/source/blaze/blaze/math/shims/IsDefault.h: In instantiation of bool blaze::isDefault(const Type&) [with blaze::RelaxationFlag RF = blaze::relaxed; Type = blaze::SIMDcdouble; blaze::EnableIf_t<(IsScalar_v<Type> || IsSIMDPack_v<Type>)>* <anonymous> = 0]:
/home/user/source/blaze/blaze/math/shims/IsDefault.h:243:29:   required from bool blaze::isDefault(const Type&) [with Type = blaze::SIMDcdouble]
/home/user/source/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:770:18:   required from void blazetest::mathtest::simd::OperationTest<T>::testIsDefault() [with T = std::complex<double>]
/home/user/source/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:414:4:   required from blazetest::mathtest::simd::OperationTest<T>::OperationTest() [with T = std::complex<double>]
/home/user/source/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:3876:4:   required from void blazetest::mathtest::simd::runTest() [with T = std::complex<double>]
ComplexDouble.cpp:59:7:   required from here
/home/user/source/blaze/blaze/math/shims/IsDefault.h:104:13: error: use of deleted function bool blaze::operator==(const blaze::SIMDcdouble&, const blaze::SIMDcdouble&)
  104 |    return v == Type();
      |           ~~^~~~~~~~~
In file included from /home/user/source/blaze/blaze/math/simd/Functions.h:61,
                 from /home/user/source/blaze/blaze/math/SIMD.h:45,
                 from /home/user/source/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:89,
                 from ComplexDouble.cpp:43:
/home/user/source/blaze/blaze/math/simd/Equal.h:888:26: note: declared here
  888 | BLAZE_ALWAYS_INLINE bool operator==( const SIMDcdouble& a, const SIMDcdouble& b ) noexcept
      |                          ^~~~~~~~
make[2]: *** [<builtin>: ComplexDouble.o] Error 1
make[1]: *** [Makefile:55: simd] Error 2
make: *** [Makefile:48: mathtest] Error 2

Now, different test (ComplexDouble.cpp) is problematic but the same header file is involved (blazetest/mathtest/simd/OperationTest.h).

Comments (8)

  1. Klaus Iglberger

    Hi Dimitrij!

    Thanks for pointing this out. We’ll fix the build as quickly as possible.

    Best regards,

    Klaus!

  2. Klaus Iglberger

    Commits b738eab and d060359 fix the compilation and execution of the tests. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.9.

  3. Dimitrij Mijoski reporter

    Thank you for fixing the issue with IsResizable. But there are still compilation errors with some tests. Now, exactly 44 tests fail to compile, and the failure described in this issue still exists, so I will reopen this.

  4. Dimitrij Mijoski reporter

    Here is another error that repeats in multiple tests. I will show it with only one, the test is mathtest/operations/dmatdmatmax/MDbLDa.cpp.

    In file included from /home/user/source/blaze/blaze/math/adaptors/diagonalmatrix/DiagonalProxy.h:54,
                     from /home/user/source/blaze/blaze/math/adaptors/diagonalmatrix/Dense.h:46,
                     from /home/user/source/blaze/blaze/math/adaptors/DiagonalMatrix.h:45,
                     from /home/user/source/blaze/blaze/math/DenseMatrix.h:43,
                     from /home/user/source/blaze/blaze/math/DynamicMatrix.h:45,
                     from /home/user/source/blaze/blazetest/src/mathtest/operations/dmatdmatmax/MDbLDa.cpp:42:
    /home/user/source/blaze/blaze/math/proxy/Proxy.h: In instantiation of ‘bool blaze::operator<(const T&, const blaze::Proxy<PT, RT>&) [with T = double; PT = blaze::LowerProxy<blaze::DynamicMatrix<int> >; RT = int; <template-parameter-1-4> = void]’:
    /home/user/source/blaze/blaze/util/algorithms/Max.h:84:34:   required from ‘constexpr decltype(auto) blaze::max(T1&&, T2&&) [with T1 = double&; T2 = blaze::LowerProxy<blaze::DynamicMatrix<int> >; R1 = double; R2 = blaze::LowerProxy<blaze::DynamicMatrix<int> >; blaze::EnableIf_t<((HasLessThan_v<R1, R2> && (!(IsSigned_v<R1> && IsUnsigned_v<R2>))) && (!(IsUnsigned_v<R1> && IsSigned_v<R2>)))>* <anonymous> = 0]’
    /home/user/source/blaze/blazetest/./blazetest/mathtest/operations/dmatdmatmax/OperationTest.h:409:25:   required from ‘blazetest::mathtest::operations::dmatdmatmax::OperationTest<MT1, MT2>::OperationTest(const blazetest::Creator<T>&, const blazetest::Creator<MT2>&) [with MT1 = blaze::DynamicMatrix<double>; MT2 = blaze::LowerMatrix<blaze::DynamicMatrix<int> >]’
    /home/user/source/blaze/blazetest/./blazetest/mathtest/operations/dmatdmatmax/OperationTest.h:13156:10:   required from ‘void blazetest::mathtest::operations::dmatdmatmax::runTest(const blazetest::Creator<T>&, const blazetest::Creator<MT2>&) [with MT1 = blaze::DynamicMatrix<double>; MT2 = blaze::LowerMatrix<blaze::DynamicMatrix<int> >]’
    /home/user/source/blaze/blazetest/src/mathtest/operations/dmatdmatmax/MDbLDa.cpp:79:10:   required from here
    /home/user/source/blaze/blaze/math/proxy/Proxy.h:700:23: error: ‘const class blaze::Proxy<blaze::LowerProxy<blaze::DynamicMatrix<int> >, int>’ has no member named ‘get’
      700 |    return ( lhs < rhs.get() );
          |                   ~~~~^~~
    

  5. Dimitrij Mijoski reporter

    Fixing this last bug is easy, just properly use the downcast operator in the mentioned line like this:

    return ( lhs < (*rhs).get() );
    

  6. Log in to comment