Monday, April 10, 2006

Compiling AMBER 9 on Intel based macintosh with Intel fortran

Normally you just use following commands to compile AMBER 9 on intel based macintosh:

% ./configure -nopar ifort_macosx
% perl -pi -e 's/-L \/usr\/X11R6\/lib/-L\/usr\/X11R6\/lib/' config.h
% make serial
The reason getting rid of the space before /usr/X11R6/lib is that Mac OS X on intel based macintosh does not like space between the path and "-L"..... Don't blame me for forgetting this minor issue. It's more like to be fixed in next patch. :-) If you like to use intel math kernel library, use these:
% env MKL_HOME=$MKL ./configure -nopar ifort_macosx
% perl -pi -e 's/-L \/usr\/X11R6\/lib/-L\/usr\/X11R6\/lib/' config.h
% make serial
For compiling with parallel library, here is an example:
% env MPI_HOME=/opt/lam MKL_HOME=$MKL ./configure -lam ifort_macosx
% perl -pi -e 's/-L \/usr\/X11R6\/lib/-L\/usr\/X11R6\/lib/' config.h
% make serial
(My lam/mpi was installed at /opt/lam, change it to your own lam path.) For more information about the parallel library, try to figure it out from other macintosh resource, I can't promise writing one since it's a little bit tedious...