[gmx-developers] building fully static mdrun

Szilárd Páll szilard.pall at cbr.su.se
Wed Jul 11 20:11:50 CEST 2012

On Wed, Jul 11, 2012 at 7:13 PM, Roland Schulz <roland at utk.edu> wrote:

> Hi,
> I don't think it is useful besides on supercomputers. There the

That's exactly what I would intend it it to be used for.

> advantage is that it works better with the command launching mechanism
> (and that also partly only because the didn't make the extra effort to
> get it to work at least for dynamic linked libraries with prior known
> libraries (no dlopen)). And last time I checked on Cray and Bluegene
> one automatically gets fully static binaries without any problems.

I know of at least 1-2 Crays where it was slightly tedious to get
dynamically linked binaries to work. The compiler wrappers were assuming
that, by applying their internal mumbo-jumbo, static linking will just
work, while CMake intended to link dynamically.

It would be easy to add an advanced CMake option to enable static linking,
but making sure that it always fails gracefully might not be that easy
(e.g. if an external lib is not available as static archive).

Still, if this makes the life of a few people easier and avoids the
spreading of dirty hacks that are around currently, I think this could be
a worthwhile addition.

 For distributing binaries fully static linked libraries are worse then
> dynamic libraries (see e.g.
> http://stackoverflow.com/questions/3430400/linux-static-linking-is-dead).

Sure, I never intended this options for this purpose.

> What would be useful for distributing binaries is if
> GMX_PREFER_STATIC_LIBS would automatically gets libgomp linked
> statically.

No idea, -static will work if all libraries (both external and system) are
available in static form. Otherwise, -fopenmp seems to always pull in

Are the rest of the system lib dependencies not an issue?


> BTW: I configured Jenkins to build automatic binaries. The Linux
> binaries work on all Linux distributions I have tested. Let me know if
> they work for you too. My idea is to have binaries for all important
> platforms on Jenkins so that when we have the 4.6beta, people can test
> it without having to compile it. I think this will get us more
> feedback. All binaries are with SSE2 acceleration. Currently you still
> need to set LD_LIBRARY_PATH if you extract it to somewhere else the
> /usr/local/gromacs (fixed by I7ec8707a). The Windows binary still has
> a weird path (fixed by Ie656d5fc).
> http://jenkins.gromacs.org/job/Gromacs_Nightly_Linux32_4_6/lastSuccessfulBuild/artifact/Gromacs-4.6-dev-Linux.tar.gz
> http://jenkins.gromacs.org/job/Gromacs_Nightly_Linux64_4_6/lastSuccessfulBuild/artifact/Gromacs-4.6-dev-Linux.tar.gz
> http://jenkins.gromacs.org/job/Gromacs_Nightly_Win64_4_6/lastSuccessfulBuild/artifact/Gromacs-4.6-dev-win64.exe
> Roland
> On Wed, Jul 11, 2012 at 12:40 PM, Szilárd Páll <szilard.pall at cbr.su.se>
> wrote:
> > Hi,
> >
> > In some cases it is required or advised to use a fully static linked
> mdrun,
> > for instance on some Cray machines. There have been around some (slightly
> > dirty) workarounds [1], but I think it is not desirable to have such
> > solutions advised to users.
> >
> > Implementing this in CMake, beside thorough testing, requires only a
> couple
> > of lines of code (especially if enabled for mdrun only). However, first
> it
> > would be good to know whether this is useful or not.
> >
> > Let me know if you know of for which statically linked binaries are
> required
> > or advised!
> >
> > Cheers,
> > --
> > Szilárd
> > *
> > [1]
> >
> http://www.hector.ac.uk/support/documentation/software/gromacs/compiling_4-6-0_phase3.php
> --
> ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
> 865-241-1537, ORNL PO BOX 2008 MS6309
> --
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20120711/590ed9cc/attachment.html>

More information about the gromacs.org_gmx-developers mailing list