- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have precompiled binaries from gcc and Intel Fortran. With either Intel 7.1 or Intel 8 I understand that the Intel libraries should be statically linked unless you specify -dynamic.
When I try to link these pre-compiled binaries with ifort or ifc, the Intel Fortran libraries are dynamically linked (if I update the Intel Fortran compiler, my long running jobs terminate).
What can I do to statically link the Intel Fortran libraries when I'm doing only a link with ifort and not a compile?
Thanks,
David
I have precompiled binaries from gcc and Intel Fortran. With either Intel 7.1 or Intel 8 I understand that the Intel libraries should be statically linked unless you specify -dynamic.
When I try to link these pre-compiled binaries with ifort or ifc, the Intel Fortran libraries are dynamically linked (if I update the Intel Fortran compiler, my long running jobs terminate).
What can I do to statically link the Intel Fortran libraries when I'm doing only a link with ifort and not a compile?
Thanks,
David
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have the .o files or .a (static) libraries, you can repeat the link, with the additional option -static. This will choose static libraries, in most cases where there is a choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, but -static doesn't work because I have third party libraries which I only have dynamic versions of. Still, I need the Intel Fortran libraries to be linked statically so I can update my Fortran compiler for my long running jobs.
What option do I use to statically link a library if it is available as static but to otherwise link a dynamic version?
Thanks,
David
What option do I use to statically link a library if it is available as static but to otherwise link a dynamic version?
Thanks,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-static still ought to work, it only gives the preference for when both versions of a library are available at link time.
Another possibility would be to copy the dynamic libraries used by your application into a directory you reserve for this purpose, and set your LD_LIBRARY_PATH accordingly in the shell where you start the application. Then, you could change the compiler installation without disturbing the running application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think -static ought to work as you suggested, picking up the static library if there is one otherwise picking up the dynamic library, but instead my link aborts.
I fixed the problem by explicitly stating the entire path for each of the Intel Fortran libraries (e.g. /usr/local/intel/.../lib/libPEPCF90.a)
Thanks,
David
I fixed the problem by explicitly stating the entire path for each of the Intel Fortran libraries (e.g. /usr/local/intel/.../lib/libPEPCF90.a)
Thanks,
David

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page