[ADMB Users] exit codes and likelihood profile vectors

Poos, Jan Jaap janjaap.Poos at wur.nl
Fri Oct 8 14:31:57 PDT 2010


Hi,

Indeed changing the size of the array to 500 in mod_prof.cpp and admodel.h (in combination with making some methods in admodel.h public as discussed before) and rebuilding ADMB fixed the problem.

Thanks a lot,

Jan Jaap 

-----Original Message-----
From: users-bounces at admb-project.org [mailto:users-bounces at admb-project.org] On Behalf Of dave fournier
Sent: Thursday, October 07, 2010 9:50 PM
To: users at admb-project.org
Subject: Re: [ADMB Users] exit codes and likelihood profile vectors


ADMB works by putting objects on lists.   At the time it was done
stupidly to get things done quickly.  The likeprof types are put on a static array likeprofptr which can only hold 50 items with the present code It does not check this value so you are walking out of this static array.
It is at the top of the file mod_prof.cpp

  likeprof_params * likeprof_params::likeprofptr[50]; // this should be
                                                  // a resizeable array

To get you model to work a quick fix is to change this to something bigger say 500.
you will also need to change the declaration in admodel.h.

Of  course anyone is welcome to fix this properly. Isn't open source wonderful!




More information about the Users mailing list