parllel NWChem 6.1.1 vs Ubuntu 12.04


Just Got Here
HI everybody,
I'm trying to <ompile NWChem 6.1.1 on Ubuntu, using MPICH as the parallel library.
The error I get is:

cmpif90 -c -i8 -g  -I.  -I/home/jacopo/Scaricati/nwchem-6.1.1-src/src/include -I/home/jacopo/Scaricati/nwchem-6.1.1-src/src/tools/install/include -DEXT_INT -DLINUX -DLINUX64 -DPARALLEL_DIAG -DBASIS_LIBRARY="'/home/jacopo/Scaricati/nwchem-6.1.1-src/src'"  basis.F
mpif90 -c -i8 -g  -I.  -I/home/jacopo/Scaricati/nwchem-6.1.1-src/src/include -I/home/jacopo/Scaricati/nwchem-6.1.1-src/src/tools/install/include -DEXT_INT -DLINUX -DLINUX64 -DPARALLEL_DIAG -DBASIS_LIBRARY="'/home/jacopo/Scaricati/nwchem-6.1.1-src/src'"  bas_input.F
gfortran: error: unrecognized command line option -i8
gfortran: error: unrecognized command line option -i8
make[1]: *** [/home/jacopo/Scaricati/nwchem-6.1.1-src/lib/LINUX64/libnwcutil.a(basis.o)] Errore 1
make[1]: *** Attesa per i processi non terminati....
make[1]: *** [/home/jacopo/Scaricati/nwchem-6.1.1-src/lib/LINUX64/libnwcutil.a(bas_input.o)] Errore 1
make: *** [libraries] Errore 1


both using commands

make FC=mpif90 CC=mpicc

and
make FC=mpif90.mpich2 CC=mpicc.mpich2


My variables:
$LIBMPI: -lmpich -lopa -lmpl -lrt -lpthread
$MPI_LIB:  /usr/lib/mpich2/lib/


Any idea on what could be wrong?
Thank you!

Forum Regular
Hi Clef,
The Makefiles in NWChem use the compiler names to figure out which flags to set for optimization, promoting integers to 64-bit varieties, etc. The usual MPI wrappers such as mpif90 and mpicc hide the actual compiler used from make. Hence it is guessing the flags wrong. So you either have to run make for example as:

   make FC=gfortran CC=gcc

or

   make FC=ifort CC=icc

depending on which compiler you have. Alternatively if you are working in a simple Linux environment you might try

  cd nwchem-6.1.1
./contrib/distro-tools/build_nwchem

That script will query the MPI installation to work out which compilers you are using and pass the correct compiler specifications to make. However, since the nwchem-6.1.1 release various issues have been fixed in that script so you have to use it with care.
I hope this helps,
Huub


Forum >> NWChem's corner >> Compiling NWChem