<p dir="ltr"><br>
On Feb 11, 2014 7:26 PM, &quot;Roland Schulz&quot; &lt;<a href="mailto:roland@utk.edu">roland@utk.edu</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Feb 11, 2014 at 1:08 PM, David van der Spoel &lt;<a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 2014-02-11 14:40, Roland Schulz wrote:<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; why does TNG_USE_OPENMP even exist? Why would a user want to set<br>
&gt;&gt; &gt; TNG_USE_OPENMP to something other than GMX_OPENMP? If it is really<br>
&gt;&gt; &gt; needed I suggest making TNG_USE_OPENMP a multi-choice (on, off, auto),<br>
&gt;&gt; &gt; where auto is the default and auto takes the value from GMX_OPENMP.<br>
&gt;&gt; &gt;<br>
&gt;&gt; I guess because tng is also distributed as a separate package.<br>
&gt;<br>
&gt;<br>
&gt; That would explain why we need the variable TNG_USE_OPENMP, but not why that variable ever needs to be different than GMX_OPENMP. If there is no need for the user to be able to choose them independent, then it is trivial, because we can simply set TNG_USE_OPENMP to GMX_OPENMP.</p>

<p dir="ltr">Agree there is no known need to have them have different values. As I said earlier, our use of TNG needs this to be a cache variable, which means there are persistence issues when GMX_OPENMP changes, whether we use set(... CACHE FORCE) or not. Magnus is experimenting with an external project to see if we can set up the trivial coupling that would then be possible.</p>

<p dir="ltr">The auto enum suggestion is a good one to keep in mind for the future!</p>
<p dir="ltr">Mark</p>
<p dir="ltr">&gt; Roland<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt; Roland<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Mon, Feb 10, 2014 at 1:36 PM, Mark Abraham &lt;<a href="mailto:mark.j.abraham@gmail.com">mark.j.abraham@gmail.com</a><br>
&gt;&gt; &gt; &lt;mailto:<a href="mailto:mark.j.abraham@gmail.com">mark.j.abraham@gmail.com</a>&gt;&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;     Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;     Good question. I think it may be unsolvable in the current setup.<br>
&gt;&gt; &gt;     The TNG CMakeLists.cmake declares TNG_USE_OPENMP in its cache in the<br>
&gt;&gt; &gt;     normal way, but since there is only one cache and GROMACS accesses<br>
&gt;&gt; &gt;     that file with add_subdirectory, that makes that variable exist on<br>
&gt;&gt; &gt;     the GROMACS cache. Now getting that variable to track GMX_OPENMP<br>
&gt;&gt; &gt;     unless set by the user might be hard.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;     Using gmx_dependent_option seems like it might work, but I have not<br>
&gt;&gt; &gt;     yet put enough time into reading/testing how those functions work. I<br>
&gt;&gt; &gt;     am not sure from reading the descriptions if it can implement &quot;copy<br>
&gt;&gt; &gt;     this value unless at some point these two values differed.&quot; Unless<br>
&gt;&gt; &gt;     Teemu has some insight from how he built these, we might have to<br>
&gt;&gt; &gt;     experiment and then document/extend accordingly.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;     Alternative: I believe we can give TNG its own cache by using what<br>
&gt;&gt; &gt;     is called an external project. Since I don&#39;t think we need a<br>
&gt;&gt; &gt;     separate cache variable in the GROMACS configuration UI for this<br>
&gt;&gt; &gt;     OpenMP setting, this should side-step the above, because the TNG<br>
&gt;&gt; &gt;     CMake will always see the parent project set the OpenMP in the TNG<br>
&gt;&gt; &gt;     cache. Might have other benefits also.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;     Mark<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;     On Feb 10, 2014 2:49 PM, &quot;Szilárd Páll&quot; &lt;<a href="mailto:pall.szilard@gmail.com">pall.szilard@gmail.com</a><br>
&gt;&gt; &gt;     &lt;mailto:<a href="mailto:pall.szilard@gmail.com">pall.szilard@gmail.com</a>&gt;&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;         Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;         I&#39;m trying to fix issue #1432, but I realized that I know very<br>
&gt;&gt; &gt;         little<br>
&gt;&gt; &gt;         about the gmxOptionUtilities cmake module, so I thought I&#39;d ask for<br>
&gt;&gt; &gt;         comments and suggestions.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;         Here&#39;s what I need to do (ideally/if possible):<br>
&gt;&gt; &gt;         - The value of the TNG_USE_OPENMP cache variable should always have<br>
&gt;&gt; &gt;         the same value as GMX_OPENMP (even if the latter gets changed<br>
&gt;&gt; &gt;         multiple<br>
&gt;&gt; &gt;         times) *unless*<br>
&gt;&gt; &gt;         - The user manually set a value for the TNG_USE_OPENMP variable.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;         I&#39;m guessing I should use the gmx_dependent_option() macro, but I&#39;m<br>
&gt;&gt; &gt;         not sure how. Tips would be appreciated!<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;         Cheers,<br>
&gt;&gt; &gt;         --<br>
&gt;&gt; &gt;         Szilárd<br>
&gt;&gt; &gt;         --<br>
&gt;&gt; &gt;         Gromacs Developers mailing list<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;         * Please search the archive at<br>
&gt;&gt; &gt;         <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a><br>
&gt;&gt; &gt;         before posting!<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;         * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;         * For (un)subscribe requests visit<br>
&gt;&gt; &gt;         <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a><br>
&gt;&gt; &gt;         or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a><br>
&gt;&gt; &gt;         &lt;mailto:<a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>&gt;.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov">cmb.ornl.gov</a> &lt;<a href="http://cmb.ornl.gov">http://cmb.ornl.gov</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt; 865-241-1537, ORNL PO BOX 2008 MS6309<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; David van der Spoel, Ph.D., Professor of Biology<br>
&gt;&gt; Dept. of Cell &amp; Molec. Biol., Uppsala University.<br>
&gt;&gt; Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.<br>
&gt;&gt; <a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>    <a href="http://folding.bmc.uu.se">http://folding.bmc.uu.se</a><br>
&gt;&gt; --<br>
&gt;&gt; Gromacs Developers mailing list<br>
&gt;&gt;<br>
&gt;&gt; * Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
&gt;&gt;<br>
&gt;&gt; * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;&gt;<br>
&gt;&gt; * For (un)subscribe requests visit<br>
&gt;&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>

&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; -- <br>
&gt; ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov">cmb.ornl.gov</a><br>
&gt; 865-241-1537, ORNL PO BOX 2008 MS6309<br>
&gt;<br>
&gt; --<br>
&gt; Gromacs Developers mailing list<br>
&gt;<br>
&gt; * Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
&gt;<br>
&gt; * Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists">http://www.gromacs.org/Support/Mailing_Lists</a><br>
&gt;<br>
&gt; * For (un)subscribe requests visit<br>
&gt; <a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>

</p>