[MacPorts] #48473: py-h5py @2.5.0_1: add parallel support
#48473: py-h5py @2.5.0_1: add parallel support -------------------------+------------------------ Reporter: petr@… | Owner: eborisch@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: | Port: py-h5py -------------------------+------------------------ This ticket requests the addition of parallel support (i.e. MPI mode). See here for more details: http://docs.h5py.org/en/latest/build.html#building-against-parallel-hdf5 CAUTION: \\ The parallel build as documented on ~~http://docs.h5py.org/en/latest/mpi.html#parallel~~ talks about ~~`python setup.py build --mpi`~~ but this seems not to work. -- Ticket URL: <https://trac.macports.org/ticket/48473> MacPorts <https://www.macports.org/> Ports system for OS X
#48473: py-h5py @2.5.0_1: add parallel support --------------------------+------------------------ Reporter: petr@… | Owner: eborisch@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: py-h5py | --------------------------+------------------------ Comment (by eborisch@…): This should work, but I won't have time to dig into it for over a week. You will need to have hdf5 +{some mpi flavor} installed. If anyone wants to test this out further and commit it, feel free. {{{ Index: Portfile =================================================================== --- Portfile (revision 139023) +++ Portfile (working copy) @@ -3,6 +3,7 @@ PortSystem 1.0 PortGroup python 1.0 +PortGroup mpi 1.0 name py-h5py version 2.5.0 @@ -53,10 +54,18 @@ conflicts py${python.version}-h5py-devel } +if {[mpi_variant_isset]} { + pre-build { + system -W ${worksrcpath} "${python.bin} setup.py configure --mpi" + } + depends_lib-append port:py${python.version}-mpi4py +} + python.default_version 27 distname h5py-${version} if {${name} ne ${subport}} { + mpi.setup depends_lib-append port:py${python.version}-numpy \ port:py${python.version}-six \ port:py${python.version}-pkgconfig \ }}} -- Ticket URL: <https://trac.macports.org/ticket/48473#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#48473: py-h5py @2.5.0_1: add parallel support --------------------------+------------------------ Reporter: petr@… | Owner: eborisch@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: py-h5py | --------------------------+------------------------ Comment (by petr@…): Hi eborisch, I am looking into it. -- Ticket URL: <https://trac.macports.org/ticket/48473#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#48473: py-h5py @2.5.0_1: add parallel support --------------------------+------------------------ Reporter: petr@… | Owner: eborisch@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: py-h5py | --------------------------+------------------------ Comment (by petr@…): BTW: I missed to mention that this is related to ticket #45911. I do not consider it however identical, as you might want to install py- h4py without MPI support enabled, but be still able to build. -- Ticket URL: <https://trac.macports.org/ticket/48473#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#48473: py-h5py @2.5.0_1: add parallel support --------------------------+------------------------ Reporter: petr@… | Owner: eborisch@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: py-h5py | --------------------------+------------------------ Changes (by eborisch@…): * cc: petr@… (added) Comment: You can still install py-h5py with MPI support; just don't select one of the MPI variants. Updated version with variant checks for hdf5 and py-mpi4py (matching MPI implementations.) {{{ Index: Portfile =================================================================== --- Portfile (revision 139072) +++ Portfile (working copy) @@ -3,6 +3,7 @@ PortSystem 1.0 PortGroup python 1.0 +PortGroup mpi 1.0 name py-h5py version 2.5.0 @@ -57,6 +58,7 @@ distname h5py-${version} if {${name} ne ${subport}} { + mpi.setup depends_lib-append port:py${python.version}-numpy \ port:py${python.version}-six \ port:py${python.version}-pkgconfig \ @@ -68,6 +70,15 @@ copy ${worksrcpath}/lzf/LICENSE.txt \ ${destroot}${prefix}/share/doc/${subport} } + + if {[mpi_variant_isset]} { + mpi.enforce_variant hdf5 \ + py${python.version}-mpi4py + pre-build { + system -W ${worksrcpath} "${python.bin} setup.py configure --mpi" + } + depends_lib-append port:py${python.version}-mpi4py + } } livecheck.type regex }}} -- Ticket URL: <https://trac.macports.org/ticket/48473#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#48473: py-h5py @2.5.0_1: add parallel support --------------------------+------------------------ Reporter: petr@… | Owner: eborisch@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: py-h5py | --------------------------+------------------------ Comment (by petr@…): I came up with a different solution using the configure phase and propose it in the provided diff. Anyway, the result should be equivalent. This already, solve a relevant issue for me, so if you are fine, I would like to commit this. BTW: Just to clarify on the comments, I understand that installing h5py without variant will result in an installation without MPI support, if you are on clear ground. However, #45911 is about a failure to build h5py against a already installed parallel h5py. I tried to edit the comment above to become clearer. However, have no idea how this could be easily solved. -- Ticket URL: <https://trac.macports.org/ticket/48473#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#48473: py-h5py @2.5.0_1: add parallel support --------------------------+------------------------ Reporter: petr@… | Owner: eborisch@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: fixed | Keywords: Port: py-h5py | --------------------------+------------------------ Changes (by petr@…): * status: new => closed * resolution: => fixed Comment: I committed this in r139726. -- Ticket URL: <https://trac.macports.org/ticket/48473#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts