diff options
author | 2020-02-24 15:54:50 -0800 | |
---|---|---|
committer | 2020-02-24 15:54:50 -0800 | |
commit | bbefc3dad687f4370afd5bc85386d983201cb321 (patch) | |
tree | dbbff865cd72e16b87046685dfc25835f1d2573c /Source/Particles/WarpXParticleContainer.cpp | |
parent | 8c3523a1054a0d7591cac951aa723f2b01c8e68d (diff) | |
download | WarpX-bbefc3dad687f4370afd5bc85386d983201cb321.tar.gz WarpX-bbefc3dad687f4370afd5bc85386d983201cb321.tar.zst WarpX-bbefc3dad687f4370afd5bc85386d983201cb321.zip |
Profiler wrapper to allow for cudaDeviceSynchronize (#738)
* add warpx profiler wrapper
* call WX profiler wrapper instead of BL
* EOL and cleaning
* add doc on profile syncs
* do not use PROFILE macros in .H files
* replace WX_PROFILE with WARPX_PROFILE and use bool instead of int
* typo
* this file shouldn't be there
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r-- | Source/Particles/WarpXParticleContainer.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index 59c38dcac..d77e35b6b 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -237,8 +237,8 @@ WarpXParticleContainer::DepositCurrent(WarpXParIter& pti, const std::array<Real,3>& dx = WarpX::CellSize(std::max(depos_lev,0)); Real q = this->charge; - BL_PROFILE_VAR_NS("PPC::Evolve::Accumulate", blp_accumulate); - BL_PROFILE_VAR_NS("PPC::CurrentDeposition", blp_deposit); + WARPX_PROFILE_VAR_NS("PPC::Evolve::Accumulate", blp_accumulate); + WARPX_PROFILE_VAR_NS("PPC::CurrentDeposition", blp_deposit); // Get tile box where current is deposited. @@ -313,7 +313,7 @@ WarpXParticleContainer::DepositCurrent(WarpXParIter& pti, } } - BL_PROFILE_VAR_START(blp_deposit); + WARPX_PROFILE_VAR_START(blp_deposit); if (WarpX::current_deposition_algo == CurrentDepositionAlgo::Esirkepov) { if (WarpX::nox == 1){ doEsirkepovDepositionShapeN<1>( @@ -355,16 +355,16 @@ WarpXParticleContainer::DepositCurrent(WarpXParIter& pti, xyzmin, lo, q); } } - BL_PROFILE_VAR_STOP(blp_deposit); + WARPX_PROFILE_VAR_STOP(blp_deposit); #ifndef AMREX_USE_GPU - BL_PROFILE_VAR_START(blp_accumulate); + WARPX_PROFILE_VAR_START(blp_accumulate); // CPU, tiling: atomicAdd local_jx into jx // (same for jx and jz) (*jx)[pti].atomicAdd(local_jx[thread_num], tbx, tbx, 0, 0, jx->nComp()); (*jy)[pti].atomicAdd(local_jy[thread_num], tby, tby, 0, 0, jy->nComp()); (*jz)[pti].atomicAdd(local_jz[thread_num], tbz, tbz, 0, 0, jz->nComp()); - BL_PROFILE_VAR_STOP(blp_accumulate); + WARPX_PROFILE_VAR_STOP(blp_accumulate); #endif } @@ -407,8 +407,8 @@ WarpXParticleContainer::DepositCharge (WarpXParIter& pti, RealVector& wp, const std::array<Real,3>& dx = WarpX::CellSize(std::max(depos_lev,0)); const Real q = this->charge; - BL_PROFILE_VAR_NS("PPC::ChargeDeposition", blp_ppc_chd); - BL_PROFILE_VAR_NS("PPC::Evolve::Accumulate", blp_accumulate); + WARPX_PROFILE_VAR_NS("PPC::ChargeDeposition", blp_ppc_chd); + WARPX_PROFILE_VAR_NS("PPC::Evolve::Accumulate", blp_accumulate); // Get tile box where charge is deposited. // The tile box is different when depositing in the buffers (depos_lev<lev) @@ -465,7 +465,7 @@ WarpXParticleContainer::DepositCharge (WarpXParIter& pti, RealVector& wp, // Indices of the lower bound const Dim3 lo = lbound(tilebox); - BL_PROFILE_VAR_START(blp_ppc_chd); + WARPX_PROFILE_VAR_START(blp_ppc_chd); if (WarpX::nox == 1){ doChargeDepositionShapeN<1>(GetPosition, wp.dataPtr()+offset, ion_lev, rho_arr, np_to_depose, dx, xyzmin, lo, q); @@ -476,14 +476,14 @@ WarpXParticleContainer::DepositCharge (WarpXParIter& pti, RealVector& wp, doChargeDepositionShapeN<3>(GetPosition, wp.dataPtr()+offset, ion_lev, rho_arr, np_to_depose, dx, xyzmin, lo, q); } - BL_PROFILE_VAR_STOP(blp_ppc_chd); + WARPX_PROFILE_VAR_STOP(blp_ppc_chd); #ifndef AMREX_USE_GPU - BL_PROFILE_VAR_START(blp_accumulate); + WARPX_PROFILE_VAR_START(blp_accumulate); (*rho)[pti].atomicAdd(local_rho[thread_num], tb, tb, 0, icomp*nc, nc); - BL_PROFILE_VAR_STOP(blp_accumulate); + WARPX_PROFILE_VAR_STOP(blp_accumulate); #endif } @@ -717,7 +717,7 @@ WarpXParticleContainer::PushX (amrex::Real dt) void WarpXParticleContainer::PushX (int lev, amrex::Real dt) { - BL_PROFILE("WPC::PushX()"); + WARPX_PROFILE("WPC::PushX()"); if (do_not_push) return; |