I am trying to run a simple offload code and I got this error:
undefined symbol: __offload_set_version
Could you help to identify this error?
it seems that liboffload.so.5 is not linked to any program that has #pragma offload.
The lib is in my system but the program does not see that.
I think this error stated when I updated the version of
Intel® Parallel Studio XE Professional Edition for Fortran and C++ Linux* (all tools) 2016
Version: Update 3
Check your underlying environment configuration. You can suffer either error below when compiling with 16.0.3 but where the underlying run-time environment aligns to the 15.0 release RTLs, specifically the MIC_LD_LIBRARY_PATH and/or LD_LIBRARY_PATH settings.
Where the MIC_LD_LIBRARY_PATH refers to 15.0 RTLs, you might see:
/tmp/coi_procs/1/5460/aMIC.out: symbol lookup error: /tmp/coi_procs/1/5460/aMIC.out: undefined symbol: __offload_set_version
offload error: process on the device 0 unexpectedly exited with code 127
You can also suffer a similar error compiling with 16.0.3 but where your LD_LIBRARY_PATH setting aligns to a previous 15.0 release. e.g.
./a.out: symbol lookup error: ./a.out: undefined symbol: __offload_set_version
It is unclear which possible case you might have experienced so check that MIC_LD_LIBRARY_PATH and LD_LIBRARY_PATH reference paths under the 16.0.3 (i.e 2016.3.201) area and not an earlier 15.0 area.
it seems that the paths are ok.
I solved the problem by running this command
source /opt/intel/compilers_and_libraries_2016.3.210/linux/bin/compilervars.sh intel64
so, after the upgrading, the compilervars.sh was not executed anymore, is that possible? Is it suppose to execute automatically?
If you hadn't sourced the 16.0.3 compilervars to begin with then how did you invoke the 16.0.3 compiler?
The compilervars is not run automatically. Some choose to add the source command to their private shell initialization (i.e. .bashrc). Maybe your private shell initialization file is hard coded to source the 15.0 version, so editing it to refer to 16.0.3 would do it automatically.
Glad you resolved the error.
Well, I have no idea how the compiler worked without source compilervars.sh. I also compiled other codes such as gaussianElimination and it compiled and executed as a native code, but when I tried to use #pragma offload inside the code I could not run the program anymore, but the compiler still worked with no errors.