FS#61591 - [python-h5py-openmpi] importing h5py package prevents running mpiexec

Attached to Project: Community Packages
Opened by Zach Jibben (threeofsix) - Thursday, 31 January 2019, 16:32 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Saturday, 31 October 2020, 15:41 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Bruno Pagani (ArchangeGabriel)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Running mpiexec through subprocess after importing h5py produces an exit code of 1 and empty stdout/stderr. This does not occur with h5py 2.9.0 installed via pip.

I am using:

- python-h5py-openmpi 2.9.0-1
- openmpi 3.1.3-1
- python 3.7.2-3

Steps to reproduce:

Python 3.7.2 (default, Jan 10 2019, 23:51:51)
[GCC 8.2.1 20181127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.run("mpiexec -n 1 echo test", shell=True, capture_output=True)
CompletedProcess(args='mpiexec -n 1 echo test', returncode=0, stdout=b'test\n', stderr=b'')
>>> import h5py
>>> subprocess.run("mpiexec -n 1 echo test", shell=True, capture_output=True)
CompletedProcess(args='mpiexec -n 1 echo test', returncode=1, stdout=b'', stderr=b'')

After uninstalling python-h5py-openmpi, the error goes away:

$ pip install --user h5py
$ python
Python 3.7.2 (default, Jan 10 2019, 23:51:51)
[GCC 8.2.1 20181127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.run("mpiexec -n 1 echo test", shell=True, capture_output=True)
CompletedProcess(args='mpiexec -n 1 echo test', returncode=0, stdout=b'test\n', stderr=b'')
>>> import h5py
>>> subprocess.run("mpiexec -n 1 echo test", shell=True, capture_output=True)
CompletedProcess(args='mpiexec -n 1 echo test', returncode=0, stdout=b'test\n', stderr=b'')

I also tested in a Python 3.6.8 virtual environment with h5py 2.9.0 installed via pip, which ran correctly.
This task depends upon

Closed by  Bruno Pagani (ArchangeGabriel)
Saturday, 31 October 2020, 15:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  Upstream 3.0.0 fixed that issue, now available in our repos.
Comment by Bruno Pagani (ArchangeGabriel) - Tuesday, 19 March 2019, 13:09 GMT
No idea why this is happening. You should likely ask upstream about it.

Loading...