Skip to content

linking issues if parallel (MPI) and serial version are present #695

@dschwoerer

Description

@dschwoerer

I have a library A that requires hdf5. It only needs the serial version.
However, it also links with B that is linked with the parallel version, as it uses some of the parallel symbols.
While linking, I link like -lhdf5 -lB, which returns without errors, as all symbols in A are satisfied, but fails later at run time, because B has undefined symbols, as the serial version of hdf5 is linked.

I am not sure about this, but I think the clean solution would be to split out the parallel symbols into a sub-library, and if parallel symbols are expected, pull in the sub-library.

That way the serial version cannot conflict with the parallel version.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions