aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2021-06-30 15:34:58 -0700
committerGravatar GitHub <noreply@github.com> 2021-06-30 15:34:58 -0700
commitf428f5a26f11d715f1b8800e60f0b29154ce10a6 (patch)
tree7f8183fa37fcfb4b08cb57400d11957561b08d93 /Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp
parentadd16de9cb37c5c466db492512a495809d6ddded (diff)
downloadWarpX-f428f5a26f11d715f1b8800e60f0b29154ce10a6.tar.gz
WarpX-f428f5a26f11d715f1b8800e60f0b29154ce10a6.tar.zst
WarpX-f428f5a26f11d715f1b8800e60f0b29154ce10a6.zip
Add OpenMP for FFTW (#2040)
* CMake: Find out if FFTW supports OpenMP Add a heuristics that also works with PkgConfig to query OpenMP support in FFTW. Enable by default if we build with the OpenMP compute backend unless explicitly disabled. Add a macro to control the source-code, since FFTW does not offer a public define for this. * FFTW: Initialize Threads Co-authored-by: Severin Diederichs <severin.diederichs@desy.de> Co-authored-by: Severin Diederichs <severin.diederichs@desy.de>
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp b/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp
index bdb631063..056c030c0 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp
@@ -145,6 +145,8 @@ SpectralFieldData::ForwardTransform (const int lev,
#endif
// Loop over boxes
+ // Note: we do NOT OpenMP parallelize here, since we use OpenMP threads for
+ // the FFTs on each box!
for ( MFIter mfi(mf); mfi.isValid(); ++mfi ){
if (cost && WarpX::load_balance_costs_update_algo == LoadBalanceCostsUpdateAlgo::Timers)
{
@@ -247,6 +249,8 @@ SpectralFieldData::BackwardTransform( const int lev,
#endif
// Loop over boxes
+ // Note: we do NOT OpenMP parallelize here, since we use OpenMP threads for
+ // the iFFTs on each box!
for ( MFIter mfi(mf); mfi.isValid(); ++mfi ){
if (cost && WarpX::load_balance_costs_update_algo == LoadBalanceCostsUpdateAlgo::Timers)
{