[gmx-developers] [RFC] setting up dependency between GMX_OPENMP and TNG_USE_OPENMP
Roland Schulz
roland at utk.edu
Tue Feb 11 23:00:49 CET 2014
On Tue, Feb 11, 2014 at 4:39 PM, Mark Abraham <mark.j.abraham at gmail.com>wrote:
>
> On Feb 11, 2014 7:26 PM, "Roland Schulz" <roland at utk.edu> wrote:
> >
> >
> >
> >
> > On Tue, Feb 11, 2014 at 1:08 PM, David van der Spoel <
> spoel at xray.bmc.uu.se> wrote:
> >>
> >> On 2014-02-11 14:40, Roland Schulz wrote:
> >> > Hi,
> >> >
> >> > why does TNG_USE_OPENMP even exist? Why would a user want to set
> >> > TNG_USE_OPENMP to something other than GMX_OPENMP? If it is really
> >> > needed I suggest making TNG_USE_OPENMP a multi-choice (on, off, auto),
> >> > where auto is the default and auto takes the value from GMX_OPENMP.
> >> >
> >> I guess because tng is also distributed as a separate package.
> >
> >
> > 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.
>
> 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.
>
If they don't have to have different values then using 'set (
TNG_USE_OPENMP "${GMX_OPENMP}" CACHE FORCE )' should solve the issue (with
the set being executed unconditional every time). This makes it a cache
variable for TNG and it makes sure that the value is always the same
as GMX_OPENMP.
> Magnus is experimenting with an external project to see if we can set up
> the trivial coupling that would then be possible.
>
See my comments on redmine why this doesn't help.
Roland
> The auto enum suggestion is a good one to keep in mind for the future!
>
> Mark
>
> > Roland
> >
> >>
> >> > Roland
> >> >
> >> >
> >> > On Mon, Feb 10, 2014 at 1:36 PM, Mark Abraham <
> mark.j.abraham at gmail.com
> >> > <mailto:mark.j.abraham at gmail.com>> wrote:
> >> >
> >> > 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
> >> > <mailto: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-developers
> >> > or send a mail to gmx-developers-request at gromacs.org
> >> > <mailto:gmx-developers-request at gromacs.org>.
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > ORNL/UT Center for Molecular Biophysics cmb.ornl.gov <
> http://cmb.ornl.gov>
> >>
> >> > 865-241-1537, ORNL PO BOX 2008 MS6309
> >> >
> >> >
> >>
> >>
> >> --
> >> David van der Spoel, Ph.D., Professor of Biology
> >> Dept. of Cell & Molec. Biol., Uppsala University.
> >> Box 596, 75124 Uppsala, Sweden. Phone: +46184714205.
> >> spoel at xray.bmc.uu.se http://folding.bmc.uu.se
> >> --
> >> 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.
> >>
> >>
> >>
> >>
> >
> >
> >
> > --
> > ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
> > 865-241-1537, ORNL PO BOX 2008 MS6309
> >
> > --
> > 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.
>
--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20140211/bfa3f91a/attachment-0001.html>
More information about the gromacs.org_gmx-developers
mailing list