[MacPorts] #39392: Bad linking between py-h5py and openmpi (was: Bad linking between h5py and openmpi)
MacPorts
noreply at macports.org
Sat Jun 8 17:25:04 PDT 2013
#39392: Bad linking between py-h5py and openmpi
-------------------------------+--------------------------------
Reporter: jolivetinsar@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.1.3
Resolution: | Keywords:
Port: py-h5py, openmpi |
-------------------------------+--------------------------------
Changes (by ryandesign@…):
* cc: mww@…, eborisch@… (added)
* port: => py-h5py, openmpi
Old description:
> 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
New description:
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
--
Comment:
You should file the petsc4py port request as a separate ticket.
--
Ticket URL: <https://trac.macports.org/ticket/39392#comment:1>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list