Nwchem6.5 Cannot be Compiled on MAC OS X10.9.5


Forum Vet
I followed the new instructions, but still cannot finish NWCHEM6.5 compilation on MAC OS X 10.9.5.
The error messages are:
......
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yeschecking for C compiler vendor... gnu
checking whether a simple C MPI program compiles... no
configure: error: in `/Users/computation2/Nwchem6.5/src/tools/build':
configure: error: could not compile simple C MPI program
See `config.log' for more details
make[1]: *** [build/config.status] Error 1
make: *** [libraries] Error 1



I have already installed openmpi 1.8.1 in the computer for Dalton2013.4, and also have installed mpich2 by Homebrew without root password.

Forum Vet
coould please report the following output from Mac

mpif90 -show

env|grep MPI_

Forum Vet
BASH-3.2# mpif90 -show
/usr/local/bin/gfortran -Wl,-flat_namespace -I/usr/local/Cellar/mpich2/3.1.2/include -I/usr/local/Cellar/mpich2/3.1.2/include -L/usr/local/Cellar/mpich2/3.1.2/lib -lmpifort -lmpi -lpmpi -lpthread
BASH-3.2# env|grep MPI_
USE_MPI=yes
CFLAGS_FORGA=-DMPICH_NO_ATTR_TYPE_TAGS
BASH-3.2#

Forum Vet
Xiongyan21
You have not defined the MPI env. variables yet.
Please use the following
export MPI_INCLUDE=/usr/local/Cellar/mpich2/3.1.2/include
export MPI_LIB=/usr/local/Cellar/mpich2/3.1.2/lib
export LIBMPI=" -lmpifort -lmpi -lpmpi -lpthread"

PS Use of CAPITAL LETTERS in a forum entry is not considered very polite

Forum Vet
Thanks very much for your kind advice. Now the compilation is successful, but with some warnings.
The message from the bash is
......
/bin/rm -f nwchem.o stubs.o
nwchem is built

Clicked A Few Times
Same problem with compiling 6.5 on MacOS X 10.9.5
I'm having the same problem that Xiongyan21 reported earlier in this thread. I have a similar environment except I'm using the macports version of mpich. (I've also tried the macports version of openmpi.)

Here's the information that you requested earlier:

$ mpif90 -show
/opt/local/bin/gfortran-mp-4.8 -pipe -m64 -Wl,-headerpad_max_install_names -Wl,-flat_namespace -I/opt/local/include/mpich-gcc48 -I/opt/local/include/mpich-gcc48 -L/opt/local/lib/mpich-gcc48 -lmpifort -lmpi -lpmpi -lpthread

$ env | grep MPI_
MPI_INCLUDE=/opt/local/include/mpich-gcc
MPI_LIB=/opt/local/lib/mpich-gcc

I can post the config.log if desired. I'd be grateful for any help that anyone can offer. Thanks!

Forum Vet
Quote:Rpmuller Oct 17th 11:32 am
I'm having the same problem that Xiongyan21 reported earlier in this thread. I have a similar environment except I'm using the macports version of mpich. (I've also tried the macports version of openmpi.)

Here's the information that you requested earlier:

$ mpif90 -show
/opt/local/bin/gfortran-mp-4.8 -pipe -m64 -Wl,-headerpad_max_install_names -Wl,-flat_namespace -I/opt/local/include/mpich-gcc48 -I/opt/local/include/mpich-gcc48 -L/opt/local/lib/mpich-gcc48 -lmpifort -lmpi -lpmpi -lpthread

$ env | grep MPI_
MPI_INCLUDE=/opt/local/include/mpich-gcc
MPI_LIB=/opt/local/lib/mpich-gcc

I can post the config.log if desired. I'd be grateful for any help that anyone can offer. Thanks!


What about LIBMPI?
It should be
LIBMPI="-lmpifort -lmpi -lpmpi -lpthread"

Please post config.log if you still get a failure

Clicked A Few Times
You really *do* need mpich2
Okay, I did the obvious step of installing mpich2 from homebrew. Everything works now. I guess there's something in mpich2 that isn't in mpich or openmpi that is needed to make nwchem compile properly.

In any case, should anyone else have similar problems, I thought I'd document what I did:

Compilers: gcc 4.8 via macports, with gfortran, obviously
MPI: mpich2 via homebrew

environment:
export NWCHEM_TOP=/Users/rmuller/Programs/nwchem/nwchem-6.5
export NWCHEM_TARGET="MACX64"
export NWCHEM_MODULES="qm"
export USE_MPI="y"
export USE_MPIF="y"
export USE_MPIF4="y"
export CFLAGS_FORGA="-DMPICH_NO_ATTR_TYPE_TAGS"
export MPI_INCLUDE="/usr/local/include"
export MPI_LIB="/usr/local/lib"
export LIBMPI=" -lmpifort -lmpi -lpmpi -lpthread"

Forum Vet
The compilation of Nwchem6.5 has been successful on MAC OS X 10.10.2, the newest, with MPICH2 version 3.1.3_1 and Gfortran-4.9.2, although there are some warnings.

Forum Vet
While Nwchem6.5 has been successfully built on MAC OS X 10.10.5 with mpich2 3.1.4_1 and Gfortran 4.9.2, NWchem6.6 is eagerly expected to be released.


Forum >> NWChem's corner >> Compiling NWChem