Skip to content

Commit

Permalink
Merge branch 'development' into replace-cuda-arch
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking authored Oct 24, 2023
2 parents b98d4b3 + 152fdac commit 9b7cd2c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions Docs/sphinx_documentation/source/Basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2812,3 +2812,6 @@ Backtrace files are produced by AMReX signal handler by default when
segfault occurs or ``Abort`` is called. If the application does not
want AMReX to handle this, ``ParmParse`` parameter
`amrex.signal_handling=0` can be used to disable it.

See :ref:`sec:gpu:assertion` for considerations on using these functions in
GPU-enabled code.
10 changes: 7 additions & 3 deletions Docs/sphinx_documentation/source/GPU.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1552,9 +1552,13 @@ Assertions and Error Checking
To help debugging, we often use :cpp:`amrex::Assert` and
:cpp:`amrex::Abort`. These functions are GPU safe and can be used in
GPU kernels. However, implementing these functions requires additional
GPU registers, which will reduce overall performance. Therefore, it
is preferred to implement such calls in debug mode only by wrapping the
calls using ``#ifdef AMREX_DEBUG``.
GPU registers, which will reduce overall performance. Therefore, by
default these functions and the macro ``AMREX_ALWAYS_ASSERT`` are no-ops
for optimized builds (e.g., ``DEBUG=FALSE`` using the GNU Make build
system) when called from kernels run on GPU. Calls to these functions from
GPU kernels are active for debug builds and can optionally be activated
at compile time for optimized builds (e.g., ``DEBUG=FALSE`` and
``USE_ASSERTION=TRUE`` using the GNU Make build system).

In CPU code, :cpp:`AMREX_GPU_ERROR_CHECK()` can be called
to check the health of previous GPU launches. This call
Expand Down
5 changes: 3 additions & 2 deletions Src/Extern/HDF5/AMReX_ParticleHDF5.H
Original file line number Diff line number Diff line change
Expand Up @@ -711,12 +711,13 @@ ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator, CellAssig
if (count[grid] == 0)
continue;

int_size = count[grid] * (2 + NStructInt + NArrayInt);
int_size = count[grid] * (2 + NStructInt + NumIntComps());
my_mfi_int_size.push_back(int_size);
my_nparticles.push_back(count[grid]);
my_mfi_int_total_size += int_size;

real_size = count[grid] * (AMREX_SPACEDIM + NStructReal + NArrayReal);

real_size = count[grid] * (AMREX_SPACEDIM + NStructReal + NumRealComps());
my_mfi_real_size.push_back(real_size);
my_mfi_real_total_size += real_size;
my_mfi_cnt++;
Expand Down

0 comments on commit 9b7cd2c

Please sign in to comment.