error 1: K_stored_in_a_slepc_matrix.o in compiling Yambo 5.1.1

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
ljzhou86
Posts: 85
Joined: Fri May 03, 2013 10:20 am

error 1: K_stored_in_a_slepc_matrix.o in compiling Yambo 5.1.1

Post by ljzhou86 » Fri Jan 27, 2023 5:42 pm

Dear Sir

I am installing the latest version of Yambo-5.1.1 by using the script:

Code: Select all

module load intel/2018 gcc/9.3.0 openmpi/4.0.3-gcc-9.3.0 petsc/3.14.6 slepc/3.14.2 
export CC=gcc
export FC=gfortran
export MPIFC=mpif90
export MPIF77=mpif77
export MPICC=mpicc

./configure  \
    --enable-open-mp --enable-mpi --enable-par-linalg --enable-slepc-linalg --enable-hdf5-par-io \
    --enable-msgs-comps --enable-time-profile --enable-memory-profile \
    --enable-hdf5-compression  --enable-hdf5-p2y-support \
    --enable-debug-flags \
    --with-blas-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl" \
    --with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl" \
    --with-scalapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64" \
    --with-blacs-libs="-L${MKLROOT}/lib/intel64 -lmkl_blacs_intelmpi_lp64" \
    --with-fft-includedir="${MKLROOT}/include" \
    --with-fft-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl" \
     --with-petsc-path=/opt/software/petsc-3.14.6  --with-slepc-path=/opt/software/slepc-3.14.2
It works fine. Then I proceed to the next step of "make all", but got the following errors. What is the reason? And how to fix it? Thanks a lot.

Code: Select all

