diff options
author | 2021-10-15 10:13:09 +0200 | |
---|---|---|
committer | 2021-10-15 10:13:09 +0200 | |
commit | 6351dca8d6ab4edf648977d9b9adb6c42ff92c2e (patch) | |
tree | 33176c8d7a4e8a2eefb64dbddae7cd37d89aa420 /Source/WarpX.cpp | |
parent | 2e3292b2f62152c0445641537391fba070f8cc23 (diff) | |
download | WarpX-6351dca8d6ab4edf648977d9b9adb6c42ff92c2e.tar.gz WarpX-6351dca8d6ab4edf648977d9b9adb6c42ff92c2e.tar.zst WarpX-6351dca8d6ab4edf648977d9b9adb6c42ff92c2e.zip |
Synchronize GPU before stopping profile timer (#2415)
* synchronize device before ending profile
* fix shadowing issue
* add comment
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 32203e169..c9faf6110 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -189,9 +189,9 @@ int WarpX::n_current_deposition_buffer = -1; int WarpX::do_nodal = false; #ifdef AMREX_USE_GPU -bool WarpX::do_device_synchronize_before_profile = true; +int WarpX::do_device_synchronize = 1; #else -bool WarpX::do_device_synchronize_before_profile = false; +int WarpX::do_device_synchronize = 0; #endif WarpX* WarpX::m_instance = nullptr; @@ -486,7 +486,7 @@ WarpX::ReadParameters () ReadBoostedFrameParameters(gamma_boost, beta_boost, boost_direction); - pp_warpx.query("do_device_synchronize_before_profile", do_device_synchronize_before_profile); + pp_warpx.query("do_device_synchronize", do_device_synchronize); // queryWithParser returns 1 if argument zmax_plasma_to_compute_max_step is // specified by the user, 0 otherwise. |