[Pw_forum] Properly instructing ./configure to locate external libraries

Aldo Ugolotti a.ugolotti at campus.unimib.it
Thu Jul 20 12:20:49 CEST 2017


Dear QE users,

I am having troubles in correctly defining the building environment for 
QE (6.0) in order to tell it to use the already compiled external 
libraries BLAS, BLACS, LAPACK, SCALAPACK, HDF5, FFTW, OPENMPI.

Beforehand I have to say that all libraries paths are set into PATH and 
LD_LIBRARY_PATH environment variables.

If I give the line below I get configure to success, but the lapack 
libraries are set to internal and no hdf5 or scalapack, nor mpi folders 
are reported in conf.log (however the parallel environment is detected):

./configure --prefix=/opt/espresso-6.0_openmpi-2.0.1_gnu_extlibs 
--enable-shared --enable-parallel --with-netlib=yes --with-scalapack=yes 
--with-hdf5=/opt/hdf5-1.10.1/ MPI90=mpifort LIBS="-L/opt/fft3-3.3.6/lib 
-L/opt/hdf5-1.10.1/lib -L/opt/lapack-3.7.0_gnu/ -llapack -lrefblas 
-L/opt/scalapack-2.0.2-ompi-2.0.1_gnu -lscalapack 
-L/opt/mpiblacs/BLACS/LIB/ -lblacs -lblacsF77init 
-L/opt/netcdf-4.4.1.1/installed/lib -lnetcdf 
-L/opt/netcdf-fortran-4.4.4/lib -lnetcdff -L/opt/zlib-1.2.11/lib" 
IFLAGS="-I/opt/fft3-3.3.6/include -I/opt/hdf5-1.10.1/include 
-I/opt/netcdf-4.4.1.1/installed/include 
-I/opt/netcdf-fortran-4.4.4/include -I/opt/zlib-1.2.11/include"

I have the same problem if I specify CPPFLAGS instead of IFLAGS and 
LDFLAGS instead of LIBS.

If I try to directly export the variable I find in the make.inc instead 
with the line below the option are not recognized and even the parallel 
environment is not detected:

./configure --prefix=/opt/espresso-6.0_openmpi-2.0.1_gnu_extlibs 
--enable-shared --enable-parallel --with-netlib=yes --with-scalapack=yes 
--with-hdf5=/opt/hdf5-1.10.1/ MPI90=mpifort 
IFLAGS="-I/opt/fft3-3.3.6/include -I/opt/hdf5-1.10.1/include 
-I/opt/netcdf-4.4.1.1/installed/include 
-I/opt/netcdf-fortran-4.4.4/include -I/opt/zlib-1.2.11/include" 
BLAS_LIBS="-L/opt/lapack-3.7.0_gnu -lrefblas" 
BLAS_LIBS_SWITCH="external" LAPACK_LIBS="-L/opt/lapack-3.7.0_gnu 
-llapack -lrefblas" LAPACK_LIBS_SWITCH="external" 
SCALAPACK_LIBS="-L/opt/scalapack-2.0.2-ompi-2.0.1_gnu -lscalapack" 
FFT_LIBS="-L/opt/fft3-3.3.6/lib -lfftw3" 
HDF5_LIB="-L/opt/hdf5-1.10.1/lib -lhdf5 -lhdf5_fortran -lhdf5_hl 
-lhdf5hl_fortran" MPI_LIBS="-L/opt/openmpi-2.0.1_gnu/lib -lmpi 
-lmpi_mpifh -lmpi_usempif08 -lmpi_usempi_ignore_tkr  -lompitrace 
-lopen-pal -lopen-rte -loshmem"

Can you help me understand what I am missing here, please?

Thanks, regards

-- 
Aldo Ugolotti

Ph. D. student
Department of Materials Science,
University of Milano-Bicocca,
U5, Via R. Cozzi 55,
20125 Milano, Italy.
email: a.ugolotti at campus.unimib.it




More information about the users mailing list