pyclaw icon indicating copy to clipboard operation
pyclaw copied to clipboard

On Travis, either h5py or mpi breaks

Open ketch opened this issue 8 years ago • 6 comments

PyClaw is now compatible with Python 3, but some tests are failing on Travis because h5py fails to import there; see this test build, with the error

$ python -c "from clawpack.pyclaw import io; io.hdf5"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'clawpack.pyclaw.io' has no attribute 'hdf5'

@ahmadia can you lend a hand here? Do we need to add something to the hashdist stack? On my laptop I have no problem installing h5py for Python 3 and all the tests pass.

ketch avatar Dec 20 '16 11:12 ketch

Sorry; nevermind -- pip install h5py is all that was needed (although that revealed some hdf5 issues due to Python 3 changes).

ketch avatar Dec 20 '16 11:12 ketch

Do you mean our issues or hdf5 issues?

mandli avatar Dec 20 '16 14:12 mandli

Our issues. I solved that, but now there is something wrong with the Python 3 parallel builds...

ketch avatar Dec 20 '16 20:12 ketch

Okay, I reopened and renamed this. I can get hdf5 working and the serial tests passing by doing

pip install h5py

in .travis.yml; see this build: https://travis-ci.org/clawpack/pyclaw/builds/185434113 which is based on this branch: https://github.com/clawpack/pyclaw/pull/553.

Unfortunately, as you can also see there, this seems to break the parallel builds as described in https://github.com/clawpack/pyclaw/issues/554.

@ahmadia can you help me out here?

ketch avatar Dec 21 '16 06:12 ketch

I get the following error in my iMac (OS Yosemite 10.10.5) and Linux 16.04. Both have Python 3.5 installed. h5py version 2.6.0 comes with Anaconda 3.

======================================================================
ERROR: examples.euler_3d.Sedov({'solver_type': 'classic', 'num_cells': (16, 16, 16), 'num_output_times': 1, 'outdir': './_sedov_test_results'})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/hadjimy/programs/anaconda/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/Users/hadjimy/programs/clawpack/clawpack/pyclaw/util.py", line 175, in <lambda>
    test = lambda: test_app(application, verifier, test_kwargs)
  File "/Users/hadjimy/programs/clawpack/clawpack/pyclaw/util.py", line 240, in test_app
    claw.run()
  File "/Users/hadjimy/programs/clawpack/clawpack/pyclaw/controller.py", line 354, in run
    self.output_options)
  File "/Users/hadjimy/programs/clawpack/clawpack/pyclaw/solution.py", line 295, in write
    options=options,write_p=write_p)
  File "/Users/hadjimy/programs/clawpack/clawpack/pyclaw/io/hdf5.py", line 123, in write
    subgroup.attrs['dimensions'] = patch.get_dim_attribute('name')
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/work/h5py/_objects.c:2696)
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/work/h5py/_objects.c:2654)
  File "/Users/hadjimy/programs/anaconda/lib/python3.5/site-packages/h5py/_hl/attrs.py", line 93, in __setitem__
    self.create(name, data=value, dtype=base.guess_dtype(value))
  File "/Users/hadjimy/programs/anaconda/lib/python3.5/site-packages/h5py/_hl/attrs.py", line 169, in create
    htype = h5t.py_create(original_dtype, logical=True)
  File "h5py/h5t.pyx", line 1450, in h5py.h5t.py_create (/Users/ilan/minonda/conda-bld/work/h5py/h5t.c:16090)
  File "h5py/h5t.pyx", line 1470, in h5py.h5t.py_create (/Users/ilan/minonda/conda-bld/work/h5py/h5t.c:15924)
  File "h5py/h5t.pyx", line 1531, in h5py.h5t.py_create (/Users/ilan/minonda/conda-bld/work/h5py/h5t.c:15883)
TypeError: No conversion path for dtype: dtype('<U1')
-------------------- >> begin captured stdout << ---------------------
{'use_petsc': False, 'solver_type': 'classic', 'num_cells': (16, 16, 16), 'num_output_times': 1, 'kernel_language': 'Fortran', 'outdir': './_sedov_test_results'}

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 63 tests in 34.570s

FAILED (errors=1)

hadjimy avatar Dec 21 '16 08:12 hadjimy

@hadjimy The dtype error is fixed in this patch, which unfortunately breaks other things.

ketch avatar Dec 21 '16 12:12 ketch