Continuous integration with Travis-CI

Issue #428 new
Nils Deppe created an issue

Hi Klaus!

I hope you’re doing well! I was wondering if you’d be open to the idea of having continuous integration to run tests with Travis-CI? I can’t promise how quickly I can get this set up, but it would probably help catch some bugs on different hardware early on. We’ve had good experience so far using Intel’s SDE to emulate running on different hardware targets to catch bugs and errors. It should also be possible to test all the support compilers in the different environments. The proposal I have is:

step 1: add Travis-CI support on a single GCC and Clang compiler (basically get core features in)

Step 2: add SDE support to test emulated CPUs from Intel spanning ~10 years

Step 3: extend to all supported GCC and Clang compilers

Step 4: see if there’s a way to test the Intel compiler (probably less relevant with Intel’s OneAPI switch)

Best,

Nils

Comments (3)

  1. Klaus Iglberger

    Hi Nils!

    Thanks for the proposal. I’m certain that for you this would add a lot of value, but I’m uncertain how valuable this would be for Blaze in general. It also depends on how many things need to be changed. Please feel free to create a pull request to demonstrate how the integration would work.

    Best regards,

    Klaus!

  2. Nils Deppe reporter

    Hi Klaus!

    Yep, sounds reasonable. I’m hopeful that basically nothing needs to change inside Blaze, and then only a couple hundred lines of Travis-CI/Bash config code needs to be added. I’ll look into this when I have some time and see how minimal of a change can be made to add this!

    Best,

    Nils

  3. Nils Deppe reporter

    Hi Klaus,

    While testing my XSIMD changes I noticed I can’t compile the tests with -march=sandybridge because:

    g++ -DBLAZE_USE_XSIMD -march=sandybridge -isystem /home/nils/SpECTRE/blaze/blazetest -isystem /home/nils/SpECTRE/blaze   -c -o Char.o Char.cpp
    In file included from /home/nils/SpECTRE/blaze/blaze/math/simd/Functions.h:85,
                     from /home/nils/SpECTRE/blaze/blaze/math/SIMD.h:45,
                     from /home/nils/SpECTRE/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:89,
                     from Char.cpp:42:
    /home/nils/SpECTRE/blaze/blaze/math/simd/Setall.h: In instantiation of ‘blaze::If_t<IsSigned_v<T>, blaze::SIMDint8, blaze::SIMDuint8> blaze::setall_epi8(T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T
    , T, T, T) [with T = char; blaze::If_t<IsSigned_v<T>, blaze::SIMDint8, blaze::SIMDuint8> = blaze::SIMDint8]’:
    /home/nils/SpECTRE/blaze/blaze/math/simd/Setall.h:157:22:   required from ‘blaze::EnableIf_t<(IsIntegral_v<T> && HasSize_v<T, 1>), typename blaze::If<IsSigned_v<T> >::Type<blaze::SIMDint8, blaze::SIMDuint8> > blaze::setall(T, Ts ...) [wit
    h T = char; Ts = {}; blaze::EnableIf_t<(IsIntegral_v<T> && HasSize_v<T, 1>), typename blaze::If<IsSigned_v<T> >::Type<blaze::SIMDint8, blaze::SIMDuint8> > = blaze::SIMDint8; typename blaze::If<IsSigned_v<T> >::Type<blaze::SIMDint8, blaze:
    :SIMDuint8> = blaze::SIMDint8]’
    /home/nils/SpECTRE/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:673:27:   required from ‘void blazetest::mathtest::simd::OperationTest<T>::testSetall() [with T = char]’
    /home/nils/SpECTRE/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:411:4:   required from ‘blazetest::mathtest::simd::OperationTest<T>::OperationTest() [with T = char]’
    /home/nils/SpECTRE/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:3876:4:   required from ‘void blazetest::mathtest::simd::runTest() [with T = char]’
    Char.cpp:58:7:   required from here
    /home/nils/SpECTRE/blaze/blaze/math/simd/Setall.h:103:10: error: no matching function for call to ‘blaze::SIMDint8::SIMDint8(__m256i)’
      103 |   return If_t<IsSigned_v<T>, SIMDint8, SIMDuint8>(
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      104 |       _mm256_set_epi8(v31, v30, v29, v28, v27, v26, v25, v24, v23, v22, v21,
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      105 |                       v20, v19, v18, v17, v16, v15, v14, v13, v12, v11, v10, v9,
          |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      106 |                       v8, v7, v6, v5, v4, v3, v2, v1, v0));
          |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /home/nils/SpECTRE/blaze/blaze/math/SIMD.h:43,
                     from /home/nils/SpECTRE/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:89,
                     from Char.cpp:42:
    /home/nils/SpECTRE/blaze/blaze/math/simd/BasicTypes.h:115:24: note: candidate: ‘template<class T> blaze::SIMDint8::SIMDint8(const blaze::SIMDi8<T>&)’
      115 |    BLAZE_ALWAYS_INLINE SIMDint8( const SIMDi8<T>& v ) noexcept : value( (*v).value ) {}
          |                        ^~~~~~~~
    /home/nils/SpECTRE/blaze/blaze/math/simd/BasicTypes.h:115:24: note:   template argument deduction/substitution failed:
    In file included from /home/nils/SpECTRE/blaze/blaze/math/simd/Functions.h:85,
                     from /home/nils/SpECTRE/blaze/blaze/math/SIMD.h:45,
                     from /home/nils/SpECTRE/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:89,
                     from Char.cpp:42:
    /home/nils/SpECTRE/blaze/blaze/math/simd/Setall.h:103:10: note:   mismatched types ‘const blaze::SIMDi8<T>’ and ‘__m256i’
      103 |   return If_t<IsSigned_v<T>, SIMDint8, SIMDuint8>(
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      104 |       _mm256_set_epi8(v31, v30, v29, v28, v27, v26, v25, v24, v23, v22, v21,
          |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      105 |                       v20, v19, v18, v17, v16, v15, v14, v13, v12, v11, v10, v9,
          |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      106 |                       v8, v7, v6, v5, v4, v3, v2, v1, v0));
          |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /home/nils/SpECTRE/blaze/blaze/math/SIMD.h:43,
                     from /home/nils/SpECTRE/blaze/blazetest/blazetest/mathtest/simd/OperationTest.h:89,
                     from Char.cpp:42:
    /home/nils/SpECTRE/blaze/blaze/math/simd/BasicTypes.h:112:24: note: candidate: ‘blaze::SIMDint8::SIMDint8(blaze::SIMDint8::IntrinsicType)’
      112 |    BLAZE_ALWAYS_INLINE SIMDint8( IntrinsicType v ) noexcept : value( v ) {}
          |                        ^~~~~~~~
    /home/nils/SpECTRE/blaze/blaze/math/simd/BasicTypes.h:112:48: note:   no known conversion for argument 1 from ‘__m256i’ to ‘blaze::SIMDint8::IntrinsicType’
      112 |    BLAZE_ALWAYS_INLINE SIMDint8( IntrinsicType v ) noexcept : value( v ) {}
          |                                  ~~~~~~~~~~~~~~^
    

    This is the sort of issue I was hoping could be caught with my original suggestion of testing on {compiler X target_architecture} for a large set of them.

    I’ll see if I can fix the issue and submit a PR.

    Best,

    Nils

  4. Log in to comment