← Back to team overview

yade-dev team mailing list archive

EIGEN_NO_ALIGN

 

Hi Anton,

you mentioned that you did some experimentation with vectorized (aligned) Eigen builds. I am interested to hear what you observed.

I tried that some time ago and my findings are the following:

1. supporting aligned types with boost::python (in minieigen) is hard or impossible, see http://lists.boost.org/boost-users/2008/04/35638.php , http://stackoverflow.com/questions/17364949/make-boostpython-respect-data-alignment , http://stackoverflow.com/questions/13177573/how-to-expose-aligned-class-with-boost-python . But actually there seems to be no definitive statement that it is "not supported" and perhaps boost::python does the right thing automatically and problems come from elsewhere. I contacted the authors of boost::python directly to clarify that, there was no reaction.

2. All libraries MUST be compiled with EIGEN_NO_ALIGN or without it, mixing those will lead to crashes (packet instruction on unaligned address, leads to SIGFPU or SIGSEGV or SIGILL - don't remember anymore)

3. Vectorization is only meaningful when compiling for targets supporting packet instructions from the SSE2 set (IIRC) and higher. Compiling with -march=i686 (which is what debian packages do by default) will probably produce functioning builds, but they will effectively have no vectorization. For that, -march=native (or something higher than i686 in general) is needed.

Cheers,

Václav



Follow ups