I have working test project (based on Kevin's sample code from another thread). I just changed in the VS 2013 Intel Performance Libraries -> Use MKL -> Parallel (was None) and got this error.
1> k1om-mpss-linux-ld.exe: C:/Users/ADMINI~1/AppData/Local/Temp/ipo_29323.o: relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC 1> C:/Users/ADMINI~1/AppData/Local/Temp/ipo_29323.o: could not read symbols: Bad value 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\x64\PlatformToolsets\Intel C++ Compiler XE 15.0\Toolset.targets(1045,5): error MSB6006: "xilink.exe" exited with code 1.
This is command line of the project (-fPIC is there):
/Qoffload-option,mic,compiler,"-fPIC" /GS /Qopenmp /W3 /Gy /Zc:wchar_t /Zi /O3 /Fd"x64\Release\vc120.pdb" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WIN32PROJECT1_EXPORTS" /D "_WINDLL" /D "_UNICODE" /D "UNICODE" /Qipo /Zc:forScope /GR- /Oi /MD /Fa"x64\Release\" /EHsc /nologo /Fo"x64\Release\" /Qprof-dir "x64\Release\" /Fp"x64\Release\MyDLL.pch"
If I switch Use MKL to No - everything builds fine.
thank you. let me know if you want my VS solution zipped. but i believe it must be identical to the one you provided in the other thread (i added code but I think I didn't change any of the projects properties)
Please pardon the delay in getting back to you. I reproduced this easily even without using MKL in my test case.
There is an underlying defect where when toggling the MKL setting (Configuration Properties > Intel Performance Libraries > Use Intel® MKL) the options set under the compiler property setting Configuration Properties > C/C++ > Code Generation [Intel C++] > Additional Options for MIC Offload Compiler are effectively disabled and not passed to the target compilation, hence the error. Toggling the MKL option you did adds options for the target compilation and that action is what appears to be problematic. It appears only the compiler target compilation property setting is affected. The similar option in the linker property settings seems unaffected but I recommend taking precautions anyway when working around this issue as noted below.
There is a work around. My test case does not have MKL references so the setting in #1 alone avoids the error; however, I recommend when using MKL you make the two changes below to fully work around this issue.
1. First, leave the MKL setting (Configuration Properties > Intel Performance Libraries > Use Intel® MKL) as you have it. Then, under Configuration Properties > C/C++ > Command Line, add the explicit /Qoffload-option as follows: /Qoffload-option,mic,compiler,"-fPIC -mkl=parallel"
2. Then, under Configuration Properties > Linker > General [C/C++] > Additional Options for MIC Offload Linker add the explicit option: -mkl=parallel
I will report this to Development (see internal tracking id below) and keep you updated about the progress on a fix.
(Internal tracking id: DPD200366176)
(Resolution Update on 11/11/2015): This defect is fixed in the Intel® Parallel Studio XE 2016 Release (2016.0.110 - Windows)
I confirmed this issue is fixed in the Intel® Parallel Studio XE 2016 initial release (2016.0.110 - Windows).
The underlying defect was in our integrations with Visual Studio. The integrations included in the 2016 release (Version 126.96.36.199) contain the fix. You can obtain the fix by installing the PSXE 2016 Initial Release. If you require the 15.0 compiler, you can install PSXE 2016 side-by-side and select to use the 15.0 compiler with the newer integrations from the PSXE 2016 release.