Repository navigation
Load cuPotential support on demand - #561
Merged
Merged
Conversation
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, building Sire with
SIRE_CUPOTENTIAL_DIRcompiled cuPotential support into_SireOpenMMand linked it tolibOpenMMNvidia, so that build of Sire couldn't be loaded without that exact plugin library present, even if cuPotential was never used.The cuPotential-specific code now lives in a separate library,
libSireOpenMMNvidia, built only when the cuPotential headers are found and installed next to_SireOpenMM._SireOpenMMtalks to it through a small interface (cupotential.h) and loads it withdlopenonly whenuse_cupotentialis requested, or when the lambda lever meets a cuPotential force._SireOpenMMno longer links any cuPotential library, so the same Sire build works with or without the plugin installed.If the support can't be loaded,
use_cupotentialraises a clear error: either that Sire was built without cuPotential support, or the underlying load error. Failed loads aren't cached, so they can be retried.Tested with a patched cuPotential 0.3.5 build: the converted force is used, lambda-lever updates match stock OpenMM across lambda windows with and without REST2, context reinitialisation is exact, and NVT/NPT dynamics run as before. New tests cover the error when cuPotential is unavailable and the lambda dependence of the energy when it is available.
develinto this branch before issuing this pull request (e.g. by runninggit pull origin devel): [y]LICENSEfile: [y]