List of Error Codes?

Hi. Is there a list of error codes for Stan? In particular, my model exited with:
RuntimeError: Error during optimizing, error code 1

But checking the error codes from https://github.com/stan-dev/stan/blob/develop/src/stan/optimization/bfgs.hpp#L19. there doesn’t seem to be an error code of that type.

Thanks!

1 Like

what interface are you using?

agreed we need to document this - cf. issue https://github.com/stan-dev/docs/issues/228

cmdstanpy version: 0.9.63 with CmdStan version: 2.24.1

Right, but https://github.com/stan-dev/stan/blob/develop/src/stan/services/error_codes.hpp#L10. doesn’t seem to have an exhausive list of error codes either.

I just uploaded a new version of CmdStanPy to PyPi, which includes a PR for better error handling (https://github.com/stan-dev/cmdstanpy/pull/280). if there is an error message written to stderr, it will be returned.

the error codes returned by the Stan service layer (64, 65, 66, 70, 78) are based on a POSIX standard - those codes indicate that the C++ executable detected a problem and was able to quit gracefully. there are many other reasons why the C++ program might not be able to run. I’m not sure what causes return code 1.

2nd question - what OS?

Currently I am running linux-gnu (it is on an aws docker container). I am trying different configurations of compiler flags to get reduce_sum to work.

I will look at version numbers and post again…