Add additional libraries in linking


Click here for full thread
Clicked A Few Times
Quote:Edoapra Oct 9th 3:46 pm
Could you please send
1) env. variables you have set
2) full output of the command

cd $NWCHEM_TOP/src
make link
(or make FC=... link)

3) What linux distribution and version are you using?


Here they are

export CC=icc
export FC=ifort
export CXX=icpc
export LARGE_FILES=TRUE
export USE_NOFSCHECK=TRUE
export LIB_DEFINES="-DDFLT_TOT_MEM=16777216"

export CCSDTQ=y
export CCSDTLR=y
export MRCC_THEORY=TRUE

export NWCHEM_TOP=/opt/apps/nwchem-6.6
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y

export MPI_LOC=/opt/apps//openmpi-1.10.0-intel-15.0.4-i4


export MPI_LIB=$MPI_LOC/lib
export MPI_INCLUDE=$MPI_LOC/include


export LIBMPI="-Wl,-rpath -Wl,/opt/apps//openmpi-1.10.0-intel-15.0.4-i4/lib -Wl,--enable-new-dtags -L/opt/apps/openmpi-1.10.0-intel-15.0.4-i4/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lpthread"


export MSG_COMMS=MPI
export ARMCI_NETWORK=OPENIB
export IB_INCLUDE=/usr/include/infiniband
export IB_LIB=/usr/lib
export IB_LIB_NAME="-libverbs -libumad -lpthread"
export PYTHONHOME=/usr
export PYTHONVERSION=2.7
export PYTHON_EXE=/usr/bin/python
export PYTHONCONFIGDIR=config-x86_64-linux-gnu
export MKLROOT=/opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl
export MKLINCLUDE=/opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl/include
export HAS_BLAS=y

export BLASOPT="$MKLROOT/lib/intel64/libmkl_scalapack_ilp64.a $MKLROOT/lib/intel64/libmkl_lapack95_ilp64.a $MKLROOT/lib/intel64/libmkl_blas95_ilp64.a -Wl,--start-group $MKLROOT/lib/intel64/libmkl_cdft_core.a $MKLROOT/lib/intel64/libmkl_intel_ilp64.a $MKLROOT/lib/intel64/libmkl_core.a $MKLROOT/lib/intel64/libmkl_sequential.a -Wl,--end-group $MKLROOT/lib/intel64/libmkl_blacs_intelmpi_ilp64.a -lpthread -lm"

export BLAS_SIZE=8
export BLAS_I8=yes
export SCALAPACK_SIZE=8

export SCALAPACK_LIB="$BLASOPT"
export USE_SCALAPACK=y

export LAPACK_SIZE=8
export LAPACK_LIB="$BLASOPT"




Here is the linking part with error message


ifort -i8 -align -fpp -qopt-report-file=stderr -fimf-arch-consistency=true -finline-limit=250 -O2 -g -fp-model source -Wl,--export-dynamic -L/opt/apps/nwchem-6.6/lib/LINUX64 -L/opt/apps/nwchem-6.6/src/tools/install/lib -o /opt/apps/nwchem-6.6/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 -lsolvation -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 -lmm -lcons -lperfm -ldntmc -lccca -lnwcutil -lga -larmci -lpeigs -lperfm -lcons -lbq -lnwcutil /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.a /opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl/lib/intel64/libmkl_scalapack_ilp64.a /opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl/lib/intel64/libmkl_lapack95_ilp64.a /opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl/lib/intel64/libmkl_blas95_ilp64.a -Wl,--start-group /opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl/lib/intel64/libmkl_cdft_core.a /opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl/lib/intel64/libmkl_intel_ilp64.a /opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl/lib/intel64/libmkl_core.a /opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl/lib/intel64/libmkl_sequential.a -Wl,--end-group /opt/apps/intel/Xe2015Update5/composer_xe_2015.5.223/mkl/lib/intel64/libmkl_blacs_intelmpi_ilp64.a -lpthread -lm -lnwcblas -L/opt/apps/openmpi-1.10.0-intel-15.0.4-i4/lib -Wl,-rpath -Wl,/opt/apps/openmpi/openmpi-1.10.0-intel-15.0.4-i4/lib -Wl,--enable-new-dtags -L/opt/apps/openmpi-1.10.0-intel-15.0.4-i4/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lpthread -libverbs -libumad -lpthread -L/usr/lib -lrt -lnwcutil -lpython2.7 -lpthread -ldl -lutil -lm
/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.a(posixmodule.o): In function `posix_tmpnam':
(.text.unlikely+0xff8): warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.a(posixmodule.o): In function `posix_tempnam':
(.text.unlikely+0xf01): warning: the use of `tempnam' is dangerous, better use `mkstemp'
ld: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.a(zlibmodule.o): undefined reference to symbol 'inflateInit2_'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line



If I manually add -lz to the last link part, then the compilation will finish with no error. But I cannot find the nwchem executable.


the linux version is 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux