[ADMB Users] ABMD & DLLs

Arni Magnusson arnima at hafro.is
Tue Feb 23 05:52:55 PST 2010


Yes, the Pella-Tomlinson example 
(http://code.google.com/p/admb-project/source/browse/trunk/examples/admb/pella-t/) 
highlights a relevant issue: how hard is it to rewrite an existing ADMB 
model to compile to DLL instead of plain executable? I don't know the 
answer, but it looks like there's more to it than simply renaming all the 
data and parameter objects (init_int to dll_init_int, etc.), because that 
doesn't compile. I'm not sure if dll_init_bounded_dev_vector can be used.

A smaller example, converting the random-effects simple.tpl (ADMB-RE 
manual, section 2.3) to compile to DLL does not appear straightforward 
either, although tpl2rem 
(http://code.google.com/p/admb-project/source/browse/trunk/src/df1b2-separable/tpl2rem.lex) 
recognizes many dll_ objects, including dll_random_effects_vector. I 
couldn't get it to compile.

I'm still optimistic that DLL support can be improved in future versions 
of ADMB, if the community thinks it's an important goal. Admittedly, DLLs 
seem more nifty than necessary ... tempting to fix, though, since they're 
only half-broken. DLLs make it easier for other software to interact with 
ADMB in ways we cannot imagine yet. Open source tends to spark emerging 
properties that way.

Out of historical curiosity, I have kept ADMB version 5 from the year 2000 
on my computer, to benchmark against current versions. I just tested 
compiling DLLs from those old versions (Borland 5.2, GCC 2.95.2, MSVC 6.0) 
and they all work perfectly in R. Dave Fournier knows best whether it may 
be useful to release ancient ADMB source code, as a study guide for those 
who want to improve the current DLL support, or if it's better to go 
bug-hunting without the ghosts of ADMB past.

Arni



On Mon, 22 Feb 2010, Laurie Kell wrote:

> Hi
>
> I´ll download the ADMB source code and try and track the bug It might be 
> something simple such as an errant print statement. I agree that a 
> worked example of an ADMB/R package with a discussion of benefits would 
> be useful eg.
> The benefits of using ADMB rather than R non-linear solvers (e.g. 
> optim/minpack.lm), the benefits of using R for graphics, data-bases, and 
> linking with other tools. Then a discussion of object orientated 
> programming in R, i.e. S4 classes and FLR.
>
> I think a candidate for this example could be Pella-T example.
>
> Laurie
>


More information about the Users mailing list