Skip to content

Commit

Permalink
fixes to make h5py build for MPI on SAVIO (http://research-it.berkele…
Browse files Browse the repository at this point in the history
  • Loading branch information
rdhyee committed Jul 26, 2015
1 parent d589928 commit f2e3f13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion h5py/h5p.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ from h5py import _objects
from ._objects import phil, with_phil

if MPI:
from mpi4py.mpi_c cimport MPI_Comm, MPI_Info, MPI_Comm_dup, MPI_Info_dup, \
# reverse https://github.com/h5py/h5py/commit/bdd573ff73711ccce339a91ac82a058cdd910498
from mpi4py.libmpi cimport MPI_Comm, MPI_Info, MPI_Comm_dup, MPI_Info_dup, \
MPI_Comm_free, MPI_Info_free

# Initialization
Expand Down
9 changes: 9 additions & 0 deletions setup_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,16 @@ def run(self):

# Run Cython
print("Executing cythonize()")

# https://github.com/h5py/h5py/issues/532#issuecomment-73631137
try:
import mpi4py
include_path = [mpi4py.get_include(),]
except:
include_path = []

self.extensions = cythonize(self._make_extensions(config),
include_path=include_path,
force=config.rebuild_required or self.force)
self.check_rerun_cythonize()

Expand Down

0 comments on commit f2e3f13

Please sign in to comment.