From: Martin Kronbichler Date: Tue, 25 Apr 2017 17:24:48 +0000 (+0200) Subject: Add an error message regarding vectorization instruction set mismatch X-Git-Tag: v9.0.0-rc1~1651^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a218074a2ce6921f616720cd54fd8130b9534737;p=dealii.git Add an error message regarding vectorization instruction set mismatch --- diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 5983ec7546..96e2d941d5 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -39,6 +39,16 @@ // 'check_01_cpu_features.cmake', ensures that these feature are not only // present in the compilation unit but also working properly. +#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && not defined(__SSE2__) +#error "Mismatch in vectorization capabilities: SSE2 was detected during configuration of deal.II and switched on, but it is apparently not available for the file you are trying to compile at the moment. Check compilation flags controlling the instruction set, such as -march=native." +#endif +#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && not defined(__AVX__) +#error "Mismatch in vectorization capabilities: AVX was detected during configuration of deal.II and switched on, but it is apparently not available for the file you are trying to compile at the moment. Check compilation flags controlling the instruction set, such as -march=native." +#endif +#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && not defined(__AVX512F__) +#error "Mismatch in vectorization capabilities: AVX-512F was detected during configuration of deal.II and switched on, but it is apparently not available for the file you are trying to compile at the moment. Check compilation flags controlling the instruction set, such as -march=native." +#endif + #if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 // AVX, AVX-512 #include #elif DEAL_II_COMPILER_VECTORIZATION_LEVEL == 1 // SSE2