Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Statically linking to MKL 2017.3 on GCC 5.4.0

$
0
0

Hi there, I am trying to statically link my library to MKL 2017.3 (using Intel OpenMP for threading), under GCC 5.4.0, on Ubuntu. So according to the link line advisor, I need to link with libmkl_core, libmkl_intel_thread, libmkl_intel_lp64, and libiomp5. I'm finding that when I try to link with libiomp5.a, (and all the others *.a) I get the following linker error:

/usr/bin/ld: libXXX.so: version node not found for symbol omp_set_nest_lock@OMP_3.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: error: ld returned 1 exit status

[I replaced my library name with XXX]

When I change the configuration to link with libiomp5.so (and the rest still *.a) my program builds successfully (I have not yet tried to run it, for unrelated reasons). Can anyone explain to me what the above error means? I assumed it was due to the symbol omp_set_nest_lock@OMP_3.0 not being defined, but I checked libiomp5.a with the 'nm' command-line tool and the symbol does appear to be defined there. I'm reasonably confident that the linker is finding all the libraries.

In general, is it valid to link statically with libiomp5? I would have assumed so, since libiomp5.a is provided. I have also successfully linked my library to MKL statically on Windows and Mac, so I assumed it would be possible on Linux also.

Any help would be much appreciated. Let me know if you need more information. I've done very little development for non-Windows platforms, so hopefully I haven't omitted anything important.

 


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>