`Compilation faied for nwchem-6.3.revision2-src.2013-10-17 with undefined reference


Click here for full thread
Clicked A Few Times
Still I'm getting the error:

fortran -Wl,--export-dynamic -L/opt/ZIP/nwchem-6.3.revision2-src.2013-10-17/lib/LINUX64 -L/opt/ZIP/nwchem-6.3.revision2-src.2013-10-17/src/tools/install/lib -o /opt/ZIP/nwchem-6.3.revision2-src.2013-10-17/bin/LINUX64/nwchem nwchem.o stubs.o -lnwctask -lccsd -lmcscf -lselci -lmp2 -lmoints -lstepper -ldriver -loptim -lnwdft -lgradients -lcphf -lesp -lddscf -ldangchang -lguess -lhessian -lvib -lnwcutil -lrimp2 -lproperty -lnwints -lprepar -lnwmd -lnwpw -lofpw -lpaw -lpspw -lband -lnwpwlib -lnwxc -lcafe -lspace -lanalyze -lqhop -lpfft -ldplot -lnwpython -ldrdy -lvscf -lqmmm -lqmd -letrans -lpspw -ltce -lbq -lcons -lperfm -ldntmc -lccca -lnwcutil -lga -larmci -lpeigs -lperfm -lcons -lbq -lnwcutil /usr//lib64/python2.6/config/libpython2.6.so /app1/centos6.3/gnu/SCIlibs/lib/libscalapack.a -l64to32 /app1/centos6.3/gnu/SCIlibs/lib/libatlas.a -lblas -L/app1/centos6.3/gnu/mvapich2-1.9/lib -lmpichf90 -Wl,-rpath -Wl,/app1/centos6.3/gnu/mvapich2-1.9/lib -lmpich -lopa -lmpl -libmad -lrdmacm -libumad -libverbs -ldl -lrt -lm -lpthread -lnwcutil -lpthread -lutil -ldl
/opt/ZIP/nwchem-6.3.revision2-src.2013-10-17/lib/LINUX64/libdriver.a(lbfgs-b.o): In function `mainlb_':
lbfgs-b.F:(.text+0x94cb): undefined reference to `dlamch_'



My configuration script is here:

  1. !/bin/bash
module load mvapich2_gnu

  1. OPTIONAL environment variables

export LARGE_FILES=TRUE
export USE_NOFSCHECK=TRUE
export LIB_DEFINES="-DDFLT_TOT_MEM=16777216"
export TCGRSH=/usr/local/bin/ssh
export USE_64TO32=yes
export MRCC_THEORY=TRUE


export HAS_BLAS=yes
export LAPACK_LIB="/app1/centos6.3/gnu/SCIlibs/lib/liblapack.a"
export BLASOPT="/app1/centos6.3/gnu/SCIlibs/lib/libatlas.a"

export USE_SCALAPACK=y
export SCALAPACK="/app1/centos6.3/gnu/SCIlibs/lib/libscalapack.a"
export SCALAPACK_SIZE=4


export NWCHEM_MODULES=all
export PYTHONHOME=/usr/
export PYTHONVERSION=2.6
export USE_PYTHON64=y
export PYTHONLIBTYPE=so
export NWCHEM_MODULES="all python"
export FOPTIMIZE=-O1



  1. MPICH
       export MPI_LOC=/app1/centos6.3/gnu/mvapich2-1.9  #location of mpich
export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE=$MPI_LOC/include
export LIBMPI=" -lmpichf90 -Wl,-rpath -Wl,/app1/centos6.3/gnu/mvapich2-1.9/lib -lmpich -lopa -lmpl -libmad -lrdmacm -libumad -libverbs -ldl -lrt -lm -lpthread "
export MPI_CC=mpicc
export MPI_CXX=mpicxx
export ARMCI_NETWORK=OPENIB
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_F90=mpiifort
export FC=mpif90
export CC=mpicc


export NWCHEM_TOP=/opt/ZIP/nwchem-6.3.revision2-src.2013-10-17
cd $NWCHEM_TOP/src
export NWCHEM_TARGET=LINUX64
make clean
make 64_to_32
make nwchem_config
make |tee make.log