Evaluation version of ADMB

Notes on installing evaluation copy

The following is intended to provide some guidance for users interested in evaluating ADModel Builder. This version has been compiled to work with Redhat Linux 6.1.

Step 1a. Download the file admb-redhat-6.1.tar.gz from our web site or This is the evaluation version of ADMB. After the download is completed click on the CARRY-ON link to get back here.

Step 2. The files for ADMB are in a gzipped tar ball. They are extracted with the command

tar -zxvf admb-redhat-6.1.tar.gz

This creates a directory named admb-redhat-6.1 which contains the AD Model Builder files. You may rename this directory if you wish.

Step 3. You must ensure that the compiler and linker can find the header and library files for ADMB. This can be accomplished by editing the files mygccopt, mygccs, linkadm, and linkadms in the directory admb-redhat-6.1/bin so that the -I and -L options point to the correct subdirectories.

Step 4. You must ensure that the operating system can find the files in admb-redhat-6.1/bin This can be accomplished by putting the directory admb-redhat-6.1/bin on your PATH.

Step 5. Download an example file to test evaluation library and compiler, e.g., simple.tpl:

init_int nobs
init_vector Y(1,nobs)
init_vector x(1,nobs)

init_number a
init_number b
vector pred_Y(1,nobs)
objective_function_value f


and simple.dat:

# number of observations
1.4 4.7 5.1 8.3 9.0 14.5 14.0 13.4 19.2 18
# observed x values
-1 0 1 2 3 4 5 6 7 8 9

Step 6. Remove the files simple.cpp, simple.obj, and simple.exe from the directory so you will know can they have been recreated properly. Translate/compile/link simple.tpl file by typing:

makeadm simple

Step 7. If there is a new simple.exe file it appears that everything works. Type simple to run the program. You can skip the following steps. Otherwise follow the instructions in steps 8-10.

Step 8. The makeadm command consists of three parts. If you are here one or more of these parts is not functioning properly.

Test the tpl2cpp translator by typing:

tpl2cpp simple

This should produce simple.cpp. If it does not then you have failed to put the directory where tpl2cpp.exe is contained on your path (This has to do with the PATH environment string declaration.) Do so and try it again.

Step 9. Now you are ready to test the compiler by typing:

mygccopt simple

If you see something like command cl not found then you have failed to put the directory which contains the file cl.exe on your path. correct this problem and try again.

If the compiler complains about not being able to find a file named admodel.h then you have not put the directory containing this file in the -L field of the mygccopt file. Correct that. When this step works you should get a file named simple.obj.

Step 10. Now you are ready to test the linker by typing:

linkadm simple

If the linker complains that it can't find a library such as libadmod.a or libado.a then you have failed to put the directory containing the library in the -L option of the linkadm file. Fix that. Eventually you should get everything working and the file simple.exe will be created. Now delete the files simple.exe, simple.obj, and simple.cpp and type:

makeadm simple

again. This should now do the whole job of creating simple.exe. OK. AD Model builder is now installed.

The above steps make the optimized version of the simple model. To make the safe version which checks for bounbds violations repeat the above steps for the files makeadms, mygccs, and linkadms in place of the files makeadm, mygccopt, and linkadm.


Other example files (for fishery models) can be found at:


Information on a list-serve for modeling (with emphasis on approaches using ADModel Builder can be found at: