<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 18, 2013 at 8:16 PM, Marcus D. Hanwell <span dir="ltr">&lt;<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Jun 17, 2013 at 1:59 PM, Roland Schulz &lt;<a href="mailto:roland@utk.edu">roland@utk.edu</a>&gt; wrote:<br>

&gt; On Mon, Jun 17, 2013 at 1:10 PM, Mark Abraham &lt;<a href="mailto:mark.j.abraham@gmail.com">mark.j.abraham@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Jun 17, 2013 at 6:16 PM, Manuel Nuno Melo &lt;<a href="mailto:m.n.melo@rug.nl">m.n.melo@rug.nl</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I have also had linking problems when making in parallel. In my case they<br>
&gt;&gt;&gt; could be traced back to the option to let GMX download/build its own fftw<br>
&gt;&gt;&gt; (-DGMX_BUILD_OWN_FFTW=ON).<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; It seems that only one of make&#39;s threads starts building fftw, while the<br>
&gt;&gt;&gt; others go ahead building/linking GMX. Since fftw compilation is not ready by<br>
&gt;&gt;&gt; the time it is needed, GMX linking is botched.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Yes, Rossen first showed this to me. I don&#39;t know if the underlying issue is<br>
&gt;&gt; that the dependency cannot be described properly, or that we&#39;re not doing it<br>
&gt;&gt; properly. If it&#39;s a problem, people are welcome to contribute a fix! :-)<br>
&gt; It was working in <a href="https://gerrit.gromacs.org/#/c/1675/12" target="_blank">https://gerrit.gromacs.org/#/c/1675/12</a>. You then<br>
&gt; changed how the dependency works in patch set 13. You never replied to<br>
&gt; Christophs comment why this was changed (at least I can&#39;t find a<br>
&gt; reply). Do you remember? Otherwise I can change it back as 12 did it<br>
&gt; and it should work again.<br>
&gt;<br>
</div>One major issue is that external project was not designed to be used<br>
with standard targets, what we usually advise is the use of a<br>
superbuild that is all external projects - including GROMACS as the<br>
most dependent external project. That way when you get to GROMACS you<br>
know that all other dependencies were built (because that target<br>
depends on FFTW for example). This allows you to keep all of this<br>
logic outside of your project, and in a very small repository that<br>
coordinates the build of your project and its dependencies.<br></blockquote><div><br></div><div style>Interesting. So we might have a top-level CMakeLists.txt that does a lot of detection stuff that could be re-used over packages (e.g. working out how to build FFTW optimally). By the time we got to the GROMACS subdirectory we would only have logic about how to build GROMACS given (perhaps partial) context. Given that our src/CMakeLists.txt is basically a stub, that&#39;s not a big deal. I have a bunch of draft patches from Teemu to review, reorganizing our use of CMake for 5.0, so I should look at those in this light.</div>
<div style><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A few examples of this include the Open Chemistry superbuild,<br>
<br>
<a href="https://github.com/OpenChemistry/openchemistry" target="_blank">https://github.com/OpenChemistry/openchemistry</a><br>
<br>
The ParaView superbuild,<br>
<br>
<a href="http://paraview.org/gitweb?p=ParaViewSuperbuild.git;a=summary" target="_blank">http://paraview.org/gitweb?p=ParaViewSuperbuild.git;a=summary</a><br>
<br>
These repositories provide additional convenience to get new<br>
developers up and running, but you can use the Avogadro, ParaView, VTK<br>
repositories alone if you build the dependencies. Once you introduce a<br>
single external project target, all others that want to use it need to<br>
be external projects if you would like to depend upon them and have<br>
reliable builds across all platforms, generators and compilers. This<br>
is in my experience at least (after working with several of the CMake<br>
developers on projects making use of external project).<br></blockquote><div><br></div><div style>Having such a structure would make the barrier to entry for people wanting to add plugin functionality to (or from) GROMACS easier. Adding and calling an external fast multipole solver or QM code is a much easier proposition if done like this. Don&#39;t know if it might help PLUMED out. For 5.0, we already have some imported fragments of Boost and Google Mock as well as the historical fftpack and linear algebra stuff (and probably one or two other single files). Reorganizing along the lines Marcus suggests could be valuable. I&#39;ll take a look at those superbuilds and see how they work.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The other alternative that would work reliably is to use CMake to<br>
build FFTW (possibly creating the CMakeLists.txt files if they don&#39;t<br>
already exist) and using add_subdirectory to bring this in as a normal<br>
target. Something VTK does for many third party libraries for example,<br>
but the burden of maintaining a secondary build system for a project<br>
can be pretty high.<br></blockquote><div><br></div><div style>Yeah :-)</div><div style><br></div><div style>Mark</div><div style> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span class="HOEnZb"><font color="#888888"><br>
Marcus<br>
</font></span><div class="HOEnZb"><div class="h5">--<br>
gmx-developers mailing list<br>
<a href="mailto:gmx-developers@gromacs.org">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">gmx-developers-request@gromacs.org</a>.<br>
</div></div></blockquote></div><br></div></div>