Error in [Linking yambo] in 5.0.4

Having trouble compiling the Yambo source? Using an unusual architecture? Problems with the "configure" script? Problems in GPU architectures? This is the place to look.

Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, andrea marini, Daniele Varsano, Conor Hogan, Nicola Spallanzani

Forum rules
If you have trouble compiling Yambo, please make sure to list:
(1) the compiler (vendor and release: e.g. intel 10.1)
(2) the architecture (e.g. 64-bit IBM SP5)
(3) if the problems occur compiling in serial/in parallel
(4) the version of Yambo (revision number/major release version)
(5) the relevant compiler error message
Post Reply
yhypku
Posts: 20
Joined: Wed Sep 02, 2020 11:10 am

Error in [Linking yambo] in 5.0.4

Post by yhypku » Wed Nov 03, 2021 2:25 pm

Dear developers,
I'm getting an error in the [Linking yambo] step. First I configure with command "./configure CC=icc FC=ifort CPP=cpp MPIFC=mpiifort". I copy the "liblapack.a" and "libblas.a" from compiled lapack-3.9.0 to /yambo-5.0.4/lib/external/intel/mpiifort/lib/. Then during "make all", errors appear as follows.

>>>[Linking yambo]<<<
make[2]: Entering directory `/gpfs/share/home/1500012896/software/yambo-5.0.4/driver'

/gpfs/share/home/1500012896/software/yambo-5.0.4/lib/external/intel/mpiifort/lib/liblapack.a(dtrtri.f.o): In function `dtrtri_':
dtrtri.f:(.text+0x13d): undefined reference to `_gfortran_concat_string'
/gpfs/share/home/1500012896/software/yambo-5.0.4/lib/external/intel/mpiifort/lib/liblapack.a(cgesvd.f.o): In function `cgesvd_':
cgesvd.f:(.text+0x36c): undefined reference to `_gfortran_concat_string'
cgesvd.f:(.text+0x5a8): undefined reference to `_gfortran_concat_string'
cgesvd.f:(.text+0xd21): undefined reference to `_gfortran_concat_string'
/gpfs/share/home/1500012896/software/yambo-5.0.4/lib/external/intel/mpiifort/lib/liblapack.a(chseqr.f.o): In function `chseqr_':
chseqr.f:(.text+0x3bf): undefined reference to `_gfortran_concat_string'
/gpfs/share/home/1500012896/software/yambo-5.0.4/lib/external/intel/mpiifort/lib/liblapack.a(ctrevc3.f.o):ctrevc3.f:(.text+0x1a7): more undefined references to `_gfortran_concat_string' follow
/gpfs/share/home/1500012896/software/yambo-5.0.4/lib/external/intel/mpiifort/lib/liblapack.a(ilaenv.f.o): In function `ilaenv_':
ilaenv.f:(.text+0x59): undefined reference to `_gfortran_compare_string'
ilaenv.f:(.text+0x276): undefined reference to `_gfortran_compare_string'
ilaenv.f:(.text+0x29f): undefined reference to `_gfortran_compare_string'
ilaenv.f:(.text+0x2d9): undefined reference to `_gfortran_compare_string'
ilaenv.f:(.text+0x2fa): undefined reference to `_gfortran_compare_string'
/gpfs/share/home/1500012896/software/yambo-5.0.4/lib/external/intel/mpiifort/lib/liblapack.a(ilaenv.f.o):ilaenv.f:(.text+0x319): more undefined references to `_gfortran_compare_string' follow
/gpfs/share/home/1500012896/software/yambo-5.0.4/lib/external/intel/mpiifort/lib/liblapack.a(xerbla.f.o): In function `xerbla_':
xerbla.f:(.text+0x49): undefined reference to `_gfortran_st_write'
xerbla.f:(.text+0x54): undefined reference to `_gfortran_string_len_trim'
xerbla.f:(.text+0x66): undefined reference to `_gfortran_transfer_character_write'
xerbla.f:(.text+0x76): undefined reference to `_gfortran_transfer_integer_write'
xerbla.f:(.text+0x7e): undefined reference to `_gfortran_st_write_done'
xerbla.f:(.text+0x87): undefined reference to `_gfortran_stop_string'
make[2]: *** [yambo] Error 1
make[2]: Leaving directory `/gpfs/share/home/1500012896/software/yambo-5.0.4/driver'
make[1]: *** [yambo] Error 2
make[1]: Leaving directory `/gpfs/share/home/1500012896/software/yambo-5.0.4'
yambo build failed

Can you tell me how to fix it?
Best,
Huaiyuan
Huaiyuan Yang
Peking University
Beijing, China

andrea.ferretti
Posts: 206
Joined: Fri Jan 31, 2014 11:13 am

Re: Error in [Linking yambo] in 5.0.4

Post by andrea.ferretti » Wed Nov 03, 2021 3:52 pm

Dear Huaiyuan,

it seems your bias and lapack libraries are compiled with gfortran, while you are using the intel compilers, which causes the problem.
I would avoid copying blas and lapack by hand, while I would specify the proper libraries when running configure, eg:

Code: Select all

MKLROOT=/opt/intel/compilers_and_libraries_2020.0.166/linux/mkl

./configure \
  FC=ifort \
  CC=icc \
  --with-fft-libs="-mkl" \
  --with-blas-libs="-L$MKLROOT -lmkl_intel_lp64  -lmkl_sequential -lmkl_core " \
  --with-lapack-libs="-L$MKLROOT -lmkl_intel_lp64  -lmkl_sequential -lmkl_core " \
  --with-scalapack-libs="-L$MKLROOT -lmkl_scalapack_lp64 " \
  --with-blacs-libs="-L$MKLROOT -lmkl_blacs_intelmpi_lp64 " \
[...]
hope it helps
Andrea
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it

Post Reply