octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mpi.h vs. hdf5.h


From: Mike Miller
Subject: Re: mpi.h vs. hdf5.h
Date: Fri, 24 Apr 2015 09:38:02 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Apr 24, 2015 at 12:58:44 +0200, Juan Pablo Carbajal wrote:
> The problem came back in Ubuntu 15.04 none of the previous solutions
> work this time.
> 
> I have both libraries installed (apparently it is allowed in 15.04)

Right, the latest packages allow co-installation, but also require you
to choose your flavor and specify the include and library paths when
compiling.

> CFLAGS="-I/usr/lib/openmpi/include -I/usr/include/hdf5/openmpi"
> CPPFLAGS="-I/usr/lib/openmpi/include -I/usr/include/hdf5/openmpi"
> LDFLAGS="-L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/" ./configure
> 
> However compilation fails
[...]
> Suggestions?

The new packaging for HDF5 means you don't have to compile against an
MPI HDF5 library if you don't want to, so I don't.

If you really want to link against one of the MPI flavors of HDF5, it
looks like you will have to add -lmpi++ to your LIBS variable. Or
compile Octave with one of the MPI compiler wrappers.

FWIW I compile Octave with

    ../configure --with-hdf5-includedir=/usr/include/hdf5/serial \
                 --with-hdf5-libdir=/usr/lib/x86_64-linux-gnu/hdf5/serial

More details: your error looks vaguely familiar to me. I think it's
because HDF5 is a C library, so it doesn't link against the C++ MPI
library when it is built. But when you build a C++ program against it,
the includes pull in all of the MPI C++ definitions, so you do need the
C++ MPI library.

HTH,

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]