[gmx-developers] [RFC] setting up dependency between GMX_OPENMP and TNG_USE_OPENMP
Mark Abraham
mark.j.abraham at gmail.com
Mon Feb 10 19:43:30 CET 2014
Hi,
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.
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.
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.
Mark
On Feb 10, 2014 2:49 PM, "Szilárd Páll" <pall.szilard at gmail.com> wrote:
> Hi,
>
> I'm trying to fix issue #1432, but I realized that I know very little
> about the gmxOptionUtilities cmake module, so I thought I'd ask for
> comments and suggestions.
>
> Here's what I need to do (ideally/if possible):
> - The value of the TNG_USE_OPENMP cache variable should always have
> the same value as GMX_OPENMP (even if the latter gets changed multiple
> times) *unless*
> - The user manually set a value for the TNG_USE_OPENMP variable.
>
> I'm guessing I should use the gmx_dependent_option() macro, but I'm
> not sure how. Tips would be appreciated!
>
> Cheers,
> --
> Szilárd
> --
> Gromacs Developers mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developersor send a mail to
> gmx-developers-request at gromacs.org.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20140210/bbe8ad3a/attachment-0001.html>
More information about the gromacs.org_gmx-developers
mailing list