Compiling with march=native results in crashes due to alignment
Issue #414
closed
Compiling with march=native
or -mavx2
etc. causes alignment-related crashes in several tests. Many routines in Eigen now make use of vectorization with these flags enabled, so we should consider adding them to Release
mode once the errors are fixed. (For example, I observed an almost 2x speedup in Cholesky for large matrices.)
To reproduce in Debug
mode, C++ compilation flags: -std=c++11 -Wall -g -fno-inline -DEIGEN_INITIALIZE_MATRICES_BY_NAN -march=native -O1
Mac:
97% tests passed, 6 tests failed out of 232
Total Test time (real) = 126.90 sec
The following tests FAILED:
105 - testBearingRangeFactor (Child aborted)
149 - testGaussianISAM2 (Child aborted)
157 - testMarginals (Child aborted)
161 - testNonlinearISAM (Child aborted)
205 - testNonlinearClusterTree (Child aborted)
227 - testTOAFactor (Child aborted)
Ubuntu 16.04 with gcc 5.4:
41 - testUnit3 (OTHER_FAULT)
102 - testAdaptAutoDiff (SEGFAULT)
105 - testRangeFactor (OTHER_FAULT)
106 - testBearingRangeFactor (OTHER_FAULT)
119 - testSlamExpressions (OTHER_FAULT)
145 - testGaussianISAM2 (OTHER_FAULT)
149 - testExpressionFactor (OTHER_FAULT)
170 - testNonlinearISAM (OTHER_FAULT)
172 - testMarginals (OTHER_FAULT)
202 - testNonlinearClusterTree (OTHER_FAULT)
I identified two issues:
- Alignment error in
boost::bind
innumericalDerivative
(easy fix, I'll make a PR) - Alignment error in
ExecutionTrace
for expressions. This one is less obvious - might need help.
Comments (4)
-
reporter -
fixed?
-
reporter Only the failure in
testPose2
remains. Have not had a chance to look at it. -
- changed status to closed
Merged in fix/testPose2-clang-avx2 (pull request #374) Close Issue
#414Fix testPose2 with clang + avx2→ <<cset 3389bb29446a>>
- Log in to comment
Another failure on Mac that I didn't see before. Just making a note so I don't forget about it. Think it's unrelated to the two other issues. Mac, Release with
-O3
and 'march=native`Edit: Can't reproduce this one on Ubuntu 16.04