Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query backend versions #1563

Open
franzpoeschel opened this issue Dec 1, 2023 · 0 comments
Open

Query backend versions #1563

franzpoeschel opened this issue Dec 1, 2023 · 0 comments

Comments

@franzpoeschel
Copy link
Contributor

Is your feature request related to a problem? If so, please describe.

Downstream applications might need to guard against bugs in e.g. ADIOS2 or HDF5. This is currently difficult, since it requires including backend-specific headers.

Describe the solution you'd like
Since backend versions can be changed in openPMD-api's design without an ABI change, this should ideally be runtime call.

We already have the following in version.hpp:

/** Return the feature variants of the openPMD-api library (run-time)
 *
 * @return std::map< std::string, bool > with variants such as backends
 */
std::map<std::string, bool> getVariants();

This cannot be extended to include version information without breaking API, but an additional call could help:

struct backend_information
{
     std::string version;
};

std::map<std::string, backend_information> getVariantsDetailed();

Describe alternatives you've considered

  1. Using #define macros: Would require including backend headers into public headers, which goes against our project structure and would make the ABI of user code depend on the available backends. Currently, installing a new version of e.g. ADIOS2 only requires relinking downstream applications.
  2. Fetching this information manually in downstream applications: Requires interacting with the backend libraries instead of going via openPMD-api.

Additional context
Required for implementing the open TODO in ComputationalRadiationPhysics/picongpu#4759

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant