Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update AMReX and pyAMReX dependencies. #760

Closed
wants to merge 11 commits into from

Conversation

cemitch99
Copy link
Member

Update AMReX, ABLASTR, pyAMReX dependencies to the latest development, to use updated WarpX IGF solver exploiting new AMReX FFT: ECP-WarpX/WarpX#5457

@cemitch99 cemitch99 requested a review from RemiLehe November 21, 2024 01:37
@cemitch99
Copy link
Member Author

cemitch99 commented Nov 21, 2024

I seem to recall that we previously had problems on Windows with FFTW libraries related to the 1D FFT that Alex was using for the CSR solve, which were avoided when Alex switched from using FFTW to anyfft.
(https://github.com/ECP-WarpX/impactx/blob/development/src/particles/wakefields/WakeConvolution.cpp)
Not sure if this is directly relevant here.

#else()
# set(AMReX_FFT OFF CACHE INTERNAL "")
#endif()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a commented duplicate of 40-44, because I wasn't sure of the best place to put this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add this control to #790, thanks!

@cemitch99 cemitch99 mentioned this pull request Dec 12, 2024
@ax3l
Copy link
Member

ax3l commented Jan 3, 2025

I will address the Windows build issue by porting our ImpactX/WarpX/HiPACE++ FFTW CMake find script to AMReX:
AMReX-Codes/amrex#4282

@ax3l ax3l self-requested a review January 6, 2025 06:28
@ax3l
Copy link
Member

ax3l commented Jan 6, 2025

@WeiqunZhang @atmyers we need to update this to finalize #743 but there are three AMReX issues blocking it:

WeiqunZhang pushed a commit to AMReX-Codes/amrex that referenced this pull request Jan 8, 2025
## Summary

This improves the FFTW CMake find logic based on the scripts that I
developed for HiPACE++/WarpX/ImpactX to find FFTW on various platforms.

It helps to find FFTW on Windows, where it is installed by default with
CMake, and it uses more details from PkgConfig files on Linux/macOS,
such as forwarding defines, using OpenMP acceleration if available.

It also chooses sensible defaults to work around known FFTW build system
bugs, linked inline. There are also options added to control the
defaults, e.g., in package managers that use a different default (e.g.,
CMake FFTW install on Linux/macOS).

## Additional background

See build issues in
ECP-WarpX/impactx#760 (comment)

On Windows, try searching for `FFTW3(f)Config.cmake` files first,
because:
- Installed `.pc` files wrongly and unconditionally add `-lm`
- FFTW/fftw3#236

On Linux & macOS, the Autotools install tries to emulate a CMake config
file, but has a bug:
- FFTW/fftw3#235
- Thus, by default rely on `.pc` files because we cannot know which
install was choosen (otherwise, there is an option for it named
`AMReX_FFTW_SEARCH`).

## Checklist

The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [x] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate
@ax3l
Copy link
Member

ax3l commented Jan 9, 2025

Will update in 25.01 release PR #790 and following PRs.

@ax3l ax3l closed this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants