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

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

Hi,

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?

Thanks!

4 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

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.

See http://software.intel.com/en-us/articles/static-linking-with-mkl-ipp-or-tbb-may-give-unresolved-references

We'll look into making this unnecessary.

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi