[ADMB Users] Environment Variables Issue?

Ian Taylor Ian.Taylor at noaa.gov
Wed Jun 30 14:47:21 PDT 2010


Thanks to Ted and Arni, I think the problems with installing the 
ADMB-IDE that were the subject of emails on Monday have now all been 
solved.

One problem was the finicky nature of the Environmental Variables (no 
spaces allowed), and the other was that in the process of changing 
settings on my computer, I somehow must have corrupted the simple.tpl 
file or something else in that directory that I was using to test the 
compiling. I finally thought to try compiling a different file which 
worked fine, and after wiping out and replacing the directory with the 
simple.tpl file that caused tpl2cpp to crash, that test is working again 
too.

In case anyone else wants to try the setup, and for completeness in the 
email archives, here are the steps that seem to get the current version 
of the ADMB-IDE working for non-administrative user accounts.

1. Have an administrator run the ADMB-IDE installer to create the full 
default installation.
2. As the non-admin user, create the following User Variables (via right 
click on My Computer > Properties > Advanced > Environmental Variables > 
New), making sure the paths all match existing directories and that you 
have no spaces:
ADMB_HOME  c:\ADMB\gcc440
HOME       c:\~
PATH       
c:\admb\gcc440\bin;c:\gnu\gcc440\bin;c:\gnu\gdb\bin;c:\gnu\emacs\bin

One issues worth noting is that the files created by the installer 
c:/~/.emacs or c:/~/.recentf may need to have their security settings 
changed if the non-admin user wants to modify the setup or get a list of 
recently used files within the ADMB-IDE. Second, for users of R, the 
creation of a HOME variable has implications for where R looks for 
things. It seems you can override this by creating an additional 
variable called R_USER pointing to where you want R to look for packages.

-Ian

Arni Magnusson wrote:
>> In User Variables, I have
>>
>> ADMB_HOME         c:\ADMB\gcc440
>> HOME              c:\~
>> INCLUDE           c:\admb\gcc440
>> LIB               c:\admb\gcc440
>> PATH              c:\admb\gcc440\bin; c:\gnu\gcc\bin; c:\gnu\gdb\bin;
>> c:\gnu\emacs\bin
>
> The INCLUDE and LIB variables are unnecessary and should not be 
> defined. Probably not the root of the problem, but I recommend leaving 
> them undefined.
>
> AD Model Builder with GCC requires only two env variables, ADMB_HOME 
> and PATH, and ADMB-IDE needs a third variable HOME. The ADMB-IDE 
> installer tries to set these three variables, and the values you list 
> above look correct.
>
> If you can translate simple.tpl to simple.cpp and simple.htp, then at 
> least tpl2cpp is working. It sounds like you are unable to build 
> simple.exe out of simple.cpp and simple.htp. The first test, then, is 
> to check whether GCC is able to build hello.exe out of hello.cpp.
>
> Create c:/hello/hello.cpp from 
> http://helloworldsite.he.funpic.de/hello.htm#C++-ISO, open a Dos 
> shell, navigate to c:/hello, and run Test #1:
>
>   g++ -s -static -Wall hello.cpp -o hello
>
> If your setup passes this first test and creates a healthy hello.exe, 
> then GCC is working. The next test is to copy simple.tpl and 
> simple.dat to directory c:/simple, open a Dos shell, navigate to 
> c:/simple, and run Test #2:
>
>   admb simple
>
> If your setup passes this second test and creates a healthy 
> simple.exe, then ADMB is working and the problem is either ADMB-IDE or 
> a misunderstanding of how it works. Before we go there, it would be 
> great if you can run these two tests to narrow the search.
>
> Arni
>
> P.S. Many beginning users can benefit from this discussion. You made a 
> good effort reading through old messages on the mailing list, but 
> luckily Ian Taylor has taken the initiative and is preparing an ADMB 
> FAQ, where previous help-related discussions will be archived in an 
> organized way that's easy to browse. An alpha version is already on 
> the web in a secret location.
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users



More information about the Users mailing list