I am successfully able to compile and execute my code on Xeon, but when I try to compile it for executing on a co-processor (natively by adding a -mmic flag), I get the following error:
x86_64-k1om-linux-ld: cannot find -lpardiso500-GNU481-X86-64
x86_64-k1om-linux-ld: cannot find -lblas
x86_64-k1om-linux-ld: cannot find -llapack
x86_64-k1om-linux-ld: cannot find -lgfortran
My .sh file for compilation:
icc -mmic PIC.c -o PIC -pg -g -lpardiso500-GNU481-X86-64 -lblas -llapack -lgfortran -fopenmp -lpthread -lm -O2 -vec-report2
$LD_LIBRARY_PATH looks like:
Looking at previous posts on the forum, I tried adding '/usr/lib64/' to the $LD_LIBRARY_PATH but then it gives me the following error when I try to compile:-
relocation error: /usr/lib64/libc.so.6: symbol _dl_starting_up, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference
Also, it was suggested to avoid adding '/usr/lib64/'.
What sould I do next?
There is no gfortran for k1om architecture. You must use the MKL libraries for k1om provided with icc, found in a subdirectory of intel64_lin_mic. Even if you were building for host, the MKL should be preferable to generic linux x86-64 gcc libraries. MKL link advisor should show you most of what you need.
I don't know whether -fopenmp -mmic will be interpreted as equivalent to -qopenmp.
If you haven't mounted the MKL libraries on MIC, you will need to copy them over at run time.
Tim and Sergey, thank you very much for your advise. I moved over to the mkl for integrating pardiso in my code. I compiled the application natively using -mmic, -liomp5 and linked statically. It is working now.