aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2020-02-24 15:54:50 -0800
committerGravatar GitHub <noreply@github.com> 2020-02-24 15:54:50 -0800
commitbbefc3dad687f4370afd5bc85386d983201cb321 (patch)
treedbbff865cd72e16b87046685dfc25835f1d2573c /Source/Particles/PhysicalParticleContainer.cpp
parent8c3523a1054a0d7591cac951aa723f2b01c8e68d (diff)
downloadWarpX-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/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index dd0693cb0..35a52107b 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -314,7 +314,7 @@ PhysicalParticleContainer::CheckAndAddParticle(Real x, Real y, Real z,
void
PhysicalParticleContainer::AddParticles (int lev)
{
- BL_PROFILE("PhysicalParticleContainer::AddParticles()");
+ WARPX_PROFILE("PhysicalParticleContainer::AddParticles()");
if (plasma_injector->add_single_particle) {
AddNParticles(lev, 1,
@@ -361,7 +361,7 @@ PhysicalParticleContainer::AddParticles (int lev)
void
PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox)
{
- BL_PROFILE("PhysicalParticleContainer::AddPlasma");
+ WARPX_PROFILE("PhysicalParticleContainer::AddPlasma");
// If no part_realbox is provided, initialize particles in the whole domain
const Geometry& geom = Geom(lev);
@@ -924,7 +924,7 @@ PhysicalParticleContainer::EvolveES (const Vector<std::array<std::unique_ptr<Mul
Vector<std::unique_ptr<MultiFab> >& rho,
Real t, Real dt)
{
- BL_PROFILE("PPC::EvolveES()");
+ WARPX_PROFILE("PPC::EvolveES()");
int num_levels = rho.size();
for (int lev = 0; lev < num_levels; ++lev) {
@@ -1111,11 +1111,11 @@ PhysicalParticleContainer::Evolve (int lev,
const MultiFab* cBx, const MultiFab* cBy, const MultiFab* cBz,
Real t, Real dt, DtType a_dt_type)
{
- BL_PROFILE("PPC::Evolve()");
- BL_PROFILE_VAR_NS("PPC::Evolve::Copy", blp_copy);
- BL_PROFILE_VAR_NS("PPC::FieldGather", blp_fg);
- BL_PROFILE_VAR_NS("PPC::EvolveOpticalDepth", blp_ppc_qed_ev);
- BL_PROFILE_VAR_NS("PPC::ParticlePush", blp_ppc_pp);
+ WARPX_PROFILE("PPC::Evolve()");
+ WARPX_PROFILE_VAR_NS("PPC::Evolve::Copy", blp_copy);
+ WARPX_PROFILE_VAR_NS("PPC::FieldGather", blp_fg);
+ WARPX_PROFILE_VAR_NS("PPC::EvolveOpticalDepth", blp_ppc_qed_ev);
+ WARPX_PROFILE_VAR_NS("PPC::ParticlePush", blp_ppc_pp);
const std::array<Real,3>& dx = WarpX::CellSize(lev);
const std::array<Real,3>& cdx = WarpX::CellSize(std::max(lev-1,0));
@@ -1246,7 +1246,7 @@ PhysicalParticleContainer::Evolve (int lev,
//
// Field Gather of Aux Data (i.e., the full solution)
//
- BL_PROFILE_VAR_START(blp_fg);
+ WARPX_PROFILE_VAR_START(blp_fg);
FieldGather(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp,
exfab, eyfab, ezfab, bxfab, byfab, bzfab,
Ex.nGrow(), e_is_nodal,
@@ -1289,23 +1289,23 @@ PhysicalParticleContainer::Evolve (int lev,
lev, lev-1);
}
- BL_PROFILE_VAR_STOP(blp_fg);
+ WARPX_PROFILE_VAR_STOP(blp_fg);
#ifdef WARPX_QED
//
//Evolve Optical Depth
//
- BL_PROFILE_VAR_START(blp_ppc_qed_ev);
+ WARPX_PROFILE_VAR_START(blp_ppc_qed_ev);
EvolveOpticalDepth(pti, dt);
- BL_PROFILE_VAR_STOP(blp_ppc_qed_ev);
+ WARPX_PROFILE_VAR_STOP(blp_ppc_qed_ev);
#endif
//
// Particle Push
//
- BL_PROFILE_VAR_START(blp_ppc_pp);
+ WARPX_PROFILE_VAR_START(blp_ppc_pp);
PushPX(pti, dt, a_dt_type);
- BL_PROFILE_VAR_STOP(blp_ppc_pp);
+ WARPX_PROFILE_VAR_STOP(blp_ppc_pp);
//
// Current Deposition
@@ -1797,7 +1797,7 @@ PhysicalParticleContainer::PushP (int lev, Real dt,
const MultiFab& Ex, const MultiFab& Ey, const MultiFab& Ez,
const MultiFab& Bx, const MultiFab& By, const MultiFab& Bz)
{
- BL_PROFILE("PhysicalParticleContainer::PushP");
+ WARPX_PROFILE("PhysicalParticleContainer::PushP");
if (do_not_push) return;
@@ -1950,7 +1950,7 @@ void PhysicalParticleContainer::GetParticleSlice(const int direction, const Real
const Real t_lab, const Real dt,
DiagnosticParticles& diagnostic_particles)
{
- BL_PROFILE("PhysicalParticleContainer::GetParticleSlice");
+ WARPX_PROFILE("PhysicalParticleContainer::GetParticleSlice");
// Assume that the boost in the positive z direction.
#if (AMREX_SPACEDIM == 2)
@@ -2331,7 +2331,7 @@ void PhysicalParticleContainer::InitIonizationModule ()
IonizationFilterFunc
PhysicalParticleContainer::getIonizationFunc ()
{
- BL_PROFILE("PPC::getIonizationFunc");
+ WARPX_PROFILE("PPC::getIonizationFunc");
return IonizationFilterFunc{ionization_energies.dataPtr(),
adk_prefactor.dataPtr(),