Re: [AMBER] PATH/evironment problem on Mac OS X

From: Gustaf Olsson <>
Date: Fri, 21 Jan 2011 19:40:16 +0100

Thank you SO much Ben!

By running:

        cd /usr/local/amber11/test && ./

as superuser, the tests begun and are rolling as we "speak". What I cannot wrap my head around is how echo and evn | grep..... both returns all the right info, but it still does not work?

I'm going to be forced to try running:

        cd $AMBERHOME/test && ./

Just to se if that can circumvent this problem. I just cannot see the problem, cd $AMBERHOME/test brings me to the exact same location as cd /usr/local/amber11/test

Login shell in mac is by default bash, it says so on the window bar at the top. But as far as I have been able to figure, Mac has its own version of bash since running "bash" changes the prompt from VCN736:~ guolaa$ to bash-3.2$.

Based on this I have made some assumptions, see under root (/etc) there are two "global" profile files, one called profile and one called bashrc. Of these two, profile has priority.

In you user account ($HOME), you can just create .profile, .bashrc, .cshrc, and so on... These are read at terminal startup and at shell-change, but .profile has priority in bash over .bashrc and is read at startup of terminal. So for all my software I set environment and PATH variables in .profile in my $HOME. It has always worked perfectly, except for tests and bugfix with AMBER.

But thanks to you I can finally gets the job done

Best regards
// Gustaf

On Jan 21, 2011, at 7:18 PM, Ben Roberts wrote:

> Hi Gustaf,
> On 21/1/2011, at 1:08 p.m., Gustaf Olsson wrote:
>> Thanks for you input Ben, sadly; no such luck.
>> Both the echo and env grep presents AMBERHOME as set correctly, but test still fails!
>> /usr/local/amber11
>> /usr/local/amber11/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
>> VCN736:~ guolaa$ cd /usr/local/amber11/test/
>> VCN736:test guolaa$ env | grep PATH
>> PATH=/usr/local/packmol:/usr/local/amber11/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
>> VCN736:test guolaa$ env | grep AMBERHOME
>> AMBERHOME=/usr/local/amber11
>> VCN736:test guolaa$ sudo make test
>> (find . -name '*.dif' -o -name 'profile_mpi' | \
>> while read dif ;\
>> do \
>> rm -f $dif ;\
>> done ;\
>> )
>> rm -f TEST_FAILURES.diff
>> Error: AMBERHOME should be defined or else some tests will fail !
>> make: *** [is_amberhome_defined] Error 2
>> VCN736:test guolaa$
>> Best regards Gustaf
> If you would, try running "cd /usr/local/amber11/test && ./". That will test $AMBERHOME first thing, and if the latter is not defined it will fail.
> Also, where exactly are you setting $AMBERHOME? It may be that the test is starting up as a non-login shell. If it's doing that, setting AMBERHOME in bash_profile or its equivalent may be problematic; bash_profile files are ignored for non-login shells (I think).
> --
> For greater security, I support S/MIME encryption.
> _______________________________________________
> AMBER mailing list

AMBER mailing list
Received on Fri Jan 21 2011 - 11:00:02 PST
Custom Search