[gmx-developers] Making libgromacs a dynamic loadable object

Erik Lindahl erik.lindahl at scilifelab.se
Sun Sep 29 10:32:13 CEST 2013


Hi,

I think this is unlikely to make it for 5.0, but long-term I would like to support multiple hardware accelerations in a single binary again, by making the actual binaries very small and loading one of several libraries as a dynamic module at runtime. This is not technically difficult to do, but there is one step that will be a little pain for us: Each symbol we want to use from the library must be resolved manually with a call to dlsym(). 

This means we should start thinking of two things to make life simpler in the future:

1) Decide on what level we want the interface between library and executables, and keep this interface _really_ small (in the sense that we want to resolve as few symbols as possible).
2) Since we will have to compile the high-level binaries with generic compiler flags, any code that is performance-sensitive should go in the architecture-specific optimized library. 

Mark: Considering (2), we might for instance prefer to move the main md loop to a library function. 
Obviously, we could also use an extra library or two for architecture-specific code in programs/tools/testutils, but that might be uglier?

Cheers,

Erik


More information about the gromacs.org_gmx-developers mailing list