Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#45911 closed defect (fixed)

py27-h5py @2.3.1_1 built against parallel HDF5 can't find mpi.h

Reported by: willic3@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc: eborisch (Eric A. Borisch), seanfarley (Sean Farley), petrrr
Port: py27-h5py, openmpi-gcc48

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi,

I am attempting to build py27-h5py on Yosemite. I have the following hdf5 installed: hdf5 @1.8.13_0+cxx+gcc48+openmpi+szip. The difficulty is that openmpi puts headers in the subdirectory /opt/local/include/openmpi-gcc48, so when I try to build py27-h5py I get:

In file included from h5py/defs.c:241:
In file included from h5py/api_compat.h:27:
In file included from /opt/local/include/hdf5.h:24:
/opt/local/include/H5public.h:61:13: fatal error: 'mpi.h' file not found
#   include <mpi.h>
            ^
1 warning and 1 error generated.

I would think the problem could be avoided by either defining CPPFLAGS appropriately or by using mpicc for compilation. My system info:

OS X 10.10
Xcode 6.1
clang: Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)

Installed openmpi:

openmpi-default @1.7.5_3+gcc48 (active)
openmpi-gcc48 @1.7.5_3+fortran (active)

Please let me know if you need any more info.

Thanks,
Charles

Change History (11)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: eborisch@… sean@… added
Description: modified (diff)
Port: py27-h5py openmpi-gcc48 added

comment:2 Changed 10 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:3 Changed 9 years ago by petrrr

I believe the correct strategy would be to use h5cc or h5pcc respectively.

comment:4 Changed 9 years ago by eborisch (Eric A. Borisch)

Resolution: duplicate
Status: newclosed

See #48473.

comment:5 Changed 9 years ago by petrrr

Okay, I have play with this a bit and here are some observation:

  1. configure.cc mpicc the port compiles against a parallel version

Obviously, this is not a real solution as /opt/local/bin/mpicc is created by port select and there is not simple way to make this reproducible. You would need to discover which is actually the hdf5 variant to pick the correct wrapper. Does not look very attractive.

  1. configure.cc h5pcc get's pretty far, but fails when the *.so files are to be created. This because the -undefined dynamic_lookup flag is not accepted by h5pcc. For the rest h5pcc seems to work. However, there is also the issue that for a serial hdf5 there is a h5cc wrapper, while for a parallel hdf5 there there is only a h5pcc wrapper.

comment:6 Changed 9 years ago by petrrr

Resolution: duplicate
Status: closedreopened

This is not a duplicate it is only related to ticket #48473! Reopening.

comment:7 Changed 9 years ago by eborisch (Eric A. Borisch)

Have you tried the patch in the other ticket? I was able to build parallel h5py; i've tested it out with a simple parallel HDF5 example, too.

Assuming that works for you, what do you still want addressed here? The mpi portgroup (and associated using of the appropriate mpicc wrappers) should address header location issues.

comment:8 Changed 9 years ago by eborisch (Eric A. Borisch)

And yes, using compilers.cc works, and it gets pointed to the specific variant (insensitive to 'port select') of mpi you choose (thanks to the mpi portgroup' hard work.)

comment:9 Changed 9 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: reopenedclosed

This is now fixed thanks to r139726.

comment:10 Changed 9 years ago by petrrr

Sean, not convinced that this is full fixed by r139726. See comment and discussion. I believe there is a point in installing h5py, without parallel support. But your hdf5 library may already be installed with or without mpi.

comment:11 in reply to:  10 Changed 9 years ago by seanfarley (Sean Farley)

Replying to petr@…:

Sean, not convinced that this is full fixed by r139726. See comment and discussion. I believe there is a point in installing h5py, without parallel support. But your hdf5 library may already be installed with or without mpi.

Yes, I saw that. I'm not convinced hdf5 is a robust enough library to support this. Your comment in the portfile will never, ever work.

Note: See TracTickets for help on using tickets.