Skip to content

Commit 005ef77

Browse files
authored
SYCL: 1D EB Compile (#5384)
Attempt to fix 1D SYCL EB compile errors (throw not allowed on device). X-ref: spack/spack#46765 (comment)
1 parent a716670 commit 005ef77

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Source/EmbeddedBoundary/DistanceToEB.H

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,13 @@ amrex::RealVect interp_normal (int i, int j, int k, const amrex::Real W[AMREX_SP
121121
#else
122122
amrex::ignore_unused(i, j, k, ic, jc, kc, W, Wc, phi, dxi);
123123
amrex::RealVect normal(0.0);
124-
WARPX_ABORT_WITH_MESSAGE("Error: interp_distance not yet implemented in 1D");
124+
125+
AMREX_IF_ON_DEVICE((
126+
AMREX_DEVICE_ASSERT(0);
127+
))
128+
AMREX_IF_ON_HOST((
129+
WARPX_ABORT_WITH_MESSAGE("Error: interp_normal not yet implemented in 1D");
130+
))
125131

126132
#endif
127133
return normal;

0 commit comments

Comments
 (0)