Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Beginner
47 Views

Linking MKL in the makefile

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
Highlighted
Moderator
47 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
Highlighted
Moderator
47 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