Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Linking MKL in the makefile

yang__jerry
Beginner
2,107 Views

Hi:

     I went to the intel-mkl-link-line-advisor , and got the following:

Use this link line: 

  ${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_cdft_core.a ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_blacs_openmpi_lp64.a -Wl,--end-group -liomp5 -lpthread -lm -ldl

Compiler options: 

 -I${MKLROOT}/include

  Please tell me how to include them in the makefile.

 

Thanks,

 

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
2,107 Views

we may try to show you such example but this is some sort of general question far beyond of mkl specific..... you may try to parse this forum and to see the examples of makefiles. 

0 Kudos
Pamela_H_Intel
Moderator
2,107 Views

Jerry - Set the compile and link lines as follows and use LINK_OPTIONS in your compile command.

COMPILE_OPTIONS = -I${MKLROOT}/include

LINK_OPTIONS = ${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_cdft_core.a ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_blacs_openmpi_lp64.a -Wl,--end-group -liomp5 -lpthread -lm -ldl $(COMPILE_OPTIONS)

I hope that helps.

Pamela

0 Kudos
Reply