[Wien] problem in compiling mstar with gfortran
Rubel, Oleg
rubelo at mcmaster.ca
Sat Jan 28 06:23:02 CET 2023
Dear Halim,
it seems that something is wrong with 'lmkl_gf_lp64'. I did a test and compiled with GNU FORTRAN first with correct settings:
(base) [rubel at gra-login1 mstar]$ make veryclean
rm -f *.o *.mod *.MOD
rm -f *~
(base) [rubel at gra-login1 mstar]$ make
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_mommat_pij_vasp.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c mstar.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c eigvs.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_numlines_vasp.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_mommat_pij.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c kdelta.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_numlines.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c eigvz.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_mommat_nb.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c dgenen.f90
gfortran -L/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/lib/intel64 -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -fopenmp -ldl -g -fbacktrace -ffpe-summary=none -o mstar read_mommat_pij_vasp.o mstar.o eigvs.o read_numlines_vasp.o read_mommat_pij.o kdelta.o read_numlines.o eigvz.o read_mommat_nb.o dgenen.o
(base) [rubel at gra-login1 mstar]$ gfortran --version
GNU Fortran (GCC) 9.3.0
Then I changed 'lmkl_gf_lp64' so something unrecognizable 'lmkl_ggf_lp64'. Here is the result:
(base) [rubel at gra-login1 mstar]$ make
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_mommat_pij_vasp.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c mstar.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c eigvs.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_numlines_vasp.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_mommat_pij.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c kdelta.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_numlines.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c eigvz.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c read_mommat_nb.f90
gfortran -I/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/include -fopenmp -g -fbacktrace -ffpe-summary=none -c dgenen.f90
gfortran -L/cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/lib/intel64 -lmkl_ggf_lp64 -lmkl_sequential -lmkl_core -lpthread -fopenmp -ldl -g -fbacktrace -ffpe-summary=none -o mstar read_mommat_pij_vasp.o mstar.o eigvs.o read_numlines_vasp.o read_mommat_pij.o kdelta.o read_numlines.o eigvz.o read_mommat_nb.o dgenen.o
/cvmfs/soft.computecanada.ca/gentoo/2020/usr/x86_64-pc-linux-gnu/binutils-bin/2.33.1/ld.gold: error: cannot find -lmkl_ggf_lp64
eigvs.f90:44: error: undefined reference to 'ssyevd_'
eigvs.f90:61: error: undefined reference to 'ssyevd_'
eigvz.f90:49: error: undefined reference to 'cheevd_'
eigvz.f90:67: error: undefined reference to 'cheevd_'
collect2: error: ld returned 1 exit status
I suspect that you have something else instead of 'lmkl_gf_lp64'. To find out more try to explore the mkl library folder:
(base) [rubel at gra-login1 mstar]$ cd /cvmfs/soft.computecanada.ca/easybuild/software/2020/Core/imkl/2020.1.217/mkl/lib/intel64
(base) [rubel at gra-login1 intel64]$ ls
libmkl_avx2.so libmkl_blacs_openmpi_lp64.a libmkl_cdft_core.so libmkl_gnu_thread.so libmkl_mc3.so libmkl_sequential.a libmkl_vml_cmpt.so
libmkl_avx512_mic.so libmkl_blacs_openmpi_lp64.so libmkl_core.a libmkl_intel_ilp64.a libmkl_mc.so libmkl_sequential.so libmkl_vml_def.so
libmkl_avx512.so libmkl_blacs_sgimpt_ilp64.a libmkl_core.so libmkl_intel_ilp64.so libmkl_pgi_thread.a libmkl.so libmkl_vml_mc2.so
libmkl_avx.so libmkl_blacs_sgimpt_ilp64.so libmkl_def.so libmkl_intel_lp64.a libmkl_pgi_thread.so libmkl_solver.a libmkl_vml_mc3.so
libmkl_blacs_intelmpi_ilp64.a libmkl_blacs_sgimpt_lp64.a libmkl_em64t.a libmkl_intel_lp64.so libmkl_rt.so libmkl_tbb_thread.a libmkl_vml_mc.so
libmkl_blacs_intelmpi_ilp64.so libmkl_blacs_sgimpt_lp64.so libmkl_gf_ilp64.a libmkl_intel_thread.a libmkl_scalapack.a libmkl_tbb_thread.so locale
libmkl_blacs_intelmpi_lp64.a libmkl_blas95_ilp64.a libmkl_gf_ilp64.so libmkl_intel_thread.so libmkl_scalapack_ilp64.a libmkl_vml_avx2.so
libmkl_blacs_intelmpi_lp64.so libmkl_blas95_lp64.a libmkl_gf_lp64.a libmkl_lapack95_ilp64.a libmkl_scalapack_ilp64.so libmkl_vml_avx512_mic.so
libmkl_blacs_openmpi_ilp64.a libmkl_cdft.a libmkl_gf_lp64.so libmkl_lapack95_lp64.a libmkl_scalapack_lp64.a libmkl_vml_avx512.so
libmkl_blacs_openmpi_ilp64.so libmkl_cdft_core.a libmkl_gnu_thread.a libmkl_lapack.a libmkl_scalapack_lp64.so libmkl_vml_avx.so
As you can see, our installation has various compiler flavours labeled as ' libmkl_intel_*', ' libmkl_gf_*', ... Perhaps your installation is different?
I hope it will help
Oleg
More information about the Wien
mailing list