[ADMB Users] Pl. define exit and error codes

Siddeek, Shareef (DFG) shareef.siddeek at alaska.gov
Wed Jan 1 15:54:06 PST 2014

Thanks John for clearing the doubt. Happy New Year tov you too. Siddeek
From: John Sibert [sibert at hawaii.edu]
Sent: Wednesday, January 01, 2014 10:49 AM
To: Siddeek, Shareef (DFG); users at admb-project.org
Subject: Re: [ADMB Users] Pl. define exit and error codes

As was pointed out in response to a earlier query about exit and error
codes, they don't really mean much.

If your model is quitting with an exit code, the easiest way to track
down the cause is to use a debugger:
1. Build your model with debugging enabled, admb -g
2. Run the program in the debugger. You will see some code that looks
like this
> extern "C"  {
>   void ad_boundf(int i)
>   {
>     /* so we can stop here */
>     exit(i);
>   }
> }
located near the and of the source code after "int main(int argc,char *
argv[]) {...}". Place a breakpoint at the "exit(i)" line.
3. When you run the program again, it will stop at the breakpoint.
4. Use "backtrace" (or something similar, depending on the debugger) to
find the exact line in your code that produced th error.

Generally speaking most errors are caused by walking out of an array.
The default for admb is to generate code that checks to valid
subscripts. The error messages for these errors are pretty informative
and often help locating errors.

One final note. ADMB is open source code. That means that anyone is free
to look through the code. Perhaps someone might be interested in
compiling a list of exit codes?

Happy New Year,

John Sibert
Emeritus Researcher, SOEST
University of Hawaii at Manoa
Honolulu HI (GMT-10)

Visit the ADMB project http://admb-project.org/

On 12/31/2013 04:02 PM, Siddeek, Shareef (DFG) wrote:
> Hi,
> I came across exit(1), exit(44), etc. in ADMB code files. Is there any
> place where I can find the definitions of different exit codes and
> error messages?
> Thanks and happy new year.
> Siddeek
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users

More information about the Users mailing list