Opened 11 years ago

Last modified 11 years ago

#39392 closed defect

Bad linking between py-h5py and openmpi — at Version 1

Reported by: jolivetr Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: mww@…, eborisch@…
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 (1)

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.

Note: See TracTickets for help on using tickets.