Open PhilMiller opened 3 years ago
Easily worked around for us, since QED=ON is the default, but we don't need it, so we can just turn it off.
Ah, mixing precision for fields and particles is not yet supported/tested, but we are working on it: (here: DP particles, SP fields #2017).
This definitely needs a few interface updates and/or extra casts. cc-ing @lucafedeli88 and @NeilZaim on it, I think that's likely a quick fix :)
The general "all SP" mode (-DWarpX_PRECISION=SINGLE
) should work, though. Are you aware of that option? It wraps both the AMReX particle and general precision switches into one.
https://warpx.readthedocs.io/en/latest/install/cmake.html#build-options
Thanks for finding this issue. :+1:
Yes, picsar_qed does not currently support mixed precision, we only have a single Real type for both fields and particle quantities so I'm not surprised that we have compilation issues if we try to use float
for particle quantities and double
for fields.
I think supporting this would require a bit of work (either adding a second Real type in picsar_qed and modifying the types in the routines where needed, or adding a bunch of casts where needed in WarpX), so in the meantime if you want mixed precision, temporarily disabling QED is indeed the way to go (or if you just want single precision for both fields and particles, doing as @ax3l suggested will work without having to disable QED).
When I configure with
-DWarpX_QED=ON -DAMReX_PARTICLES_PRECISION=SINGLE
, I encounter a compilation error as follows: