I installed it in a mid 2011 iMac, and used gcc compilers. First, get the right compilers (or make sure gcc5, or alike, is installed).
sudo port install gcc5 +gfortran+universal
(I needed to make symbolic links in /opt/local/bin for gfortran, gcc, g++, and cpp. Port installs them as gsomething-mp-5). Also make sure you have mpich. If not, type
sudo port install mpich-gcc5
then
sudo port select –set mpi mpich-gcc5-fortran
This last step is to use the mpi commands linked to gcc, instead of clang.
Download nwchem-6.6 from here, and extract the .tar.gz file into some folder. The environmental variables are:
export NWCHEM_TOP=`pwd`
export NWCHEM_MODULES=“all“
export NWCHEM_TARGET=MACX64
export CFLAGS_FORGA=“-DMPICH_NO_ATTR_TYPE_TAGS“
export USE_MPI=“y“
export USE_MPIF=“y“
export USE_MPIF4=“y“
export CFLAGS_FORGA=“-DMPICH_NO_ATTR_TYPE_TAGS“
export LIBMPI=“ -lmpifort -lmpi -lpmpi -lpthread“
export BLASOPT=“ “
export FC=gfortran
export CC=gcc
To compile:
cd $NWCHEM_TOP/src
make nwchem_config
make
All these variables and make commands can be written into a my_comp.sh file and just be run as “sh my_comp.sh”. I ran some QA tests and they looked fine. Finally, note that blasopt is empty. NWChem uses its internal BLAS. I tried to compile ATLAS to get optimize libraries but failed in the attempt :_( Apparently, ATLAS has some issues working with Apple machines from Hell.