Add additional libraries in linking

From NWChem

Viewed 1956 times, With a total of 7 Posts
Jump to: navigation, search

Clicked A Few Times
Threads 7
Posts 20
Dear Developers

I am compiling nwchem-6.6. In the last linking step, it stopped with an error message like "//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line". it seems the linkage requires -lz. I think I need to modify LDFLAGS by adding this missing library, could you please point out the easiest way to do it? Or is there any other means? Thanks!

best wishes

john

Forum Vet
Threads 9
Posts 1498
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?
Edited On 8:48:33 AM PDT - Fri, Oct 9th 2015 by Edoapra

Clicked A Few Times
Threads 7
Posts 20
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
Edited On 1:28:28 PM PDT - Fri, Oct 9th 2015 by Edoapra

Clicked A Few Times
Threads 7
Posts 20
Quote:Jtravers Oct 9th 3:06 pm
Dear Developers

I am compiling nwchem-6.6. In the last linking step, it stopped with an error message like "//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line". it seems the linkage requires -lz. I think I need to modify LDFLAGS by adding this missing library, could you please point out the easiest way to do it? Or is there any other means? Thanks!

best wishes

john
Edited On 11:55:47 AM PDT - Fri, Oct 9th 2015 by Jtravers

Forum Vet
Threads 9
Posts 1498
Could you please try the following

unset PYTHONCONFIGDIR
export USE_PYTHONCONFIG=y

This is going to work only if your Python installation (under the /usr tree, I presume) has python-config.
If python-config is not present, you will need to install python-dev by typing on your debian box

sudo apt-get install python-dev

You would need to that location of python-config listed in your PATH
Please let me know if this solution works for you.
Edited On 1:26:48 PM PDT - Fri, Oct 9th 2015 by Edoapra

Clicked A Few Times
Threads 7
Posts 20
Quote:Edoapra Oct 9th 7:31 pm
Could you please try the following

unset PYTHONCONFIGDIR
export USE_PYTHONCONFIG=y

This is going to work only if your Python installation (under the /usr tree, I presume) has python-config.
If python-config is not present, you will need to install python-dev by typing on your debian box

sudo apt-get install python-dev

You would need to that location of python-config listed in your PATH
Please let me know if this solution works for you.



It did not work and python-config was installed at /usr/bin

Forum Vet
Threads 9
Posts 1498
Could please post
1) full output of the command (sorry for asking again, but I would like to know when happens in your case when USE_PYTHONCONFIG=y is defined)

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

2) output of the command
python-config --libs


PS The recipe I gave you works for me on Debian ... I would like to understand what is causing your failure.

Clicked A Few Times
Threads 7
Posts 20
Quote:Edoapra Oct 9th 10:44 pm
Could please post
1) full output of the command (sorry for asking again, but I would like to know when happens in your case when USE_PYTHONCONFIG=y is defined)

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

2) output of the command
python-config --libs


PS The recipe I gave you works for me on Debian ... I would like to understand what is causing your failure.


Now It worked with your recipe. (sorry, i had a typo in exporting some of the env variables.

Thanks!


Forum >> NWChem's corner >> Compiling NWChem



Who's here now Members 0 Guests 1 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC