On 14.06.2015 16:28, Sandro Mani wrote:

I was rather thinking, is there an obvious disadvantage in having a {mpich,openmpi}-find-requires.sh script which encodes the mpi flavour in the provides/requires? I.e.

libfoo.so.0()(64bit)(openmpi)

Rules to generate such requires/provides:
* Provides: if the path of the library starts with $MPI_LIB, append the (openmpi) resp (mpich) to the provides string
* Requires: if the path of the scanned object starts with $MPI_LIB and the required library exists in $MPI_LIB, add (openmpi) resp (mpich) to the requires string

Overriding the find-requires.sh could be done with a %{?openmpi_package_header}.
Concrete examples:

https://smani.fedorapeople.org/mpi-find-provides
https://smani.fedorapeople.org/mpi-find-requires

Konsole output
$ echo -e "/usr/lib64/openmpi/lib/libnglib-5.3.1.so\n/usr/lib64/libnglib-5.3.1.so" | ./mpi-find-provides          
libnglib-5.3.1.so()(64bit)(openmpi-x86_64)
libnglib-5.3.1.so()(64bit)

Konsole output
$ echo /usr/lib64/openmpi/lib/libGmsh.so.2.9.3 | ./mpi-find-requires
[...]

libm.so.6()(64bit)
libm.so.6(GLIBC_2.2.5)(64bit)
libmathex.so.0()(64bit)
libmed.so.1()(64bit)
libmmg3d4.so.4()(64bit)
libmpi.so.1()(64bit)(openmpi-x86_64)
libmpi_cxx.so.1()(64bit)(openmpi-x86_64)
libngcsg.so.0()(64bit)(openmpi-x86_64)
libngmesh.so.0()(64bit)(openmpi-x86_64)
libngocc.so.0()(64bit)(openmpi-x86_64)
libpng16.so.16()(64bit)
libpng16.so.16(PNG16_0)(64bit)
libpthread.so.0()(64bit)
[...]

Sounds like a plan?