AMReX-Astro / AMReX-Astro/Microphysics
util/hybrj: invalid xtol currently hard-aborts instead of returning solver status
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 43
- Forks
- 46
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
Summary
For invalid xtol (xtol < 0), hybrj calls amrex::Error, which aborts execution. This differs from MINPACK-style status reporting and makes the solver harder to integrate in robust workflows.
Affected code
util/hybrj/hybrj.H: input validation path forxtol
Why this is a problem
A hard abort bypasses normal solver error handling and can terminate larger applications unexpectedly.
Expected behavior
The solver should return a non-success info code (e.g., improper input) and exit cleanly without process termination.
Suggested fix
- Replace hard abort with status-based return (
info = 0/ dedicated bad-input code). - Keep behavior consistent with other termination paths that set
infoand return.
Acceptance criteria
- Invalid
xtoldoes not abort process. - Caller can observe and handle the returned status code.
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
Start in util/hybrj/hybrj.H at the input validation path for xtol and compare it with other termination paths that set info and return. Verify that invalid xtol no longer aborts the process and that the caller receives a non-success status code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100