[ADMB Users] size of static array likeprofptr and make files for windows

Poos, Jan Jaap janjaap.Poos at wur.nl
Mon Oct 18 02:38:17 PDT 2010


 
Hi,

Indeed, setting the size of the list to 500 in mod_prof.cpp and admodel.h and building ADMB fixed the problem. I don't know about the costs in terms of memory use or speed of execution, but maybe it is a good idea to do this as a default in the standard ADMB code.

Building the ADMB code for windows I used mingw. This is currently not described on the admb-project.org website, despite the makefile being there. So it should be fairly straightforward to add this. 

Note that the mingw makefile to all popular windows options (bcc, vc, mingw) contains a call to svn. The instructions for building on windows don't include installing a cli svn client, and cli svn clients are rarely installed by default on windows machines. That means that make will fail.

Even with a cli svn client it seems that the call to svn fails (I can't remember the exact error message). It seems to attempt to get a copy of the examples from a repository (but I may be wrong here). Those examples are already in the source (in the version 9.1 zip file), so the svn line can safely be commented out.

I hope the developers of ADMB can make some of these changes.

Cheers, 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!
_______________________________________________
Users mailing list
Users at admb-project.org
http://lists.admb-project.org/mailman/listinfo/users





More information about the Users mailing list