On Wed, Jul 11, 2012 at 7:13 PM, Roland Schulz <span dir="ltr">&lt;<a href="mailto:roland@utk.edu" target="_blank">roland@utk.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi,<br>
<br>
I don&#39;t think it is useful besides on supercomputers. There the<br></blockquote><div><br></div><div>That&#39;s exactly what I would intend it it to be used for.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



advantage is that it works better with the command launching mechanism<br>
(and that also partly only because the didn&#39;t make the extra effort to<br>
get it to work at least for dynamic linked libraries with prior known<br>
libraries (no dlopen)). And last time I checked on Cray and Bluegene<br>
one automatically gets fully static binaries without any problems.<br></blockquote><div><br></div><div>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.</div>

<div><br></div><div>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). </div>

<div><br></div><div>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.</div><div><br></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For distributing binaries fully static linked libraries are worse then<br>
dynamic libraries (see e.g.<br>
<a href="http://stackoverflow.com/questions/3430400/linux-static-linking-is-dead" target="_blank">http://stackoverflow.com/questions/3430400/linux-static-linking-is-dead</a>).<br></blockquote><div><br></div><div>Sure, I never intended this options for this purpose.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What would be useful for distributing binaries is if<br>
GMX_PREFER_STATIC_LIBS would automatically gets libgomp linked<br>
statically.<br></blockquote><div><br></div><div>No idea, -static will work if all libraries (both external and system) are available in static form. Otherwise, -fopenmp seems to always pull in libgomp.so.</div><div> </div>

<div>Are the rest of the system lib dependencies not an issue?</div><div><br></div><div>--</div><div>Sz.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
BTW: I configured Jenkins to build automatic binaries. The Linux<br>
binaries work on all Linux distributions I have tested. Let me know if<br>
they work for you too. My idea is to have binaries for all important<br>
platforms on Jenkins so that when we have the 4.6beta, people can test<br>
it without having to compile it. I think this will get us more<br>
feedback. All binaries are with SSE2 acceleration. Currently you still<br>
need to set LD_LIBRARY_PATH if you extract it to somewhere else the<br>
/usr/local/gromacs (fixed by I7ec8707a). The Windows binary still has<br>
a weird path (fixed by Ie656d5fc).<br>
<a href="http://jenkins.gromacs.org/job/Gromacs_Nightly_Linux32_4_6/lastSuccessfulBuild/artifact/Gromacs-4.6-dev-Linux.tar.gz" target="_blank">http://jenkins.gromacs.org/job/Gromacs_Nightly_Linux32_4_6/lastSuccessfulBuild/artifact/Gromacs-4.6-dev-Linux.tar.gz</a><br>



<a href="http://jenkins.gromacs.org/job/Gromacs_Nightly_Linux64_4_6/lastSuccessfulBuild/artifact/Gromacs-4.6-dev-Linux.tar.gz" target="_blank">http://jenkins.gromacs.org/job/Gromacs_Nightly_Linux64_4_6/lastSuccessfulBuild/artifact/Gromacs-4.6-dev-Linux.tar.gz</a><br>



<a href="http://jenkins.gromacs.org/job/Gromacs_Nightly_Win64_4_6/lastSuccessfulBuild/artifact/Gromacs-4.6-dev-win64.exe" target="_blank">http://jenkins.gromacs.org/job/Gromacs_Nightly_Win64_4_6/lastSuccessfulBuild/artifact/Gromacs-4.6-dev-win64.exe</a><br>



<br>
Roland<br>
<div><div><br>
On Wed, Jul 11, 2012 at 12:40 PM, Szilárd Páll &lt;<a href="mailto:szilard.pall@cbr.su.se" target="_blank">szilard.pall@cbr.su.se</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; In some cases it is required or advised to use a fully static linked mdrun,<br>
&gt; for instance on some Cray machines. There have been around some (slightly<br>
&gt; dirty) workarounds [1], but I think it is not desirable to have such<br>
&gt; solutions advised to users.<br>
&gt;<br>
&gt; Implementing this in CMake, beside thorough testing, requires only a couple<br>
&gt; of lines of code (especially if enabled for mdrun only). However, first it<br>
&gt; would be good to know whether this is useful or not.<br>
&gt;<br>
&gt; Let me know if you know of for which statically linked binaries are required<br>
&gt; or advised!<br>
&gt;<br>
&gt; Cheers,<br>
&gt; --<br>
&gt; Szilárd<br>
&gt; *<br>
&gt; [1]<br>
&gt; <a href="http://www.hector.ac.uk/support/documentation/software/gromacs/compiling_4-6-0_phase3.php" target="_blank">http://www.hector.ac.uk/support/documentation/software/gromacs/compiling_4-6-0_phase3.php</a><br>
<br>
<br>
<br>
</div></div><span><font color="#888888">--<br>
ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov" target="_blank">cmb.ornl.gov</a><br>
865-241-1537, ORNL PO BOX 2008 MS6309<br>
--<br>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org" target="_blank">gmx-developers@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
Please don&#39;t post (un)subscribe requests to the list. Use the<br>
www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</font></span></blockquote>