- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I included into the program
INCLUDE 'lapack.f90'
Module myMKL
include 'mkl_lapack.fi'
end module myMKL
and also included "use" statements
use F95_PRECISION
use LAPACK95
use myMKL
call getrf(Gk1,ipvt,info)
in the subroutine which call getrf subroutine
However, during the compilation I got an error:
ifxKSN7m7.i90:(.text+0x5690c): undefined reference to `zgetrf_f95_'
ifxKSN7m7.i90:(.text+0x569cc): undefined reference to `zgetri_f95_'
make: *** [all] Error 1
Could you please help
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In addition to using the Lapack95 interfaces, you also need to link the Lapack-95 (and, if needed, the Blas95) libraries.
See the MKL Link Line Advisor for how to do this.
There is an older example code for ?GetRF in this forum. I built and ran that example code using the commands
ifx /Qmkl xgetrf.f90 mkl_lapack95_ilp64.lib
xgetrf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
I used the suggested options for compiler
-I${MKLROOT}/include/mkl/intel64/ilp64 -i8 -qmkl-ilp64=sequential
and for linker
-qmkl-ilp64=sequential ${MKLROOT}/lib/libmkl_blas95_ilp64.a ${MKLROOT}/lib/libmkl_lapack95_ilp64.a
However I got an error in compilation:
ifx -o "./bin/"wtb.x wtb_main.o module_input.o module_hamiltonian.o module_bse.o module_pce.o module_coulomb.o module_math.o module_berry.o module_optics.o module_tools.o module_kmesh.o -qmkl-ilp64=s
equential /opt/shared/intel-oneapi/2024.2.0.634/mkl/2024.2/lib/libmkl_blas95_ilp64.a /opt/shared/intel-oneapi/2024.2.0.634/mkl/2024.2/lib/libmkl_lapack95_ilp64.a
/opt/shared/intel-oneapi/2024.0.1.46/compiler/2024.0/lib/libifcoremt.a(for_vm.o): In function `check_KMP':
for_vm.c:(.text+0x694): undefined reference to `__kmpc_global_thread_num'
for_vm.c:(.text+0x716): undefined reference to `__kmpc_global_thread_num'
for_vm.c:(.text+0x738): undefined reference to `__kmpc_global_thread_num'
module_bse.o: In function `module_bse_mp_dielbsep_':
ifxUx8Fwo.i90:(.text+0x1043): undefined reference to `__kmpc_fork_call'
module_bse.o: In function `module_bse_mp_dielbsev_':
ifxUx8Fwo.i90:(.text+0x10b7): undefined reference to `__kmpc_fork_call'
module_bse.o: In function `module_bse_mp_dielbseptemp_':
ifxUx8Fwo.i90:(.text+0x6955): undefined reference to `__kmpc_fork_call'
module_bse.o: In function `module_bse_mp_bsedielraw_':
ifxUx8Fwo.i90:(.text+0x69a1): undefined reference to `__kmpc_global_thread_num'
ifxUx8Fwo.i90:(.text+0x8af1): undefined reference to `__kmpc_for_static_init_8'
ifxUx8Fwo.i90:(.text+0x91dd): undefined reference to `__kmpc_for_static_fini'
ifxUx8Fwo.i90:(.text+0x91ee): undefined reference to `__kmpc_barrier'
I am using Intel-oneapi-mkl/2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check that you are specifying the correct openMP options when using the MKL Link Line advisor.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is exactly what I want.
I would like to compile my code with OpenMP options, but MKL library to link as sequential.
Is it possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Suppose it's the similar topic as this thread https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-MKL-with-MKL-NUM-THREADS-1/m-p/1652980#M36782
And the solution is:
For using oneMKL + OpenMP threading, we recommend you use intel OpenMP -liomp5 link option. For example,
${MKLROOT}/lib/libmkl_blas95_ilp64.a ${MKLROOT}/lib/libmkl_lapack95_ilp64.a -Wl,--start-group ${MKLROOT}/lib/libmkl_intel_ilp64.a ${MKLROOT}/lib/libmkl_intel_thread.a ${MKLROOT}/lib/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl
More advisor, please check onemkl-link-line-advisor

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page