I think I see what you mean; H5_HAVE_PARALLEL=1 will be defined in H5pubconf.h, which will then want to include mpi.h.
Just letting HDF5 pull in mpi.h, however, *should hopefully* not break other things. Be sure you're including the same include directory for mpi headers that hdf5 used (/opt/local/include/mpich-mp for +mpich, for example.) I'd say this is still likely the preferred (only practical?) way for an executable to use both parallel and serial HDF5 calls; I can't begin to think about the conflicts if you tried to link to two different libhdf5 (one built with parallel support, one without) libraries. Good luck! - Eric On Wed, Jan 20, 2016 at 11:39 AM, Francesco Miniati <[email protected]> wrote: > thanks. > the first problem i see (after trying) is that the parallel libraries need > the mpi headers, > which I don’t necessarily specify when I compile in serial. > I can provide those headers with an path to the proper include directory, but > then I get a long list of compilation fails. > it doesn’t seem to work, did you try yourself successfully ? > fm > >> On 20 Jan 2016, at 18:17, Eric A. Borisch <[email protected]> wrote: >> >> The 'parallel' version of HDF5 still supports all of the serial >> features; it additionally provides the ability to use MPI I/O for >> distributed HDF5 R/W. You need to select parallel IO explicitly in >> your code with all call to H5Pset_fapl_mpio(...) (for example) with >> the 'parallel' version -- otherwise you get the standard serial >> methods. >> >> Said differently: install the parallel version of HDF5; if you run >> into something you feel you can't do with it that you could with the >> 'non-parallel' version, let me know. >> >> Thanks, >> - Eric >> >> On Wed, Jan 20, 2016 at 11:07 AM, David Strubbe <[email protected]> >> wrote: >>> Right, you can only use one at a time. I think the options are (1) rewrite >>> the application to use only parallel (can't the parallel library do serial >>> operations too?); (2) make a second installation of macports with a >>> different prefix (not /opt/local), and install hdf5 serial in one and >>> parallel in the other. >>> >>> David >>> >>> On Wed, Jan 20, 2016 at 11:48 AM, Francesco Miniati <[email protected]> >>> wrote: >>>> >>>> hi >>>> >>>> I am using an application that requires both serial and parallel versions >>>> of hdf5. >>>> as far as I understand i can only install one version in /opt/local/ with >>>> macports >>>> and cannot specify a different installation directory, am I correct? >>>> >>>> In any case, is there a way to install both versions with macports in >>>> separate directories >>>> somewhere under /opt/local ? >>>> >>>> thanks a lot for your support, >>>> fm >> > _______________________________________________ macports-users mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-users
