Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#46140 closed defect (fixed)

h5utils 1.12.1_7 fails install due to missing MPI libraries

Reported by: jason.b.roberts@… Owned by: higginja@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: petrrr
Port: h5utils

Description

I currently have the hdf5 port installed with several variants (hdf5 @1.8.13_0+cxx+gcc48+openmpi+szip ).

The MPI libraries get installed under /opt/local/include/openmpi ... When attempting to install h5utils, the installation fails because it can not find the proper parallel headers (e.g. mpi.h).

How can I tell the h5utils to include the proper /opt/local/include/openmpi directory for finding these headers during the port install process? I would prefer not to create a symbolic link for every header under /opt/local/include/openmpi into the /opt/local/include directory.

Change History (17)

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

Keywords: h5utils mpi.h openmpi hdf5 removed
Owner: changed from macports-tickets@… to higginja@…
Priority: HighNormal

comment:2 Changed 10 years ago by seanfarley (Sean Farley)

This is what the mpi portgroup was written for but I have yet to have the time to dig into refactoring it.

comment:3 in reply to:  2 Changed 10 years ago by jason.b.roberts@…

Replying to sean@…:

This is what the mpi portgroup was written for but I have yet to have the time to dig into refactoring it.

Im just now learning more about macports, and really have not done anything more than the basic steps of installing ports with "port install" (+variants). So I apologize if these questions seem simple.

What exactly is a "portgroup" ?

Is there any way to simply set something in my shell environment to tell the port during install to include the path to the "missing" headers ? How is the shell environment configured during the port installation? Does it ever inherit the calling shell environment flags or does every port setup its own base configuration? As an example, if I had CC=/opt/local/bin/gcc-mp-48 , would that be the compiler used during the port build or does the port setup its own compilers and flags ?

comment:4 Changed 10 years ago by seanfarley (Sean Farley)

No, setting environment variables will not affect macports. We'll need to wait for higginja to respond. The questions I have for him are:

  • can this port be set to openmaintainer?
  • can we add an octave variant?
  • why does h5utils depend on hdf4?

Once those are answered, I can potentially get a fix out.

comment:5 Changed 10 years ago by jason.b.roberts@…

Thanks!

Im going through the MacPorts guide a little more thoroughly and seem some answers to some of my questions (e.g. "what is a portgroup" ). But, its still not clear to me how those portgroups get invoked (do I have to do a special build, or can I note some flag/option following the "port install" command) to modify the environment. Maybe with a little more reading some of this will become clear. The frustrating part is I feel like I see the solution (i.e. add a path to headers /opt/local/include/openmpi ) but I don't know enough of the way the ports are installed to make the modification.

I did test by placing a symbolic link to the mpi.h into the /opt/local/include directory and the build made it further but crashed when missing yet another /opt/local/include/openmpi/ header file. While I think it would work to place a symlink for all of the *.h in /opt/local/include/openmpi , I just don't feel like that is in the nature of macports and worry that doing so would create potential issues/conflicts in the future.

comment:6 Changed 10 years ago by seanfarley (Sean Farley)

A portgroup is like a header file in C. It gets included into the port. The fix is to have h5utils use the same MPI compiler as hdf5. Basically, we need to copy the logic from the hdfoes5 portfile.

comment:7 Changed 10 years ago by jason.b.roberts@…

I should note that attempting to install the gdal library (port install gdal +curl +grib +hdf4 +hdf5 +netcdf) with the support also fails. It also fails due to the missing mpi.h (and presumably all other headers in /opt/local/include/openmpi ).

comment:8 Changed 10 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:9 Changed 10 years ago by jason.b.roberts@…

I tried to install again but this is still a problem. Because of the nature of dependencies on hdf5 for several scientific applications (e.g. gdal) , the ability to get h5utils to work with the MPI compiler would be great.

Out of curiosity, is there a specific difference between a portgroup and a "variant" of a port ? For instance, it would seem that if there were a variant (let's say, +openmpi ) for h5utils, it seems like adding that variant itself could be used to tell the port configure during install where the openmpi libraries are located.

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

Replying to jason.b.roberts@…:

I tried to install again but this is still a problem. Because of the nature of dependencies on hdf5 for several scientific applications (e.g. gdal) , the ability to get h5utils to work with the MPI compiler would be great.

I am sorry about that. My time is fairly constrained now with a new job but I am trying this week to fix these tickets.

Out of curiosity, is there a specific difference between a portgroup and a "variant" of a port ? For instance, it would seem that if there were a variant (let's say, +openmpi ) for h5utils, it seems like adding that variant itself could be used to tell the port configure during install where the openmpi libraries are located.

They are very different. A portgroup could define a variant. A variant is similar to a function, whereas the portgroup is a header file (using C conventions here). A header file could define a function, for example.

comment:11 Changed 10 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: newclosed

Fixed this in r130202. Let me know if this still fails. Thanks for your patience!

comment:12 in reply to:  11 Changed 10 years ago by jason.b.roberts@…

Replying to sean@…:

Fixed this in r130202. Let me know if this still fails. Thanks for your patience!

I am still having this issue when installing. It still fails by not finding mpi.h ... I did a "port selfupdate" and "port upgrade outdated" as well prior to trying to install. It says Im trying to install h5utils @1.12.1_7 ... Is this the correct version with the patch r130202 or do I need to somehow make sure Im using the newly patched version?

comment:13 Changed 10 years ago by seanfarley (Sean Farley)

Can you run 'port clean h5utils' and try again?

comment:14 in reply to:  13 Changed 10 years ago by jason.b.roberts@…

Replying to sean@…:

Can you run 'port clean h5utils' and try again?

Hi, Ive performed the clean but still no luck.

Would it help if I send you the log file?

comment:15 Changed 10 years ago by seanfarley (Sean Farley)

What is the output of:

$ port installed hdf5
$ port installed h5utils

And, sure, upload the log as well.

comment:16 Changed 10 years ago by jason.b.roberts@…

$port installed hdf5 The following ports are currently installed:

hdf5 @1.8.13_0+cxx+gcc48+openmpi+szip (active)

$ port installed h5utils None of the specified ports are installed.

* NOTE THIS NOW WORKS I made sure it was clean, and when I did a "port variants h5utils" , I now see +gcc48 and +openmpi as options. I was able to successfully install the port with these variants. I checked this morning for variants and had not seen these under h5utils, but it may have been prior to me performing the port selfupdate ...

For the "gdal" port, could these same modification be made? I had tried to install the gdal port with hdf4 and hdf5 variants but ran into the same (I believe) issue. Scrolling through the log, errors starting showing up after trying to install with hdf5 saying that the openmpi related libraries/headers could not be found.

comment:17 Changed 10 years ago by seanfarley (Sean Farley)

Great, glad to hear it works. Please open a new ticket about the gdal / hdf stuff so I can track it there.

Note: See TracTickets for help on using tickets.