I am attempting to find a workaround for a user who wants to build NumPy and SciPy with MKL, but use the GNU toolchain to compile. I have followed the instructions at
For doing just this, however when we attempt to test SciPy in this configuration we get the error
symbol lookup error: /opt/intel/composer_xe_2013.2.146/mkl/lib/intel64/libmkl_gnu_thread.so: undefined symbol: omp_get_num_procs
after using export MKL_THREADING_LAYER=GNU and MKL_THREADING_INTERFACE=GNU
I cannot find a suitable workaround for the user. Can you offer any insight as to why this may be happening?
We are using python 2.6 for this user who requires a custom build with custom versions of numpy and scipy, along with intel 2013.
Thanks very much.
libmkl_gnu_thread.so requires -lgomp (which would be implied by -fopenmp) in place of the reference to -liomp5 which would be required by the intel_thread library.
You should be able to use either combination, in accordance with https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor,
If you wish to run without an OpenMP library, you must select the sequential library in place of the thread one.
Thanks so much for your reply. But my problem persists. I tried building with:
export CFLAGS="-fopenmp -m64 -mtune=native -O3 -Wl,--no-as-needed -fPIC"
export CXXFLAGS="-fopenmp -m64 -mtune=native -O3 -Wl,--no-as-needed -fPIC"
export LDFLAGS="-ldl -lm -lgomp -shared"
export FFLAGS="-fopenmp -m64 -mtune=native -O3 -fPIC"
I have verified the existence of /usr/lib64/libgomp.so.1.0.0, but when I run scipy.test("full"), I still get:
libmkl_gnu_thread.so: undefined symbol: omp_get_num_procs
Any more ideas?