Don't pass the cpu flags detected by Vc to the compiler
Vc detects CPU flags based on the name of the CPU. This can be a problem in virtualization environment, when the name of the CPU is visible, but not all features are enabled in the guest.
Also, enabling all detected features in the the compiler makes it difficult to impossible for the user to force his own feature flags, e.g. to cross-build generic executables on hosts with many features to be run later on hosts with fewer features.
Closes: docker/ci#9
WIP:
-
properly test, in particular in the light of docker/ci!46 (merged) being applied to the ci images -
ansgar proposed getting rid of all the Vc_COMPILE_FLAGS
, too. Try that: !679 (closed) (redifined !679 (closed) as an add-on to this one, so it does not stop me from merging this one) -
changelog entry (deferred to #163 (closed))
Merge request reports
Activity
mentioned in issue docker/ci#9
Here is a test: build.sh
- Built docker images using the above script on sky (avx512)
- Transfered the images to epic (avx2)
- run them on epic
- the master image fails with sigill or similar
- the avoid-vc-cpu-detection image succeeds
marked the checklist item properly test, in particular in the light of docker/ci!46 (merged) being applied to the ci images as completed
mentioned in merge request !679 (closed)
The downside of this is that now a long-gone warning reappears:
In file included from /ci/src/dune-common/dune/common/simd/simd.hh:11, from /ci/src/dune-common/dune/common/densematrix.hh:20, from /ci/src/dune-common/dune/common/fmatrix.hh:15, from /ci/src/dune-common/dune/common/test/fmatrixtest.cc:19: /ci/src/dune-common/dune/common/simd/interface.hh: In function 'bool Dune::Simd::allTrue(Mask) [with Mask = Vc_1::SimdMaskArray<double, 8, Vc_1::Vector<double, Vc_1::VectorAbi::Sse>, 2>]': /ci/src/dune-common/dune/common/simd/interface.hh:437:10: note: The ABI for passing parameters with 64-byte alignment has changed in GCC 4.6 bool allTrue(Mask mask) ^~~~~~~
Last time I fixed that note by changing the parameters from pass by value to const-ref: !607 (merged)
mentioned in issue #163 (closed)
mentioned in commit 19557065
mentioned in issue #164 (closed)
mentioned in issue #165 (closed)