ECP-WarpX / impactx

ImpactX: an s-based beam dynamics code including space charge effects
https://impactx.readthedocs.io
Other
24 stars 18 forks source link

Support for ImpactX_ablastr_internal=OFF ? #634

Open e-carlin opened 3 weeks ago

e-carlin commented 3 weeks ago

In my environment I am trying to install both warpx and impactx. Both of them depend on ablastr which is built as part of each codes build process. This causes conflicts on install because both impactx and warpx try to install ${CMAKE_INSTALL_PREFIX}/lib/libablastr*.

It looks like impactx has the start of support for setting ImpactX_ablastr_internal=OFF but it currently errors out. If I could set this flag then I think I could have impactx use the ablastr library installed by warpx.

Would it be possible to make this flag work? If someone can give some direction on what is needed I'm happy to open a PR.

Thanks!

ax3l commented 2 weeks ago

Hi @e-carlin,

Yes, that is a good point and on the todo list. For this, we first need to finalize the WarpXConfig.cmake* script, which is still in draft state: https://github.com/ECP-WarpX/WarpX/blob/development/WarpXConfig.cmake.

Ideally, inside WarpX, we will add two CMake options WarpX_INSTALL and ABLASTR_INSTALL (the 2nd is required if the former is set) to select the install logic. Then we need to add support to find an external ABLASTR in both WarpX and ImpactX (easy).

ax3l commented 2 weeks ago

Tracking in https://github.com/ECP-WarpX/WarpX/issues/5002

e-carlin commented 2 weeks ago

Thanks @ax3l! Let me know when there is a pr and I can test.

ax3l commented 2 weeks ago

Draft started in https://github.com/ECP-WarpX/WarpX/pull/5008 . Not yet ready for testing.