-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
catch and report out-of-memory error #1310
Comments
One solution may be to install an extra top-level exception handler in // new:
} catch (std::system_error &e) {
// system_error is thrown by std::ofstream but the
// message is not always helpful, so we also print errno
std::cerr << e.what() << ": " << std::strerror(errno) << std::endl;
return cmdstan::return_codes::NOT_OK;
// already there:
} catch (const std::exception &e) {
std::cerr << e.what() << std::endl;
return cmdstan::return_codes::NOT_OK;
} Unfortunately, it seems like |
I think you can make it more specific with
|
That is for out of memory (RAM), not disk space |
After some searching, it seems like @WardBrian's approach with
|
This is from mippeqf (Markus) on the Stan forums:
When the storage directory set under model$sample(output_dir = …) is full, some chains stop unexpectedly with the error message basic_ios::clear: iostream error. If detectable, it would be great if the error message could pass this reason along.
The text was updated successfully, but these errors were encountered: