Re: AMBER: Intel fortran compiler and -static switch in older pmemd releases

From: David E. Konerding DSD Staff <dekonerding.lbl.gov>
Date: Fri, 02 Apr 2004 13:21:11 -0800

Robert Duke wrote:

>Folks -
>Just a heads-up on a potential source of grief. In earlier releases of
>pmemd, I included the -static switch in the ifc machine files because it
>helped avoid problems with needing to distribute the compiler libraries on
>all the machines pmemd was running on. However, with later if not earlier
>releases of ifc, there has been a lot of ill-defined grief associated with
>the interface to system libraries. Now, in an ideal world, there would be a
>clear delineation between the compiler-related libraries and the system
>libraries, and you would be able to have the right thing happening by using
>static compiler libraries and dynamic system libraries. The dynamic system
>libraries would present consistent call interfaces and behaviour, and if
>they didn't, there would be provision for versioning.
>
>

Hi Bob,

I don't have time to look into this in detail, but in my experience, the
linker *is* capable of linking in some libraries statically and others
dynamically.
However, this normally applies to user libraries, not compiler or system
libraries. I think you pass something to the compile like:



# gcc a.o -Wl,-Bstatic -lfoo -Wl,-Bdynamic -lbar

the switch works that anything after -Wl,-Bstatic will be linked statically until you hit the -Bdynamic
line, at which point further libs would be linked dynamically.

Unfrotunately, I suspect you'd have to tell the compiler not to link any standard libraries in and
specify them by hand on the final link step, which obviously isn't desireable.

Dave


-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Fri Apr 02 2004 - 22:53:00 PST
Custom Search