Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-03-03 Thread Thibaut Paumard
Hi again, Le 03/03/2020 à 11:55, Drew Parsons a écrit : >> Actually, it may be wise to choose names that >> >>   a) are clearly private, so people know they should not start using >> explicitly h5py_serial or h5py_mpi; >> >>   b) will not clash with anything upstream may adopt in the future, a

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-03-03 Thread Drew Parsons
On 2020-03-03 18:40, Thibaut Paumard wrote: Hi Drew, Le 02/03/2020 à 17:33, Drew Parsons a écrit : Like you, I would keep h5py_serial and h5py_mpi separate rather than submodules of h5py. Mostly because the h5py folks could in the future want to use those two names and do it in an incompatible

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-03-03 Thread Thibaut Paumard
Hi Drew, Le 02/03/2020 à 17:33, Drew Parsons a écrit : >> Like you, I would keep h5py_serial and h5py_mpi separate rather than >> submodules of h5py. Mostly because the h5py folks could in the future >> want to use those two names and do it in an incompatible manner. > > Fair enough, I'll keep

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-03-02 Thread Drew Parsons
On 2020-03-02 23:58, Thibaut Paumard wrote: Hi Drew, I see, so you effectively copy all symbols from _h5py except those that look like __foo__ which is Python internal stuff, *and* you give them an entry under h5py in sys.modules. Nice, that should be pretty stable. Thanks for reviewing,

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-03-02 Thread Thibaut Paumard
Hi Drew, I see, so you effectively copy all symbols from _h5py except those that look like __foo__ which is Python internal stuff, *and* you give them an entry under h5py in sys.modules. Nice, that should be pretty stable. Actually, you don't treat public_api differently from weak_privates, and

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-03-02 Thread Drew Parsons
On 2020-03-02 18:21, Thibaut Paumard wrote: Le 01/03/2020 à 20:26, Drew Parsons a écrit : your h5py suggestion of [...] works up to a point. Hi Drew, Do I read correctly in your other mail that you have found a workaround? That's right, I've been building up my python-fu. My first take

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-03-02 Thread Thibaut Paumard
Le 01/03/2020 à 20:26, Drew Parsons a écrit : > your h5py suggestion of [...] > works up to a point. Hi Drew, Do I read correctly in your other mail that you have found a workaround? My first take would have been to apply my initial suggestion to each individual sub-module but that depends on

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-03-01 Thread Drew Parsons
Source: h5py Followup-For: Bug #944769 Combination of setattr and resetting entries in sys.modules to the h5py namespace seems to get the job done. -- debian-science-maintainers mailing list debian-science-maintainers@alioth-lists.debian.net

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-03-01 Thread Drew Parsons
Source: h5py Followup-For: Bug #944769 Hi Thibaut, your h5py suggestion of if MPI_ACTIVE: from h5py_mpi import * else: from h5py_serial import * works up to a point. But it's not a full and simple solution because of the way Python handles submodules. Some of the internal files,

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-02-26 Thread Jameson Graef Rollins
severity 944769 serious thanks Bumping this back up to serious since it hasn't been addressed yet. It's just not acceptable that this package is not usable when the host is offline. Hopefully we can see this addressed soon. Thanks. jamie. servo:~ 0$ python3 -c 'import h5py'

Processed: Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-02-26 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org: > severity 944769 serious Bug #944769 [python3-h5py] python3-h5py fails to import if offline due to apparent MPI failure Severity set to 'serious' from 'important' > thanks Stopping processing here. Please contact me if you need assistance. --

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-01-29 Thread Thibaut Paumard
Hi Drew, Le 27/01/2020 à 05:40, Drew Parsons a écrit : > from os import getenv as os_getenv > OPENMPI_MULTIPROC = os_getenv('OMPI_COMM_WORLD_SIZE') and > int(os_getenv('OMPI_COMM_WORLD_SIZE')) > 1 > MPICH_MULTIPROC = os_getenv('MPI_LOCALNRANKS') and > int(os_getenv('MPI_LOCALNRANKS'))>1 >

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2020-01-26 Thread Drew Parsons
Source: h5py Followup-For: Bug #944769 It might not be so simple. Some of the code is cython, so the obvious runtime tests don't work, not via os.getenv at least. For instance, the instance of "if MPI:" in api_types_ext.pxd can be patched to from os import getenv as os_getenv

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2019-11-17 Thread Drew Parsons
Source: h5py Followup-For: Bug #944769 Thanks for your analysis, Thibaut. Testing OMPI_COMM_WORLD_SIZE and MPI_LOCALNRANKS is a decent idea. Fair enough that non-MPI users shouldn't have to worry about MPI settings (the MPI capability should be transparent if not explicitly invoked). Drew --

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2019-11-15 Thread Thibaut Paumard
Le 15/11/2019 à 11:21, Thibaut Paumard a écrit : > There are ways to detect whether a job is running under MPI (at least as > far as OpenMPI is concerned, I did not find the equivalent for MPICH). > > What I do in my own code is checking for the environment variable > OMPI_COMM_WORLD_SIZE. If it

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2019-11-15 Thread Thibaut Paumard
Dear Jamie, Le 15/11/2019 à 09:48, Jameson Graef Rollins a écrit : > > I'm sorry, but I strongly disagree. This situation is not artificial in > any way. This bug was triggered by the default configuration on my > laptop when my primary network interface was down, a very common > situation.

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2019-11-15 Thread Jameson Graef Rollins
On Fri, 15 Nov 2019 15:36:23 +0800 Drew Parsons wrote: > Package: python3-h5py > Version: 2.10.0-2 > Followup-For: Bug #944769 > Control: severity -1 important > > I don't think this issue warrants severity Serious. > > The failure is not triggered simply by having no network connection. > It

Bug#944769: python3-h5py fails to import if offline due to apparent MPI failure

2019-11-14 Thread Drew Parsons
Package: python3-h5py Version: 2.10.0-2 Followup-For: Bug #944769 Control: severity -1 important I don't think this issue warrants severity Serious. The failure is not triggered simply by having no network connection. It is only triggered if there is no network interface at all. The only way