在编译fortran代码时,我设置
FCL = mpiifort -qmkl=sequential
LLIBS += -L$(MKLROOT)/lib/intel64 -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64但是在编译代码时,它总是链接到libmkl_scalapack_lp64.so,而不是libmkl_scalapack_lp64.a。然后出现错误,
ifort: command line warning #10006: ignoring unknown option '-qmkl=sequential'
mpi.o: In function `m_max_d_':
mpi.f90:(.text+0x4b52): undefined reference to `dcopy_'
umco.o: In function `umco_mp_umco_calc_trafo_':
umco.f90:(.text+0x8c30): undefined reference to `dgetrf_'
umco.f90:(.text+0x8c69): undefined reference to `dgetri_'
umco.f90:(.text+0x8dde): undefined reference to `dgetri_'
umco.f90:(.text+0x9911): undefined reference to `dgeev_'
umco.f90:(.text+0x9aa4): undefined reference to `dgeev_'
mathtools.f90:(.text+0x3d08): undefined reference to `zgesdd_'
In function `w90_utility_mp_utility_zgemm_new_':
utility.F90:(.text+0x3712): undefined reference to `zgemm_'
/home/app/intel/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_scalapack_lp64.so: undefined reference to `ssteqr_'
/home/app/intel/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64/libmkl_scalapack_lp64.so: undefined reference to `dlahqr_'连接这两个库的正确方法是什么?
发布于 2022-03-12 09:14:57
这在很大程度上取决于您正在做什么,以及编译器版本等等。因此,你没有给我们提供足够的细节来回答这个问题。但是推荐的方法是使用Intel链接线顾问,它将帮助您通过在web表单中填写所有所需的详细信息来找到答案。你可以在https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html#gs.tephcr找到这个
https://stackoverflow.com/questions/71434408
复制相似问题