Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ying_H_Intel
Employee
49 Views

Addintional Option for Mic Offload Linker in MSVS IDE could be buggy?

I pass the issue from MKL forum  https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/628062 to Intel Compiler forum.

Please help.

We installed Parallel Studio XE. compilers_and_libraries_2016.2.180 with MSVS 2012 integration on Windows Host and MIC.   attach one small test case.

If compile by command line : Intel COmpiler 16.0 update 2 MSVC 2012,

>icl /Qopenmp /MT /Qstd=c99 /Qoffload-attribute-target=mic  /Qoffload-option,mic,compiler," -I""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\include" /Qoffload-option,mic,link," --start-group ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_ilp64.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_core.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_thread.a --end-group" test_MKL.c mkl_intel_ilp64.lib mkl_intel_thread.lib mkl_core.lib

The code compiles and runs fine

But if build it in MSVC 2012 environment,

1) If we just put the command into

Project Property => Linker => Additional Options: 

 /Qoffload-option,mic,link," --start-group ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_ilp64.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_core.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_thread.a --end-group" mkl_intel_ilp64.lib mkl_intel_thread.lib mkl_core.lib

we see some errors like

C:\Users\dfernand\Documents\IntelXeonPhi\mic_samples\Test01/src/test_MKL.c:31: undefined reference to `MKL_free'
1>  C:\Users\dfernand\Documents\IntelXeonPhi\mic_samples\Test01/src/test_MKL.c:32: undefined reference to `MKL_free'
1>  C:\Users\dfernand\Documents\IntelXeonPhi\mic_samples\Test01/src/test_MKL.c:33: undefined reference to `MKL_free'

2) If  put the link option to 

Project Property => Linker=> General [Intel C++] =>Additional Options for MIC linker 

"""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_ilp64.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_core.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_thread.a"

and add  Project Property => Linker=>Input=> Additional Dipendencies

mkl_intel_ilp64.lib;mkl_intel_thread.lib;mkl_core.lib

 Project Property => Linker=>General=> Additional library Dipendencies

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl\lib\intel64_win

there are all kind of errors.

 Here the contents in  Project Property => Linker=> General [Intel C++] =>Additional Options for MIC linker  are  tricky, 

2.1)  if fed it with

/Qoffload-option,mic,link," --start-group ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_ilp64.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_core.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_thread.a --end-group"

The compiler reports:

xilink: : warning #10006: ignoring unknown option '/Qoffload-option,mic,link, --start-group "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl"\lib\mic\libmkl_intel_ilp64.a "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl"\lib\mic\libmkl_core.a "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl"\lib\mic\libmkl_intel_thread.a --end-group'

2.2) if fed the option

"--start-group ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_ilp64.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_core.a ""C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl""\lib\mic\libmkl_intel_thread.a --end-group"

( by the way, how to put the  --start-group  and ----end-group.into  the option?)

the compiler report:

icc: : warning #10006: ignoring unknown option '-fstart-group'
1>icc: : warning #10006: ignoring unknown option '-fend-group'
1>icc: : warning #10362: Environment configuration problem encountered.  Please check for proper MPSS installation and environment setup.
1>  k1om-mpss-linux-ld.exe: C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl\lib\mic\libmkl_core.a(mkl_memory_patched.o): undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5'
1>  k1om-mpss-linux-ld.exe: note: 'pthread_key_delete@@GLIBC_2.2.5' is defined in DSO C:\Program Files\Intel\MPSS\/k1om-mpss-linux/lib64/libpthread.so.0 so try adding it to the linker command line
1>  C:\Program Files\Intel\MPSS\/k1om-mpss-linux/lib64/libpthread.so.0: could not read symbols: Invalid operation
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\x64\PlatformToolsets\Intel C++ Compiler 16.0\Microsoft.Cpp.x64.Intel C++ Compiler 16.0.targets(1087,5): error MSB6006: "xilink.exe" exited with code 1

0 Kudos
1 Reply
Ying_H_Intel
Employee
49 Views

Attach the file.

Reply