Page 1 of 1

error 1: K_stored_in_a_slepc_matrix.o in compiling Yambo 5.1.1

Posted: Fri Jan 27, 2023 5:42 pm
by ljzhou86
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"

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

Posted: Fri Jan 27, 2023 6:18 pm
by andrea.ferretti
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

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

Posted: Fri Jan 27, 2023 11:08 pm
by Nicola Spallanzani
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

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

Posted: Sat Jan 28, 2023 2:03 am
by ljzhou86
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

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

Posted: Sun Jan 29, 2023 10:21 pm
by Nicola Spallanzani
Dear Zhou,
yes it is a bug, thanks for reporting it.
I will open an issue in the development repository.

Best regards,
Nicola