<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 "copy this value unless at some point these two values differed." 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'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>
<p dir="ltr">Mark</p>
<div class="gmail_quote">On Feb 10, 2014 2:49 PM, "Szilárd Páll" <<a href="mailto:pall.szilard@gmail.com">pall.szilard@gmail.com</a>> 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'm trying to fix issue #1432, but I realized that I know very little<br>
about the gmxOptionUtilities cmake module, so I thought I'd ask for<br>
comments and suggestions.<br>
<br>
Here'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'm guessing I should use the gmx_dependent_option() macro, but I'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'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">gmx-developers-request@gromacs.org</a>.<br>
</blockquote></div>