AMReX-Astro / AMReX-Astro/Castro
`hse_fill` silently skips `+Z` HSE boundary handling on GPU builds
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 340
- Forks
- 105
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 8
Description
Summary
hse_fill() has explicit +Z HSE handling marked as unimplemented, but the error is guarded with #ifndef AMREX_USE_GPU. On GPU builds this path does nothing and returns silently, leaving +Z external HSE boundaries unfilled.
Location
Source/problems/hse_fill.cpp:1017Source/problems/hse_fill.cpp:1019
Problem Details
Current code:
if (zr_ext_bc_type == EXT_HSE) {
#ifndef AMREX_USE_GPU
amrex::Error("ERROR: HSE boundaries not implemented for +Z");
#endif
}
In GPU builds, no error is raised even though functionality is absent.
Impact
- Incorrect or uninitialized
+Zghost state for HSE external boundaries on GPU runs. - Hard-to-diagnose physics errors because the failure is silent.
Suggested Patch
Fail fast in all builds until +Z HSE is implemented:
diff --git a/Source/problems/hse_fill.cpp b/Source/problems/hse_fill.cpp
--- a/Source/problems/hse_fill.cpp
+++ b/Source/problems/hse_fill.cpp
@@
if (zr_ext_bc_type == EXT_HSE) {
-#ifndef AMREX_USE_GPU
amrex::Error("ERROR: HSE boundaries not implemented for +Z");
-#endif
}
Prepared by Codex
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open Source/problems/hse_fill.cpp around lines 1017-1019 and inspect the +Z EXT_HSE branch and its AMREX_USE_GPU guard. Remove the GPU-only silence so unsupported +Z HSE handling fails consistently, then verify a GPU build or run that exercises +Z HSE boundaries and confirms an error is raised.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100