<div dir="ltr">Hi,<div><br></div><div>why does <span style="font-family:arial,sans-serif;font-size:12.727272033691406px">TNG_USE_OPENMP even exist? Why would a user want to set </span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">TNG_USE_OPENMP to something other than </span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">GMX_OPENMP? If it is really needed I suggest making </span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">TNG_USE_OPENMP</span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"> a multi-choice (on, off, auto), where auto is the default and auto takes the value from </span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">GMX_OPENMP.</span></div>

<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Roland</span></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Mon, Feb 10, 2014 at 1:36 PM, Mark Abraham <span dir="ltr">&lt;<a href="mailto:mark.j.abraham@gmail.com" target="_blank">mark.j.abraham@gmail.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>
<p dir="ltr">Hi,</p>
<p dir="ltr">Good question. I think it may be unsolvable in the current setup. The TNG CMakeLists.cmake declares TNG_USE_OPENMP in its cache in the normal way, but since there is only one cache and GROMACS accesses that file with add_subdirectory, that makes
 that variable exist on the GROMACS cache. Now getting that variable to track GMX_OPENMP unless set by the user might be hard.</p>
<p dir="ltr">Using gmx_dependent_option seems like it might work, but I have not yet put enough time into reading/testing how those functions work. I am not sure from reading the descriptions if it can implement &quot;copy this value unless at some point these two
 values differed.&quot; Unless Teemu has some insight from how he built these, we might have to experiment and then document/extend accordingly.</p>
<p dir="ltr">Alternative: I believe we can give TNG its own cache by using what is called an external project. Since I don&#39;t think we need a separate cache variable in the GROMACS configuration UI for this OpenMP setting, this should side-step the above, because
 the TNG CMake will always see the parent project set the OpenMP in the TNG cache. Might have other benefits also.</p><span class="HOEnZb"><font color="#888888">
<p dir="ltr">Mark</p></font></span><div><div class="h5">
<div class="gmail_quote">On Feb 10, 2014 2:49 PM, &quot;Szilárd Páll&quot; &lt;<a href="mailto:pall.szilard@gmail.com" target="_blank">pall.szilard@gmail.com</a>&gt; wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I&#39;m trying to fix issue #1432, but I realized that I know very little<br>
about the gmxOptionUtilities cmake module, so I thought I&#39;d ask for<br>
comments and suggestions.<br>
<br>
Here&#39;s what I need to do (ideally/if possible):<br>
- The value of the TNG_USE_OPENMP cache variable should always have<br>
the same value as GMX_OPENMP (even if the latter gets changed multiple<br>
times) *unless*<br>
- The user manually set a value for the TNG_USE_OPENMP variable.<br>
<br>
I&#39;m guessing I should use the gmx_dependent_option() macro, but I&#39;m<br>
not sure how. Tips would be appreciated!<br>
<br>
Cheers,<br>
--<br>
Szilárd<br>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">
http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">
http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">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" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</blockquote>
</div>
</div></div></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov">cmb.ornl.gov</a><br>865-241-1537, ORNL PO BOX 2008 MS6309
</div>