Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement graceful error handling for allocation failures #88

Closed
bonachea opened this issue Mar 27, 2024 · 1 comment
Closed

Implement graceful error handling for allocation failures #88

bonachea opened this issue Mar 27, 2024 · 1 comment

Comments

@bonachea
Copy link
Member

In the near term, Caffeine will likely treat most errors as immediately fatal (ideally with a high-quality message as part of the error crash).

However one particularly important error that IMO should not get this treatment is memory allocation. Unlike hardware failure, out-of-memory is a common condition when scaling problems in real production science, and needs to be handled in a robust manner by a production-quality runtime. It's even plausible that some applications might perform non-trivial recovery from allocation failure.

prif_allocate and prif_allocate_non_symmetric currently ignore the possibility of errors and I suspect they crash in obscure ways upon memory exhaustion. IMO these two calls should be fixed to strictly adhere to Fortran error handling semantics, specifically wrt returning meaningful stat and errmsg (when provided) or crashing with a useful console message (when not provided). Ideally the error message in either case should include status information about the initial and current state of the shared heaps, and recommendations to the end-user about how to resolve the problem.

@bonachea
Copy link
Member Author

bonachea commented Aug 9, 2024

duplicate of #128

@bonachea bonachea closed this as completed Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant