icc/icpc should default to -openmp-link dynamic, which would set up the linker script to link libiomp5.so. Your situation is one of the reasons why the compiler is set up to go to such lengths to prefer that. Of course, if you use some other method to drive the link, and specify -static, you may be setting up a preference for the .a library. In any case, if you specify libiomp5.so explicitly, that should over-ride.
Hi With my small contol your language and if i have understand correctly you want use shared (.so lib ) require (-fPIC -ansi -shared-intel) icpc -fPIC -ansi -shared-intel -axSSSE3 -Os -fast -openmp -openmp-lib=compat -openmp-report - ect ....... Best regards
The "-static-intel" is supposed to have no effect on which OpenMP run-time library is linked. Hi Yes only if the library is without an other included as shared, that require run-time. If use shared you have your weight program reduced. static(is default to your program) you have the program more heavy but is not completely independent (this example). Also fPIC is for object your program , not for the lib that have already or not. Best regards