On 2021-02-13 23:51, Bernhard Übelacker wrote:

This flag is already in use, see https://salsa.debian.org/science-team/gmsh/-/
blob/master/debian/rules#L34



Hello everyone,
the ENABLE_SYSTEM_CONTRIB=1 seems not to be sufficient.

The build log shows this line:
    -- Found Eigen
With this include given to c++:
    -I/home/benutzer/source/libgmsh4/try2/gmsh-4.7.1+ds1/contrib/eigen

But in CMakeLists.txt we find these lines:
        if(ENABLE_SYSTEM_CONTRIB)
            find_path(EIGEN_INC "Eigen/Dense" HINTS eigen3)
...
Therefore it seems if it is not found in the system
and therefore it falls back to contrib.


Adding following to debian/rules:
    -DEIGEN_INC:STRING="/usr/include/eigen3"

Would show this with an attempt to dpkg-buildpackage:
    -- Found Eigen[system]
With this include given to c++:
    -I/usr/include/eigen3


Thanks for this analysis, Bernard. That will help gsmh use eigen consistent.



If its not desired to give the path directly maybe somehow retrieved by:
$ pkg-config --cflags eigen3
-I/usr/include/eigen3

Sensible to use pkg-config.
In fact we'd want to be more specific: `pkg-config --cflags-only-I eigen3`



But I built a package with that change, but the error remained.

So I rebuilt also dolfinx and saw that it gives to c++ this parameter:
    "-DEIGEN_MAX_ALIGN_BYTES=32"
This define might change EIGEN_DEFAULT_ALIGN_BYTES,
and this controls how allocation is done inside
aligned_malloc/aligned_free.

Shouldn't either both have to override the default here
or both stay to the default?


A good question. I'm not certain what we need to do here, but I draw attention to the dolfinx comments in dolfinx/cpp/dolfinx/CMakeLists.txt:

# Note: The name EIGEN_MAX_ALIGN_BYTES is confusing. In practice, Eigen
# computes the ideal alignment based around -march. If the ideal alignment is # greater than EIGEN_MAX_ALIGN_BYTES, the ideal alignment is used. If the ideal
# alignment is less, then EIGEN_MAX_ALIGN_BYTES is used for alignment.

This suggests that dolfinx expects eigen to use a larger alignment than 32 if the system's eigen supports it (so it is supposed to be safe to build dolfinx with the smaller value).

The dolfinx comments go on to say you might want to set 64 for user-compilation on AVX-512 systems. Would that AVX comment apply to your specific system?

Drew

--
debian-science-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to