[MacPorts] #39392: Bad linking between h5py and openmpi
#39392: Bad linking between h5py and openmpi ----------------------------+-------------------------------- Reporter: jolivetinsar@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Keywords: | Port: ----------------------------+-------------------------------- 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 -- Ticket URL: <https://trac.macports.org/ticket/39392> MacPorts <http://www.macports.org/> Ports system for OS X
#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
#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 | -------------------------------+-------------------------------- Comment (by eborisch@…): 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 [https://github.com/h5py/h5py/wiki/FAQ the h5py FAQ]. I'm planning to mark this as 'invalid' unless you think there is good reason not to. -- Ticket URL: <https://trac.macports.org/ticket/39392#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#39392: Bad linking between py-h5py and openmpi -------------------------------+-------------------------------- Reporter: jolivetinsar@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: invalid | Keywords: Port: py-h5py, openmpi | -------------------------------+-------------------------------- Changes (by sean@…): * status: new => closed * resolution: => invalid -- Ticket URL: <https://trac.macports.org/ticket/39392#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts