NWChem 6.1 linking problem


Gets Around
Hi,

i'm trying to kompile on x86_64 using external blas/lapack libraries and see the following problem:

1. the link stage src/MakeFile line 51 does not seem to contain references to BLAS_LIB (nor BLASOPT nor SCALAPACK_LIB).
Even with BLAS_LIB set to, for example "-L/usr/lib/atlas -llapack -lf77blas -lcblas -latlas", it is not used at link stage.
Putting all blas/lapack (and scalapack linking lines) into MPI_LIB works and results with (Fedora 16):

gfortran ... nwchem nwchem.o ... -l64to32 -llapack -lblas -L/usr/lib64/openmpi/lib -L/usr/lib64/openmpi/lib -lmpi -lopen-pal -lopen-rte -lmpi_f90 -lmpi_f77 -L/usr/lib64/atlas -llapack -lf77blas -lcblas -latlas

Note that one still is unable to post on the forum the "kompile" word spelled with c.
It's possible to have compile
at the end of the line.

Marcin

Forum Vet
On what kind of OS are you trying to compile? Pointing to MakeFile suggests native Windows. All others use the GNUMakefile.

For non-windows platforms this should work:

   setenv BLASOPT "-L/usr/local/ATLAS -lf77blas -lcblas -latlas" 

Note, a lot of link variables are brought in through the config/makefile.h.

Bert




Quote:Marcindulak Feb 8th 7:26 pm
Hi,

i'm trying to kompile on x86_64 using external blas/lapack libraries and see the following problem:

1. the link stage src/MakeFile line 51 does not seem to contain references to BLAS_LIB (nor BLASOPT nor SCALAPACK_LIB).
Even with BLAS_LIB set to, for example "-L/usr/lib/atlas -llapack -lf77blas -lcblas -latlas", it is not used at link stage.
Putting all blas/lapack (and scalapack linking lines) into MPI_LIB works and results with (Fedora 16):

gfortran ... nwchem nwchem.o ... -l64to32 -llapack -lblas -L/usr/lib64/openmpi/lib -L/usr/lib64/openmpi/lib -lmpi -lopen-pal -lopen-rte -lmpi_f90 -lmpi_f77 -L/usr/lib64/atlas -llapack -lf77blas -lcblas -latlas

Note that one still is unable to post on the forum the "kompile" word spelled with c.
It's possible to have compile
at the end of the line.

Marcin

Forum Vet
new tarball available with fixes for tools compilation
Marcin,
We have just uploaded a new 6.1 source tarball that should address most of the problems you have encountered trying to link with optimized Blas and Scalapack. Please use just the following settings (and neither BLAS_LIB nor SCALAPACK_LIB)
USE_SCALAPACK=y
SCALAPACK="Scalapack and Blacs library location"
BLASOPT="Blas and Lapack library location"

Gets Around
thanks. i confirm that linking to atlas works now on Fedora 16 x86_64 (with the latest nwchem-6.1 source).

Note that in order to build python support I had to introduce the PYTHONLIBTYPE variable into config/makefile.h.
Some distributions use libpython.a others libpython.so.
Could you introduce this variable to the next relese on nwchem?

Just for reference the following works:

export MPIEXEC=/usr/lib64/openmpi/bin/mpiexec
export LARGE_FILES=TRUE
export USE_NOFSCHECK=TRUE
export TCGRSH=ssh
export NWCHEM_TOP=/rpmbuild/BUILD/nwchem-6.1.test
export NWCHEM_TARGET=LINUX64
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/lib64/openmpi/
export MPI_LIB=/usr/lib64/openmpi/lib
export MPI_INCLUDE=/usr/include/openmpi-x86_64
export PYTHONHOME=/usr
export PYTHONVERSION=2.7
export USE_PYTHON64=y
export 'LIBMPI=-L/usr/lib64/openmpi/lib -lmpi -lopen-pal -lopen-rte -lmpi_f90 -lmpi_f77'
export HAS_BLAS=yes
export 'BLASOPT=-L/usr/lib64/atlas -llapack -lf77blas -lcblas -latlas'
export CC=gcc
export FC=gfortran
export PYTHONLIBTYPE=so
sed -i 's/libpython$(PYTHONVERSION).a/libpython$(PYTHONVERSION).$(PYTHONLIBTYPE)/g' config/makefile.h
make nwchem_config 'NWCHEM_MODULES=all python' 2>&1 | tee make.nwchem_config.log
make 64_to_32 2>&1 | tee make.64_to_32.log
make USE_64TO32=y 2>&1 | tee make.log

Marcin

Forum Vet
PYTHONLIBTYPE
Marcin,
Thanks for the feedback.
I have just added PYTHONLIBTYPE.
Please let me know if using Python shared libraries (instead of static) does not break any functionality.

Edo

Gets Around
Hi,

i'm confused a bit. I have downloaded http://nwchemgit.github.io/images/Nwchem-6.1-2012-Feb-10.tar.gz
but it does not have PYTHONLIBTYPE in src/config/makefile.h:
$ grep "config\/libpython" src/config/makefile.h
CORE_LIBS += $(PYTHONHOME)/lib64/python$(PYTHONVERSION)/config/libpython$(PYTHONVERSION).a
CORE_LIBS += $(PYTHONHOME)/lib/python$(PYTHONVERSION)/config/libpython$(PYTHONVERSION).a

nor gnuplot problem is fixed:
http://nwchemgit.github.io/Special_AWCforum/st/id350/contrib/python/Gnuplot.py_inc...

Marcin

Forum Vet
Marcin,
I put the two fixes in the development version. We do not plan to update 6.1 at this point.
The fixes will be available in upcoming release versions and earlier development snapshots.
Edo

Quote:Marcindulak Feb 17th 6:48 am
Hi,

i'm confused a bit. I have downloaded http://nwchemgit.github.io/images/Nwchem-6.1-2012-Feb-10.tar.gz
but it does not have PYTHONLIBTYPE in src/config/makefile.h:
$ grep "config\/libpython" src/config/makefile.h
CORE_LIBS += $(PYTHONHOME)/lib64/python$(PYTHONVERSION)/config/libpython$(PYTHONVERSION).a
CORE_LIBS += $(PYTHONHOME)/lib/python$(PYTHONVERSION)/config/libpython$(PYTHONVERSION).a

nor gnuplot problem is fixed:
http://nwchemgit.github.io/Special_AWCforum/st/id350/contrib/python/Gnuplot.py_inc...

Marcin

Gets Around
OK


Forum >> NWChem's corner >> Compiling NWChem