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

CMake: WarpX_PSATD -> WarpX_FFT #4912

Merged
merged 5 commits into from
May 30, 2024
Merged

CMake: WarpX_PSATD -> WarpX_FFT #4912

merged 5 commits into from
May 30, 2024

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented May 3, 2024

Rename WarpX_PSATD to WarpX_FFT in the build configuration options. We now use FFTs for more than the PSATD solver since the introduction of the IGF solver for electrostatic simulations.

@ax3l ax3l added component: spectral Spectral solvers (PSATD) install labels May 3, 2024
@dpgrote
Copy link
Member

dpgrote commented May 4, 2024

Rather than breaking the build interface, could a new flag WARPX_FFT be added that turns on the FFT code, and have it turned on when WARPX_PSATD is turned on? This would also avoid including all of the PSATD stuff when a user wants the IGF electrostatic solver.

@ax3l
Copy link
Member Author

ax3l commented May 9, 2024

Hi Dave,

We (cc @RemiLehe , @aeriforme) thought initially to delay the break by making WarpX_PSATD an alias. But in the end it just complicates the build logic instead of a clean update.

For your idea to have PSATD control separately, I would be inclined to not add this. The reason is as follows: we do not really want to separately control if PSATD is compiled or not - we want it available all the time ideally. The primary reason we had the old flag, and name it now FFT, is that we want to be able to build versions of WarpX with limited/simplified dependencies.

As a follow-up PR, I would also try to default-enable WarpX_FFT (as in openPMD and ADIOS2 build flags that are AUTO by default), because it is (nearly/practically) dependency free for GPU builds (besides RZ).

We will also as a follow-up add a flag for WarpX_heFFTe for multi-GPU FFTs, probably also as AUTO/ON/OFF.

@ax3l ax3l mentioned this pull request May 9, 2024
9 tasks
@dpgrote
Copy link
Member

dpgrote commented May 9, 2024

This is all good. I'm just trying to avoid API breaking changes. Also, note that with my suggestion, this PR would be substantially smaller since none of the hpc scripts, none of the yml files, and none of the spectral solver code would need to be changed. Also, keeping PSATD separate from FFT would make it easier to later remove the PSATD flag since it doesn't directly depend on a third party package (but only via FFT).

@ax3l
Copy link
Member Author

ax3l commented May 12, 2024

I'm just trying to avoid API breaking changes.

Understood. Yes, that was my initial inclination as well (my suggestion: keep an alias around for a few releases) before I spoke with @RemiLehe and @aeriforme .

Also, note that with my suggestion, this PR would be substantially smaller since none of the hpc scripts, none of the yml files, and none of the spectral solver code would need to be changed.

Changes that are not user-facing are no problem per se, but HPC scripts and docs are user-facing here.

For CI and other non-user-facing scripts, I can put them in smaller commits for the PR to review easier.

keeping PSATD separate from FFT would make it easier to later remove the PSATD flag since it doesn't directly depend on a third party package (but only via FFT).

I think the argument that @RemiLehe made was if we do continue to advertise the PSATD flag, then people will just have the same breakaging change later.

Shall we chat more in the weekly developer meeting which transition path we prefer?

@ax3l ax3l added the changes input scripts / defaults Changes the syntax or meaning of input scripts and/or defaults label May 12, 2024
@ax3l
Copy link
Member Author

ax3l commented May 14, 2024

Discussed today:
Will add a (now undocumented) PSATD control flag for a few months so that users do not need to change their build logic immediately. (Warn if used.)

ax3l added 4 commits May 20, 2024 14:40
Rename `WarpX_PSATD` to `WarpX_FFT` in the build configuration
options. We now use FFTs for more than the PSATD solver since
the introduction of the IGF solver for electrostatic
simulations.
We keep the flag `WarpX_PSATD` as an alias around for a few
releases before we drop it.
@ax3l
Copy link
Member Author

ax3l commented May 20, 2024

@dpgrote @RemiLehe @aeriforme this is ready now as we discussed :)
image
(ON/OFF both work. The old option takes precedence if both are passed, because that is easier to check in CMake.)

We keep the flag WarpX_PSATD as an alias around for a few releases before we drop it.
But we do not document it anymore, so new people do not pick it up. And we raise a warning, so people transition.

@ax3l ax3l removed the changes input scripts / defaults Changes the syntax or meaning of input scripts and/or defaults label May 20, 2024
@RemiLehe RemiLehe self-assigned this May 20, 2024
Copy link
Member

@dpgrote dpgrote left a comment

Choose a reason for hiding this comment

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

I can approve.

@ax3l ax3l enabled auto-merge (squash) May 30, 2024 00:19
@ax3l ax3l disabled auto-merge May 30, 2024 02:55
@ax3l ax3l enabled auto-merge (squash) May 30, 2024 03:39
@ax3l ax3l merged commit b954937 into ECP-WarpX:development May 30, 2024
45 checks passed
Haavaan pushed a commit to Haavaan/WarpX that referenced this pull request Jun 5, 2024
* CMake: `WarpX_PSATD` -> `WarpX_FFT`

Rename `WarpX_PSATD` to `WarpX_FFT` in the build configuration
options. We now use FFTs for more than the PSATD solver since
the introduction of the IGF solver for electrostatic
simulations.

* Change Define: `WARPX_USE_PSATD`

* GNUMake: `USE_PSATD` -> `USE_FFT`

* Temporary backwards compatibility

We keep the flag `WarpX_PSATD` as an alias around for a few
releases before we drop it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: spectral Spectral solvers (PSATD) install
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants