View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015527CMakeCMakepublic2015-04-22 02:462016-02-01 09:10
ReporterNico Schlömer 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionCMake 3.4Fixed in VersionCMake 3.4 
Summary0015527: FindHDF5.cmake: Make it possible to require parallel builds
DescriptionSince Ubuntu 15.04, parallel [1] and serial [2] HDF5 installations no longer conflict and can be installed alongside. Calling `FIND_PACKAGE(HDF5)` on a system where both are installed will consistently pick one of the two (serial), making it impossible to to build against the parallel HDF5 installation without deinstalling the serial one.

FindHDF5.cmake already has a switch that tells you which version was picked after the fact, but it'd be really useful if you could *require* parallel (or serial) HDF5 when searching for it.


[1] http://packages.ubuntu.com/vivid/libhdf5-mpi-dev [^]
[2] http://packages.ubuntu.com/vivid/libhdf5-dev [^]
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0038578)
Brad King (manager)
2015-04-22 09:37

The FindHDF5 module currently has no maintainer:

 http://www.cmake.org/Wiki/CMake:Module_Maintainers [^]

so no one is actively working on issues reported against it.
(0039257)
Pierre de Buyl (reporter)
2015-08-09 17:43

Can you try with

-DHDF5_Fortran_COMPILER_EXECUTABLE=h5pfc

added to your cmake invocation, after removing the CMakeFiles from your build dir? On debian I could make it pick the parallel install.
(0039271)
Nico Schlömer (reporter)
2015-08-12 12:51

@Pierre Nope, I'm just getting
```
-- Unable to determine HDF5 Fortran flags from HDF5 wrapper.
```
then (and it CMake finds the serial HDF5).
(0039272)
Pierre de Buyl (reporter)
2015-08-12 13:30

For further tracking it would be good to have cmake version, hdf5 version, etc.

The FindHDF5 file issues the message you see when the exit status of "h5pfc -show" is not 0.

Can you compile and execute properly a parallel HDF5 Fortran program?

What is the output of "h5pfc -show"?
(0039275)
Nico Schlömer (reporter)
2015-08-12 14:34

I was able to find the correct libraries by explicitly setting the HDF5 paths
```
    -DHDF5_INCLUDE_DIRS:PATH=/usr/include/hdf5/openmpi/ \
    -DHDF5_LIBRARY_DIRS:PATH=/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ \

```
I guess we could consider this bug invalid then.
(0039356)
Paul Romano (reporter)
2015-08-30 21:01

I can confirm that it if both h5cc and h5pcc (or h5fc/h5pfc) are on a user's PATH, FindHDF5.cmake will consistently pick the serial installation and thus there is no way to get it to find the parallel version. This seems to be because a single call to find_program(...) searches for both h5cc and h5pcc but h5cc appears first. If you reverse them and list h5pcc first, then the parallel version becomes preferred. Thus, one simple solution might be to just introduce a variable, say HDF5_PREFER_PARALLEL, which determines the search order. If it's true, then the call to find_program would list h5pcc first.

Nico, I tried your solution but it doesn't work for me, i.e., HDF5_LIBRARIES still returns libraries for the serial installation.
(0039410)
Paul Romano (reporter)
2015-09-14 04:45
edited on: 2015-09-14 04:46

The HDF5_PREFER_PARALLEL solution has been implemented on the 'next' branch:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd26a19a [^]

(0039418)
Brad King (manager)
2015-09-14 10:12

The change linked in 0015527:0039410 is now in 'master'.
(0040396)
Robert Maynard (manager)
2016-02-01 09:10

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2015-04-22 02:46 Nico Schlömer New Issue
2015-04-22 09:37 Brad King Note Added: 0038578
2015-08-09 17:43 Pierre de Buyl Note Added: 0039257
2015-08-12 12:51 Nico Schlömer Note Added: 0039271
2015-08-12 13:30 Pierre de Buyl Note Added: 0039272
2015-08-12 14:34 Nico Schlömer Note Added: 0039275
2015-08-30 21:01 Paul Romano Note Added: 0039356
2015-09-14 04:45 Paul Romano Note Added: 0039410
2015-09-14 04:46 Paul Romano Note Edited: 0039410
2015-09-14 10:12 Brad King Note Added: 0039418
2015-09-14 10:12 Brad King Status new => resolved
2015-09-14 10:12 Brad King Resolution open => fixed
2015-09-14 10:12 Brad King Fixed in Version => CMake 3.4
2015-09-14 10:12 Brad King Target Version => CMake 3.4
2016-02-01 09:10 Robert Maynard Note Added: 0040396
2016-02-01 09:10 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team