]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an error message regarding vectorization instruction set mismatch 4311/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 25 Apr 2017 17:24:48 +0000 (19:24 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 26 Apr 2017 07:18:32 +0000 (09:18 +0200)
include/deal.II/base/vectorization.h

index 5983ec75466c1eccb5544625e4b5a1748e3c2520..96e2d941d53258f8781b098081245f38a06f4f06 100644 (file)
 // '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 <immintrin.h>
 #elif DEAL_II_COMPILER_VECTORIZATION_LEVEL == 1 // SSE2

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.