Closed Cole-Monnahan-NOAA closed 2 years ago
A better alternative is to just reset ad_exit with one that does nothing (see below).
GLOBAL_SECTION
extern "C"
{
void do_not_exit(const int exit_code)
{
// Does Nothing
}
}
PROCEDURE_SECTION
ad_exit=&do_not_exit;
.
.
.
I suppose the downside of this approach is that it breaks the exit for all errors? An interesting approach and one that could be really useful on the user end. If you're opposed to modifying this then I'll stick with this fix.
okay
In this line the program will quit early if taking sqrt(0). This makes sense as the derivative is undefined there (divide by 0). However, for MCMC and NUTS in particular, it would be preferable to skip the exit and let the program continue running as this is caught later.
So could we delete the
ad_exit
or disable it when in MCMC mode?