Gilles Filippini a écrit le 07/11/2020 à 19:36 :
> Drew Parsons a écrit le 06/11/2020 à 04:02 :
>> On 2020-11-06 02:09, Gilles Filippini wrote:
>>>>
>>>> But we should document (or fix if possible) that this alternatives
>>>> mechanism is a little fragile, and sometimes the link needs to be
>>>> refresh with
>>>>   sudo dpkg-reconfigure libhdf5-openmpi-dev
>>>>
>>>> What I mean is that sometimes the link seem to just disappear, so we get
>>>>   $ pkg-config --libs hdf5-mpi
>>>>   Package hdf5-mpi was not found in the pkg-config search path.
>> ...
>>>
>>> Do you have a scenario leading to this alternative disparition?
>>>
>>
>>
>> It's not completely clear to me.  But my suspicion is that it happens
>> when there is an upgrade to openmpi. Evidently then hdf5 needs to update
>> its alternatives against the updated openmpi.
>>
>> It's a little strange though, since a simple openmpi update is not an
>> ABI update. The alternatives links would be the same after running
>> dpkg-reconfigure libhdf5-openmpi-dev. Not obvious why an openmpi update
>> would cause them to disappear.
> 
> After a test into a clean chroot I can now confirm this hypothesis.

The loss of the alternative is easily triggered by the reinstallation of
openmpi-bin:

# pkg-config --libs hdf5-mpi
-L/usr/lib/x86_64-linux-gnu/hdf5/openmpi 
-L/usr/lib/x86_64-linux-gnu/openmpi/lib -lhdf5 -lmpi
# apt-get install --reinstall ipenmpi-bin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ipenmpi-bin
(unstable-amd64-sbuild)root@pinibrem15:/tmp# pkg-config --libs hdf5-mpi
-L/usr/lib/x86_64-linux-gnu/hdf5/openmpi 
-L/usr/lib/x86_64-linux-gnu/openmpi/lib -lhdf5 -lmpi
(unstable-amd64-sbuild)root@pinibrem15:/tmp# apt-get install --reinstall 
openmpi-bin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
Need to get 0 B/127 kB of archives.
After this operation, 0 B of additional disk space will be used.
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 18500 files and directories currently installed.)
Preparing to unpack .../openmpi-bin_4.0.5-7_amd64.deb ...
Unpacking openmpi-bin (4.0.5-7) over (4.0.5-7) ...
Setting up openmpi-bin (4.0.5-7) ...
update-alternatives: warning: forcing reinstallation of alternative 
/usr/bin/mpicc.openmpi because link group mpi is broken
# pkg-config --libs hdf5-mpi
Package hdf5-mpi was not found in the pkg-config search path.
Perhaps you should add the directory containing `hdf5-mpi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'hdf5-mpi' found

It happens when reinstalling mpich as well, if the mpi alternative was 
previously set to mpich.

I have no idea how to fix it, other than asking openmpi and mpich maintainers 
to take care of the hdf5-mpi.pc slave alternative when it exists. What do you 
think?

Thanks,
Note the warning notice above. Honestly I have no idea how this could be fixed.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to