Bug#946986: python3-h5py: h5py does not play nicely with subprocess and mpirun

Thibaut Paumard thibaut at debian.org
Wed Jan 29 13:11:32 GMT 2020


Hi,

Le 24/01/2020 à 13:17, Rafael Laboissière a écrit :
>>> I'm not sure subprocess is involved at all, it may be that MPI_Init()
>>> simply dies because h5py has already called it earlier.
>>>
>>
>> That sounds plausible.
> 
> I am not sure this would be an explanation for the problem.
> 
> At any rate, I found a minimal example that exposes the bug.  Consider
> these two scripts:
>  [...]

Looking for similar behavior outside of Python (thus independently of
import subprocess):

8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--
$ mpirun mpirun
**********************************************************

mpirun does not support recursive calls

**********************************************************
8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--


Another try, setting only thee environment (not a real recursive call,
but mpirun perceives it as recursive):

8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--
$ env mpirun > mpirun.env
$ while read line ; do export $line ; done < mpirun.env
$ mpirun
**********************************************************

mpirun does not support recursive calls

**********************************************************
8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--


My guess: import h5py implicitly sets up the MPI stack, including all
those environment variables. This is equivalent to running mpirun
recursively, which is not supported. Either mpirun notices and errors
out, or does not notice it and dies.

Like other issues, this points to not setting up the MPI stack when not
explicitly requested (see bug#944769 as mentioned by Drew).

Kind regards, Thibaut.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20200129/c727802d/attachment.sig>


More information about the debian-science-maintainers mailing list