Can't link MKL with -static-intel after update to 2013update1

Can't link MKL with -static-intel after update to 2013update1


I can compile and link my program correctly with version 2011_sp1_update3, but failed with version 2013_update1.

My program contains only 2 .cpp files, and generated by following 3 commands.

icpc -O3 -inline-level=2 -parallel -ipp=common -mkl=parallel -I/opt/intel/ipp/include -ansi-alias -Wcheck -openmp-report2 -par_report1 -vec-report1 -Wstrict-aliasing -MMD -MP -MF"src/KTiming.d" -MT"src/KTiming.d" -c -o "src/KTiming.o" "../src/KTiming.cpp"

icpc -O3 -inline-level=2 -parallel -ipp=common -mkl=parallel -I/opt/intel/ipp/include -ansi-alias -Wcheck -openmp-report2 -par_report1 -vec-report1 -Wstrict-aliasing -MMD -MP -MF"src/smlab-bbrbm-sp.d" -MT"src/smlab-bbrbm-sp.d" -c -o "src/smlab-bbrbm-sp.o" "../src/smlab-bbrbm-sp.cpp"

icpc -parallel -ipp=common -mkl=parallel -O3 -static-intel -o "smlab-bbrbm-sp"  ./src/KTiming.o ./src/smlab-bbrbm-sp.o

When using 2011_sp1_up3, everything is fine. When using 2013, the last link command fails unless I remove the option '-static-intel'.

I use non-commercial license. The OS is CentOS 6.3.

Is this a bug? Is there a way I can link MKL statically?


4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The link advisor posted on the MKL forum accepts requests for command line usage including static linking (except for libiomp5). As far as I know, it was never controlled by -static-intel. The -mkl option, as far as I know, supports only dynamic linking, so you need to use the link advisor for the static linking advice. If you wish more expert confirmation, the MKL forum is the place.

Thanks! I thought -mkl will do everything for me automatically, just as the old version.
I will try mkl link advisor then.

You should be able to link statically by moving the -mkl switch after your source and object files.


We'll look into making this unnecessary.

Leave a Comment

Please sign in to add a comment. Not a member? Join today