(eval mpif90 -c -Og -g -Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow   -fopenmp  -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include/headers/common -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include/headers/parser -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/yambo/driver/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include/driver -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/include/  -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/v4/parallel/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/v4/parallel/include -I/opt/software/petsc-3.14.6/include -I/opt/software/slepc-3.14.2/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/v4/parallel/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/include -I/opt/software/intel2018/compilers_and_libraries_2018.1.163/linux/mkl//include   -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/yambo/driver/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include/driver K_stored_in_a_slepc_matrix.f90  >> /opt/packages/yambo/5.1.1/yambo-5.1.1/log/"compile_"yambo".log" 2>&1)
make[2]: *** [K_stored_in_a_slepc_matrix.o] Error 1
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
In the log/compile_yambo.log, I found some bug information. Hope it could help address this issue.

Code: Select all

...
mpif90 -c -Og -g -Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow   -fopenmp  -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include/headers/common -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include/headers/parser -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/yambo/driver/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include/driver -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/include/  -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/v4/parallel/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/v4/parallel/include -I/opt/software/petsc-3.14.6/include -I/opt/software/slepc-3.14.2/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/v4/parallel/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/external/gfortran/mpif90/include -I/opt/software/intel2018/compilers_and_libraries_2018.1.163/linux/mkl//include   -I/opt/packages/yambo/5.1.1/yambo-5.1.1/lib/yambo/driver/include -I/opt/packages/yambo/5.1.1/yambo-5.1.1/include/driver K_stored_in_a_slepc_matrix.f90
K_stored_in_a_slepc_matrix.f90:687:11:

  687 |        Mij=BS_blk(i_B)%mat(i_r,i_c)
      |           1
Warning: Possible change of value in conversion from COMPLEX(4) to REAL(8) at (1) [-Wconversion]
K_stored_in_a_slepc_matrix.f90:692:13:

  692 |          Mij=real(Mij)+BSS_eh_E(H_pos(1)+H_shift(1)+1)*cONE
      |             1
Warning: Possible change of value in conversion from COMPLEX(4) to REAL(8) at (1) [-Wconversion]
K_stored_in_a_slepc_matrix.f90:694:15:

  694 |            Mij=Mij+cI*BSS_eh_W(H_pos(1)+H_shift(1)+1)
      |               1
Warning: Possible change of value in conversion from COMPLEX(8) to REAL(8) at (1) [-Wconversion]
K_stored_in_a_slepc_matrix.f90:702:66:

  702 |            call MatSetValue( slepc_mat, H_pos(2), H_pos(1), conjg(Mij), INSERT_VALUES, ierr )
      |                                                                  1
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
K_stored_in_a_slepc_matrix.f90:705:90:

  705 |            call MatSetValue( slepc_mat, H_pos(1)+SL_K_dim(1), H_pos(2)+SL_K_dim(1),-conjg(Mij), INSERT_VALUES, ierr )
      |                                                                                          1
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
K_stored_in_a_slepc_matrix.f90:712:78:

  712 |            call MatSetValue( slepc_mat, H_pos(2)+SL_K_dim(1), H_pos(1),-conjg(Mij), INSERT_VALUES, ierr )
      |                                                                              1
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
K_stored_in_a_slepc_matrix.f90:716:80:

  716 |              call MatSetValue( slepc_mat, H_pos(1)+SL_K_dim(1), H_pos(2),-conjg(Mij), INSERT_VALUES, ierr )
      |                                                                                1
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
K_stored_in_a_slepc_matrix.f90:722:90:

  722 |            call MatSetValue( slepc_mat, H_pos(2)+SL_K_dim(1), H_pos(1)+SL_K_dim(1), conjg(Mij), INSERT_VALUES, ierr )
      |                                                                                          1
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
K_stored_in_a_slepc_matrix.f90:725:66:

  725 |            call MatSetValue( slepc_mat, H_pos(2), H_pos(1), conjg(Mij), INSERT_VALUES, ierr )
      |                                                                  1
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX
K_stored_in_a_slepc_matrix.f90:730:78:

  730 |            call MatSetValue( slepc_mat, H_pos(2), H_pos(1)+SL_K_dim(1),-conjg(Mij), INSERT_VALUES, ierr )
      |                                                                              1
Error: ‘z’ argument of ‘conjg’ intrinsic at (1) must be COMPLEX"
Dr. Zhou Liu-Jiang
Fujian Institute of Research on the Structure of Matter
Chinese Academy of Sciences
Fuzhou, Fujian, 350002

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

Re: error 1: K_stored_in_a_slepc_matrix.o in compiling Yambo 5.1.1

Post by andrea.ferretti » Fri Jan 27, 2023 6:18 pm

Dear Zhou,

thanks for reporting.
This is a compilation bug which entered in v5.1.1 .
Apparently it was fixed last october, eg in the master of the yambo public repo
https://github.com/yambo-code/yambo/blo ... c_matrix.F

you can either patch v5.1.1 from there (eg just overwrite the offending file above, note the capital .F),
or clone the master branch of the repo

best
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

User avatar
Nicola Spallanzani
Posts: 62
Joined: Thu Nov 21, 2019 10:15 am

Re: error 1: K_stored_in_a_slepc_matrix.o in compiling Yambo 5.1.1

Post by Nicola Spallanzani » Fri Jan 27, 2023 11:08 pm

Dear Zhou,
I noticed that you are using mixed gnu and intel compiler. Usually it is not recommended.

Otherwise, if you are loading the intel module only to use the MKL library you have to use these flags:

Code: Select all

--with-blas-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" \
--with-lapack-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" \
--with-fft-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" \
--with-fft-includedir="${MKLROOT}/include" \
In addition you can not use MKL's Scalapack with OpenMPI, you need IntelMPI. But you can let Yambo to compile them with the flag "--enable-par-linalg".

Best regards,
Nicola
Nicola Spallanzani, PhD
S3 Centre, Istituto Nanoscienze CNR and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu

ljzhou86
Posts: 85
Joined: Fri May 03, 2013 10:20 am

Re: error 1: K_stored_in_a_slepc_matrix.o in compiling Yambo 5.1.1

Post by ljzhou86 » Sat Jan 28, 2023 2:03 am

THanks Nicola,

Your suggestions work with me. Anyway, when the compilation proceeds to the installation of yambo_nl and ypp_nl, I encountered the error log

Code: Select all

.../yambo/5.1.1/master_030128_511/yambo-clone/lib/external/gfortran/mpif90/lib/libxcf03.a  /opt/packages/yambo/5.1.1/master_030128_511/yambo-clone/lib/external/gfortran/mpif90/lib/libxc.a -L/opt/software/intel2018/compilers_and_libraries_2018.1.163/linux/mkl//lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl   -lm
gfortran: error: /opt/packages/yambo/5.1.1/master_030128_511/yambo-clone/lib/external/gfortran/mpif90/lib/libscalapack.a: No such file or directory
gfortran: error: /opt/packages/yambo/5.1.1/master_030128_511/yambo-clone/lib/external/gfortran/mpif90/lib/libiotk.a: No such file or directory"
It seems as if the two files libscalapack.a and libiotk.a were able to be deleted in the previous buildings. So, I have to recompile them and then copy them into .../lib/external/gfortran/mpif90/lib.

It is a bug?

Nicola Spallanzani wrote: Fri Jan 27, 2023 11:08 pm Dear Zhou,
I noticed that you are using mixed gnu and intel compiler. Usually it is not recommended.

Otherwise, if you are loading the intel module only to use the MKL library you have to use these flags:

Code: Select all

--with-blas-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" \
--with-lapack-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" \
--with-fft-libs="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" \
--with-fft-includedir="${MKLROOT}/include" \
In addition you can not use MKL's Scalapack with OpenMPI, you need IntelMPI. But you can let Yambo to compile them with the flag "--enable-par-linalg".

Best regards,
Nicola
Dr. Zhou Liu-Jiang
Fujian Institute of Research on the Structure of Matter
Chinese Academy of Sciences
Fuzhou, Fujian, 350002

User avatar
Nicola Spallanzani
Posts: 62
Joined: Thu Nov 21, 2019 10:15 am

Re: error 1: K_stored_in_a_slepc_matrix.o in compiling Yambo 5.1.1

Post by Nicola Spallanzani » Sun Jan 29, 2023 10:21 pm

Dear Zhou,
yes it is a bug, thanks for reporting it.
I will open an issue in the development repository.

Best regards,
Nicola
Nicola Spallanzani, PhD
S3 Centre, Istituto Nanoscienze CNR and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu

Post Reply