Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Propagate use of XTENSOR_USE_XSIMD and simplify xtensor configuration #2346

Merged
merged 3 commits into from
Sep 6, 2022

Conversation

drew-parsons
Copy link
Contributor

@drew-parsons drew-parsons commented Sep 5, 2022

This patch propagates the use of XTENSOR_USE_XSIMD into installed dolfinx configuration files (DOLFINXTargets.cmake and dolfinx.pc) to facilitate a consistent xtensor (xsimd) configuration.

If a dolfinx build is configured with XTENSOR_USE_XSIMD to enable xtensor to take advantage of XSIMD acceleration, then xsimd gets written into the symbol table for libdolfinx.so (in mesh::locate_entities and mesh::locate_entities_boundary)

Then at run time XTENSOR_USE_XSIMD would need to be added manually to the cmake or CXXFLAGS configuration, otherwise the signature for locate_entities will be discrepant, causing build errors, e.g. undefined reference to dolfinx::mesh::locate_entities_boundary. This patch automatically keeps the xtensor/xsimd configuration consistent.

The xtl and xsimd packages are related to xtensor support. They are no longer used directly by dolfinx. xtensor finds them itself (xtensor always finds xtl, and finds xsimd if XTENSOR_USE_XSIMD is set). Hence dolfinx cmake config files do not need to find xtl or xsimd. Only xtensor is needed.

Fixes #2326.

If a dolfinx build is configured with XTENSOR_USE_XSIMD to enable
xtensor to take advantage of XSIMD acceleration, then xsimd gets
written into the symbol table for libdolfinx.so (in
mesh::locate_entities and mesh::locate_entities_boundary)

Then at run time XTENSOR_USE_XSIMD would need to be added manually to
camke or CXXFLAGS configuration, otherwise the signature for
locate_entities will be discrepant, causing build errors, e.g.
  undefined reference to `dolfinx::mesh::locate_entities_boundary`

This patch propagates the use of XTENSOR_USE_XSIMD into installed
dolfinx configuratin files (DOLFINXTargets.cmake and dolfinx.pc) to
facilitate a consistent xtensor (xsimd) configuration.
The xtl and xsimd packages are related to xtensor support.  They are
no longer used directly by dolfinx.  xtensor finds them itself (it always
finds xtl, and finds xsimd if XTENSOR_USE_XSIMD is set).  Hence
dolfinx cmake config files do not need find them. Only xtensor is
needed.
@garth-wells garth-wells changed the title propagate use of XTENSOR_USE_XSIMD and simplify xtensor configuration Propagate use of XTENSOR_USE_XSIMD and simplify xtensor configuration Sep 5, 2022
@garth-wells garth-wells added bug Something isn't working build Build system and compiler issues labels Sep 5, 2022
@jhale jhale merged commit 3325282 into FEniCS:main Sep 6, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working build Build system and compiler issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.5.0 XSIMD support: C++ demo_poisson fails undefined reference to dolfinx::mesh::locate_entities_boundary
3 participants