Skip to content

Commit d9f3ef6

Browse files
authored
Shared deposition not implemented in RCYLINDER and RSPHERE geometries (BLAST-WarpX#6213)
I was compiling WarpX on Frontier in all geometries and ran into a build error with the RCYLINDER and RSPHERE geometries. This PR skips the shared deposition routines when building in these geometries for now.
1 parent 8734942 commit d9f3ef6

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Source/Particles/Deposition/CurrentDeposition.H

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ void doDepositionSharedShapeN (const GetParticlePosition<PIdx>& GetPosition,
498498
{
499499
using namespace amrex::literals;
500500

501-
#if defined(AMREX_USE_HIP) || defined(AMREX_USE_CUDA)
501+
#if (defined(AMREX_USE_HIP) || defined(AMREX_USE_CUDA)) && \
502+
!(defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE))
502503
using namespace amrex;
503504

504505
auto permutation = a_bins.permutationPtr();

Source/Particles/Deposition/SharedDepositionUtils.H

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ void addLocalToGlobal (const amrex::Box& bx,
6262
}
6363
#endif
6464

65-
#if defined(AMREX_USE_HIP) || defined(AMREX_USE_CUDA)
65+
#if (defined(AMREX_USE_HIP) || defined(AMREX_USE_CUDA)) && \
66+
!(defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE))
6667
template <int depos_order>
6768
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
6869
void depositComponent (const GetParticlePosition<PIdx>& GetPosition,

Source/WarpX.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,9 +877,13 @@ WarpX::ReadParameters ()
877877
#endif
878878
pp_warpx.query("do_shared_mem_charge_deposition", do_shared_mem_charge_deposition);
879879
pp_warpx.query("do_shared_mem_current_deposition", do_shared_mem_current_deposition);
880-
#if !(defined(AMREX_USE_HIP) || defined(AMREX_USE_CUDA))
880+
#if !(defined(AMREX_USE_HIP) || defined(AMREX_USE_CUDA)) || \
881+
(defined(WARPX_DIM_RCYLINDER) || defined(WARPX_DIM_RSPHERE))
881882
WARPX_ALWAYS_ASSERT_WITH_MESSAGE(!do_shared_mem_current_deposition,
882-
"requested shared memory for current deposition, but shared memory is only available for CUDA or HIP");
883+
"requested shared memory for current deposition,\
884+
but shared memory is only available for CUDA or HIP,\
885+
and for geometries other than 1D cylindrical and 1D spherical."
886+
);
883887
#endif
884888
pp_warpx.query("shared_mem_current_tpb", shared_mem_current_tpb);
885889

0 commit comments

Comments
 (0)