Opened 11 years ago

Closed 11 years ago

#39392 closed defect (invalid)

Bad linking between py-h5py and openmpi

Reported by: jolivetr Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: mww@…, eborisch (Eric A. Borisch), petrrr
Port: py-h5py, openmpi

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi,

I am developing an mpi application with python. For this purpose, I need mpi4py, petsc, petsc4py (you should add it as a port) and h5py. To build petsc, I need to build hdf5-18 with the fortran variant, so I built hdf5-18 +cxx+fortran+openmpi

Then, installing h5py is not a problem. However, while running my code h5py behaves weirdly (it issues a segmentation fault while closing the hdf5 file) and there seem to be a problem with the link between hdf5 and mpi. So I tried to install h5py by building it (-s).

The issue is that it does not find mpi.h, because it looks for include files only in /opt/local/include and does not push further to the openmpi directory. I added in the setup.py file in the h5py files the following line:

        COMPILER_SETTINGS['include_dirs'] += ['/opt/local/include/openmpi']

and it compiles fine, and is installed. (it did not solve my problem, but I guess i have to look a bit deeper in my own code as well).

I am sure this solution is pretty dirty. Would it be possible to add an option in the portfile to specify that, if openmpi is installed (and no other mpi compiler), then the h5py builder has to go and look in the include/openmpi directory?

Cheers,

Romain

Change History (4)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mww@… eborisch@… added
Description: modified (diff)
Port: py-h5py openmpi added
Summary: Bad linking between h5py and openmpiBad linking between py-h5py and openmpi

You should file the petsc4py port request as a separate ticket.

comment:2 Changed 11 years ago by eborisch (Eric A. Borisch)

You might be running into problems because:

Currently h5py does not support the parallel version of the HDF5 library, which is based on MPI-IO.

From the h5py FAQ.

I'm planning to mark this as 'invalid' unless you think there is good reason not to.

comment:3 Changed 11 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

comment:4 Changed 11 years ago by seanfarley (Sean Farley)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.