Date: Fri, 7 Mar 2003 09:13:10 -0800 (PST)
From:
Subject: Notes: Compiling Amber 7 on Mac OS X (fwd)



---------- Forwarded message ----------
Date: Wed, 05 Mar 2003 02:00:04 -0500
From: Peter Haggerty
To: amber@heimdal.compchem.ucsf.edu
Subject: Notes: Compiling Amber 7 on Mac OS X

There are some useful notes on the list about compiling Amber
for Mac OS X, but no HOW-TO, so we decided to write one up.
Comments, corrections and additions are welcome.


Notes for compiling Amber 7.0 on Mac OS X using g77. They
same process also works, with some minor changes, for the
Absoft ProFortan 8.0 compiler. Some of the tests have been
run and not all of them match the reference output from the
SGI R10000 that is included in the Amber distribution. The
jac and gb_mb benchmarks have been run, but we are still
trying to make sense of the results.



Make sure that the shell environment has the AMBERHOME
environment variable defined and the Amber 7.0 source is
already unpacked. Here's and example of what should be in
a ~/.cshrc if Amber was unpacked on the desktop:


## Set the Amber base directory
setenv AMBERHOME ~/Desktop/amber7

## Set the display for any X11 clients (such as xleap)
setenv DISPLAY :0.0

## Add the directory where Amber will keep it's executables
## to the path
setenv PATH "${PATH}:${AMBERHOME}/exe"



1. If you want to use xleap you'll need Apple's X11 user
and SDK (Software Development Kit) packages. Double
click on the disk image once it is downloaded and
answer answer the questions, clicking your way through
the install.

http://www.apple.com/macosx/x11/download/

The "Download X11" button on the bottom of the page
will get you the environment to run X11 programs but
the SDK will also probably be needed, it should be a
link on the bottom right of the above page.


2. Create a symbolic link in $AMBERHOME/src
cd $AMBERHOME/src; ln -s ./Machines/Machine.g77 ./MACHINE


3. Edit $AMBERHOME/src/ptraj/pdb/Makefile
Follow the instructions in the Makefile for BSD, and
change the RANLIB variable to "ranlib", also change
the LINTOPT to "-C".


4. Edit $AMBERHOME/src/roar-2.1/Makefile
Add "; ranlib mop7mm.a" to the end of the line reading
"cd mop7mm; make mop7mm.a"


5. Run "make install" from $AMBERHOME/src
cd $AMBERHOME/src; make install

This takes 12 minutes on a Dual 867 G4 with a 1GB of RAM.




Fink is a good way to download and install g77 if it is not
already on your system: http://fink.sourceforge.net/


Compiling using the Absoft compiler is much the same but you
should make sure to apply all the AbSoft patches first:
http://www.absoft.com/download/osxdownloads.html

Use the $AMBERHOME/src/Machines/Machine.absoft file for the
MACHINE symbolic link in $AMBERHOME/src and change the CPP
variable so it does not specify the path as "/lib/cpp". Do
not specify a path in the CPP variable. Set it simply to
"cpp -traditional".

Change all the compiler aliases (L0, L1, L2, L3) to include
"-N11".
"setenv L0 "f90 -c -B100 -N11 -s" rather than
"setenv L0 "f90 -c -B100 -s".



Peter