compile NWCHEM 6.5 ubuntu 14.04 ld error


Clicked A Few Times
Hi,

I am trying to install NWCHEM 6.5 on ubuntu 14.04 using the build_nwchem script and the following variables :

export NWCHEM_TOP=/home/guillaume/nwchem-6.5
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all"
export NWCHEM_MPIF_WRAP=/usr/bin/mpif90
export NWCHEM_MPIC_WRAP=/usr/bin/mpicc
export NWCHEM_MPICXX_WRAP=/usr/bin/mpicxx
export NWCHEM_LONG_PATHS=Y
export USE_NOFSCHECK=Y
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_INCLUDE="-I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib"
export MPI_LIB="-L/usr//lib -L/usr/lib/openmpi/lib"
export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -lhwloc"
export FC=gfortran
export CC=gcc
export CXX=g++
export ARMCI_NETWORK=
export MSG_COMMS=MPI
export PYTHON_EXE=/usr/bin/python2.7
export PYTHONVERSION=2.7
export PYTHONHOME=/usr
export PYTHONLIBTYPE=a

but I have some issue with the python libraries so I apply a patch with this setup :

1) cd $NWCHEM_TOP/src
2) wget http://nwchemgit.github.io/images/Pythonconfigdir.patch.gz
3) gzip -d Pythonconfigdir.patch.gz
4) patch -p0 < Pythonconfigdir.patch
5) export PYTHONCONFIGDIR=config-x86_64-linux-gnu

I compile the code with :

make FC=$FC ; pushd $NWCHEM_TOP/src ; make FC=$FC link ; popd

and the patch resolve the problem from the python lib.

However, I obtain this message :

/usr/bin/ld: cannot find -ldangchang
/usr/bin/ld: cannot find -lnwmd
/usr/bin/ld: cannot find -lcafe
/usr/bin/ld: cannot find -lspace
/usr/bin/ld: cannot find -lanalyze
/usr/bin/ld: cannot find -lnwpython
/usr/bin/ld: cannot find -ldrdy
/usr/bin/ld: cannot find -lvscf
/usr/bin/ld: cannot find -lqmmm
/usr/bin/ld: cannot find -lqmd
/usr/bin/ld: cannot find -letrans
/usr/bin/ld: cannot find -ltce
/usr/bin/ld: cannot find -ldntmc
/usr/bin/ld: cannot find -lccca
collect2: error: ld returned 1 exit status
make: *** [link] Error 1



Can you help me please?

Thank you,
Guillaume

Gets Around
Hi, Guillaume.

I have no problem compiling NWCHEM on ubuntu 14.04. My way is:
Install ubutnu server 14.04 wherever you want:

Install all the required packages, make link instead of the patch:
sudo apt-get install build-essential
sudo apt-get install python-dev zlib1g-dev libssl-dev gfortran
sudo ln -s /usr/lib/python-2.7/config-x86_64-linux-gnu /usr/lib/python-2.7/config


Exporting the necessary system variables
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONVERSION=2.7
export PYTHONHOME=/usr


I'm using openblas, so install it.
#1a. openblas
sudo apt-get install libopenblas-dev
export BLASOPT="-L/usr/lib/openblas-base -lopenblas"
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openblas-base


Instead, you can use: system default blas, atlas, acml (AMD Core Math Library), ...

Install MPI and exporting the necessary system variables if you want
sudo apt-get install libopenmpi-dev openmpi-bin
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib


If you want using MRCC http://nwchemgit.github.io/index.php/Release65:TCE#State-Specific_Multireference_Coupled_Clu...
you welcome!
export MRCC_METHODS=y


compile
export FC=gfortran
cd $NWCHEM_TOP/src
make clean > clean.log 2>&1
make nwchem_config > config.log 2>&1
make > make.log 2>&1


If you want to configure memory usage, install csh and configure
sudo apt-get install csh
cd ../contrib
./getmem.nwchem


so you get NWCHEM binary in $NWCHEM_TOP/bin/LINUX64/nwchem

Edit your ~/.bashrc and add
export NWCHEM_TOP= 'you nwchem top dir'
export NWCHEM_EXECUTABLE=$NWCHEM_TOP/bin/LINUX64/nwchem
export NWCHEM_BASIS_LIBRARY=$NWCHEM_TOP/src/basis/libraries/
export NWCHEM_NWPW_LIBRARY=$NWCHEM_TOP/src/nwpw/libraryps/
export FFIELD=amber
export AMBER_1=$NWCHEM_TOP/src/data/amber_s/
export AMBER_2=$NWCHEM_TOP/src/data/amber_q/
export AMBER_3=$NWCHEM_TOP/src/data/amber_x/
export AMBER_4=$NWCHEM_TOP/src/data/amber_u/
export SPCE=$NWCHEM_TOP/src/data/solvents/spce.rst
export CHARMM_S=$NWCHEM_TOP/src/data/charmm_s/
export CHARMM_X=$NWCHEM_TOP/src/data/charmm_x/
export PATH=$PATH:$NWCHEM_TOP/bin/LINUX64


use NWCHEM.

Clicked A Few Times
Hi Vladimir,


Thank you very much for your really clear answer.

I had to change the code for the link :

sudo ln -s /usr/lib/python2.7/config-x86_64-linux-gnu /usr/lib/python2.7/config


I followed exactly the list of your command but when I want to compile NWCHEM with

export FC=gfortran
cd $NWCHEM_TOP/src
make clean > clean.log 2>&1
make nwchem_config > config.log 2>&1
make > make.log 2>&1


It takes 2 or 3 minutes and nothing seems to appear. There is no excutable in the $NWCHEM_TOP/bin/LINUX64/nwchem directory.

I do not know what happens during the installation. Could you help me again?

Thank you very much!
Guillaume

Gets Around
Hi, Guillaume.

Compiling takes abount 40 min for me. Look in clean.log, config.log, make.log. In these files recorded an "events" of the compilation process. File size of make.log after the completion of the compilation process is about 800 Mb.

P.S. sorry for inaccuracy, executable is a file $NWCHEM_TOP/bin/LINUX64/nwchem


Forum >> NWChem's corner >> Compiling NWChem