Discussion:
[Pw_forum] Properly instructing ./configure to locate external libraries
Aldo Ugolotti
2017-07-20 10:20:49 UTC
Permalink
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: ***@campus.unimib.it
Lorenzo Paulatto
2017-07-20 11:40:46 UTC
Permalink
Hello Aldo,
if you start with just
./configure MPIF90=mpiifort
(check the number of "i")
does it detect the parallel environment properly?

Anyway, if you want bit of some usefull advice you should provide your
config.log

hth
Post by Aldo Ugolotti
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
./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
./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.
_______________________________________________
Pw_forum mailing list
http://pwscf.org/mailman/listinfo/pw_forum
--
Dr. Lorenzo Paulatto
IdR @ IMPMC -- CNRS & Université Paris 6
phone: +33 (0)1 442 79822 / skype: paulatz
www: http://www-int.impmc.upmc.fr/~paulatto/
mail: 23-24/421 Boîte courrier 115, 4 place Jussieu 75252 Paris CX 05
Aldo Ugolotti
2017-07-20 12:17:00 UTC
Permalink
Dear Lorenzo,
Post by Lorenzo Paulatto
Hello Aldo,
if you start with just ./configure MPIF90=mpiifort (check the number of "i") does it detect the parallel environment properly?
in my case mpifort is the right compiler, built from the openmpi
libraries (it also creates mpif90, but in their notes it is written to
select the former).
Post by Lorenzo Paulatto
Anyway, if you want bit of some usefull advice you should provide your config.log
Sure, here are the config.log and make.inc create for the first and
second command, respectively.

https://file.town/download/xk46wt1v0sllh5wawryn0tcfr - config.log_1
https://file.town/download/cezxmppyvm60zev3wk1gzhmxz - make.inc_1

https://file.town/download/ygmfpkkrlhxj7n74y5sk6gwu4 - config.log_2
https://file.town/download/1uhk3oub9vmhpme2aq0nveu6h - make.inc_2

Thanks,

Aldo
--
Aldo Ugolotti

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