Evaluation version of ADMB

Notes on installing evaluation copy

The following is intended to provide some guidance for users interested in evaluating ADModel Builder.

Step 1a Download the file admb-vc7.1-demo.exe 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. You will need to purchase the Visual C++.Net compiler to use this evaluation version of ADMB. (The other evaluation version for Cygin or Borland 5.5.1 use a free compiler. You may wish to use one of these versions if you do not already own Visual C++.Net.)

Step 3. The files for ADMB are in a zip file, admb-vc7.1-demo.zip. Unzip them with yiou favourite unzipper.

Step 4. You must ensure that the compiler and linker can find the header and library files for ADMB. This can be accomplished by setting the INCLUDE and LIB environment strings to the correct values. This can be accomplished with commands like

Step 5. You must ensure that the operating system can find the files in c:\admodel-demo\bin. This can be accomplished by putting the directory c:\admodel\bin on your PATH.

Step 6. 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 7. 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 8. 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 9-11.

Step 9. 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 in admodenv.bat.) Do so and try it again.

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

mycl 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 environment string INCLUDE. If the compiler complains about not being able to find a number of other files with names like STDIO.H or FSTREAM.H then you have not put the directories containing those files in the environment string INCLUDE. Correct that. When this step works you should get a file named simple.obj.

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

linkcl simple

If the linker complains that it can't find a library such as ADMOD32.LIB or ADO32.lib then you have failed to put the directory containing the library in the environment string LIBRARY. 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.

If you want to use the IDE to compile ADMB programs you will need to defined the macros __MSVC32__=7 and WIN32 as well as OPT_LIB for the optimized version (linking with ado32.lib).