luntergroup / octopus

Bayesian haplotype-based mutation calling
MIT License
302 stars 38 forks source link

Missing SSE instructions during compilation #74

Closed jbedo closed 5 years ago

jbedo commented 5 years ago

Describe the bug

When compiling latest devel (241cb9ecc0d42e5494528920ed5f701b06fbdb37) with GCC 7.4.0 the build system does not seem to include required SSE flags, e.g.:

In file included from /nix/store/d4n93jn9fdq8fkmkm1q8f32lfagvibjk-gcc-7.4.0/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include/x86intrin.h:43:0,
                 from /build/source/lib/fmath.hpp:47,
                 from /build/source/src/utils/maths.hpp:30,
                 from /build/source/src/core/models/pairhmm/pair_hmm.hpp:26,
                 from /build/source/src/core/models/haplotype_likelihood_model.hpp:26,
                 from /build/source/src/core/models/haplotype_likelihood_model.cpp:4:
/build/source/src/core/models/pairhmm/sse2_pair_hmm_impl.hpp: In function 'octopus::hmm::simd::SSE2PairHMMInstructionSet<256u, int>::do_extract<0>(long long __vector(2) const&, int)auto':
/nix/store/d4n93jn9fdq8fkmkm1q8f32lfagvibjk-gcc-7.4.0/lib/gcc/x86_64-unknown-linux-gnu/7.4.0/include/smmintrin.h:447:1: error: inlining failed in call to always_inline '_mm_extract_epi32(long long __vector(2), int)': target specific option mismatch
 _mm_extract_epi32 (__m128i __X, const int __N)
 ^~~~~~~~~~~~~~~~~
In file included from /build/source/src/core/models/pairhmm/simd_pair_hmm_factory.hpp:10:0,
                 from /build/source/src/core/models/pairhmm/pair_hmm.hpp:27,
                 from /build/source/src/core/models/haplotype_likelihood_model.hpp:26,
                 from /build/source/src/core/models/haplotype_likelihood_model.cpp:4:
/build/source/src/core/models/pairhmm/sse2_pair_hmm_impl.hpp:123:42: note: called from here
         return _mm_extract_epi32(a, index);
                                          ^

Adding -msse4.1 toCXXFLAGS resolved the issue. Building with Clang fails similarly.

Desktop (please complete the following information):

Additional context

0.6.3-beta compiles fine, the issue is only present in the devel branch.

dancooke commented 5 years ago

Thanks for the report. Can you try f4f0c36ab96977840b3b6dde73e965b78e2cbc12?

jbedo commented 5 years ago

Problem resolved.