- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody,
I've received an error when trying to compile with the Fortran Compiler of Intel® Parallel Studio XE 2019.
Error
INFO: 1> Linking CCubeApp ERROR: 1> /opt/intel/compilers_and_libraries_2019.0.117/linux/compiler/lib/intel64_lin/libirng.so: undefined reference to `__intel_skx_avx512_memcpy' ERROR: 1> collect2: error: ld returned 1 exit status
I tried to define: export LD_PRELOAD=/opt/intel/compilers_and_libraries_2019.0.117/linux/compiler/lib/intel64/libirc.so, since this is the library where I have the reference symbol available but got the same error.
Any clue on what is happening and any possible workaround?
Best regards,
--
Henrique Mageste
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have a normal PC, then the correct path to be put into the LD_LIBRARY_PATH variable is
/local/compilers_and_libraries_2019.0.117/linux/compiler/lib/intel64
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Juergen R. wrote:
If you have a normal PC, then the correct path to be put into the LD_LIBRARY_PATH variable is
/local/compilers_and_libraries_2019.0.117/linux/compiler/lib/intel64
Maybe you meant /usr/local, right? In any case I don't have the intel compilers there. I have installed them in the default path: /opt/intel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, /opt/intel, whatever it is, did you put it into the LD_LIBRARY_PATH?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Juergen R. wrote:
Yes, /opt/intel, whatever it is, did you put it into the LD_LIBRARY_PATH?
Same error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, first of all the compilation seems completely working, right? It is only the linking that fails. What is your exact link command? Maybe just use ifort for the linking step instead of ld?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Juergen R. wrote:
Well, first of all the compilation seems completely working, right? It is only the linking that fails. What is your exact link command? Maybe just use ifort for the linking step instead of ld?
The problem is indeed in the linker, since it did not present any problem in the compilation.
I managed to make it link passing the path of the library where I have the symbol defined (libirc.so) directly to the linker. Just to let it documented here, I have used:
g++ -o executable -L/opt/intel/compilers_and_libraries_2019.0.117/linux/compiler/lib/intel64/ -L...
I don't know if this is actually a solution or a workaroud. Perhaps I'll need to change some Makefiles to make sure that I have the correct Intel libraries in the path when the linker comes in play.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Henrique,
I think this is not a trick but the proper solution. If you use g++ for linking, it doesn't know anything about the Fortran libraries of ifort, so you have to include them explictly. We do this actually by using a variable FCLIBS into which we set the Fortran libraries needed for linking if we build a C/C++ executable into which we link our code as a Fortran library.
Cheers,
JRR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the answer Juergen,
Shouldn't the /opt/intel/bin/compilervars.sh do that for me?
Regards,
--
Henrique
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Somehow I never use the compilervars.sh scripts but rather set my environment variables by myself. Also I am not sure whether the things are sufficient when you have a mixed C++/Fortran project where you compile with one compiler and link with another.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page