HDF5 : variables available in CMake

Hello,

I built HDF5 from source with CMake. I need parallel HDF5 so I set HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows "Parallel HDF5: ON". So this is OK.

Now with this CMakeLists.txt:
~> more CMakeLists.txt
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
FIND_PACKAGE ( HDF5 1.8 REQUIRED C )

I do not get HDF5_IS_PARALLEL :
~> cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads
~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff
HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Why HDF5_IS_PARALLEL is not available?

Franck

Hi Frank,

which cmake version are you using? I checked your code with cmake 3.0.2 under fc21 and it works:

cmake -LA|grep HDF
CMake Error: The source directory "/home/steinbac/development/cmake_sandbox/hdf5/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_INCLUDE_DIR:PATH=/usr/include
HDF5_DIFF_EXECUTABLE:FILEPATH=/usr/bin/h5diff
HDF5_DIR:PATH=HDF5_DIR-NOTFOUND
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc
HDF5_IS_PARALLEL:BOOL=FALSE
HDF5_dl_LIBRARY_DEBUG:FILEPATH=HDF5_dl_LIBRARY_DEBUG-NOTFOUND
HDF5_dl_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libdl.so
HDF5_hdf5_LIBRARY_DEBUG:FILEPATH=HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND
HDF5_hdf5_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libhdf5.so
HDF5_m_LIBRARY_DEBUG:FILEPATH=HDF5_m_LIBRARY_DEBUG-NOTFOUND
HDF5_m_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libm.so
HDF5_z_LIBRARY_DEBUG:FILEPATH=HDF5_z_LIBRARY_DEBUG-NOTFOUND
HDF5_z_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libz.so

Best,
Peter

···

On 08/03/2015 02:19 PM, houssen wrote:

Hello,

I built HDF5 from source with CMake. I need parallel HDF5 so I set
HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows "Parallel
HDF5: ON". So this is OK.

Now with this CMakeLists.txt:
~> more CMakeLists.txt
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
FIND_PACKAGE ( HDF5 1.8 REQUIRED C )

I do not get HDF5_IS_PARALLEL :
~> cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads
~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Why HDF5_IS_PARALLEL is not available?

Franck

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Hi Franck,

I suspect it has something to do with your system or your installation. I was finally able to build the cmake dummy package and the CMakeCache contains the HDF5_IS_PARALLEL correctly!

Here are my module files again:
# cmake/3.3.0
set soft_path /sw/apps/$soft_ware/$soft_version
set soft_arch x86_64
module-whatis "${soft_ware} ${soft_version}"

prepend-path PATH $soft_path/bin
prepend-path LD_LIBRARY_PATH $soft_path/lib
prepend-path CMAKE_PREFIX_PATH $soft_path/share/cmake-3.3

# hdf5/1.8.15-p1-openmpi
set path /sw/users/steinbac/software/$soft_ware/${soft_version}
set soft_arch x86_64
module-whatis "${soft_ware} ${soft_version}"

append soft_dependencies "openmpi/1.8.5"

prepend-path PATH $path/bin
prepend-path LD_LIBRARY_PATH $path/lib

I however have to say, that the FindHDF5 cmake module seems not to like the situation if your environment exposes multiple cmake installations, e.g.

LD_LIBRARY_PATH=/path/to/custom/hdf5:/usr/lib
                                      ^^^^^^^^ might also contain hdf5 libraries. The same holds for the PATH.

Best,
Peter

···

On 08/03/2015 02:19 PM, houssen wrote:

Hello,

I built HDF5 from source with CMake. I need parallel HDF5 so I set
HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows "Parallel
HDF5: ON". So this is OK.

Now with this CMakeLists.txt:
~> more CMakeLists.txt
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
FIND_PACKAGE ( HDF5 1.8 REQUIRED C )

I do not get HDF5_IS_PARALLEL :
~> cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads
~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Why HDF5_IS_PARALLEL is not available?

Franck

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Hello Peter,

I run Ubuntu-14.04 (that provides CMake-2.8). I use CMake-3.3.0 that I had to build from source. I use modules.
Is there a specific feature to turn on when building CMake ? HDF5 ? Or some missing commands (prepend-path) in module files ? Or any other suggestions ?

Franck

~> more /home/houssen/Programs/ModuleFiles/CMake-3.3.0
#%Module1.0
prepend-path PATH /home/houssen/Programs/CMake/cmake-3.3.0/local/bin
prepend-path LD_LIBRARY_PATH /home/houssen/Programs/CMake/cmake-3.3.0/local/lib
prepend-path CMAKE_PREFIX_PATH /home/houssen/Programs/CMake/cmake-3.3.0/local/local/share/cmake-3.3

~> more /home/houssen/Programs/ModuleFiles/PHDF5-1.8.15
#%Module1.0
module load CMake-3.3.0
prepend-path PATH /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin
prepend-path LD_LIBRARY_PATH /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib
prepend-path CMAKE_PREFIX_PATH /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

~> module load PHDF5-1.8.15

~> module list
Currently Loaded Modulefiles:
   1) CMake-3.3.0 2) PHDF5-1.8.15

~> cmake .
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found HDF5: /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a (found suitable version "1.8.15", minimum required is "1.8")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads

~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff
HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

~> cmake -LA
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Téléchargements
-- Cache values
CMAKE_AR:FILEPATH=/usr/bin/ar
CMAKE_BUILD_TYPE:STRING=
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
CMAKE_C_FLAGS:STRING=
CMAKE_C_FLAGS_DEBUG:STRING=-g
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
CMAKE_INSTALL_PREFIX:PATH=/usr/local
CMAKE_LINKER:FILEPATH=/usr/bin/ld
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/usr/bin/strip
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff
HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

···

Le 2015-08-05 13:37, Peter Steinbach a écrit :

Hi Frank,

which cmake version are you using? I checked your code with cmake
3.0.2 under fc21 and it works:

cmake -LA|grep HDF
CMake Error: The source directory
"/home/steinbac/development/cmake_sandbox/hdf5/build" does not appear
to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_INCLUDE_DIR:PATH=/usr/include
HDF5_DIFF_EXECUTABLE:FILEPATH=/usr/bin/h5diff
HDF5_DIR:PATH=HDF5_DIR-NOTFOUND
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc
HDF5_IS_PARALLEL:BOOL=FALSE
HDF5_dl_LIBRARY_DEBUG:FILEPATH=HDF5_dl_LIBRARY_DEBUG-NOTFOUND
HDF5_dl_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libdl.so
HDF5_hdf5_LIBRARY_DEBUG:FILEPATH=HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND
HDF5_hdf5_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libhdf5.so
HDF5_m_LIBRARY_DEBUG:FILEPATH=HDF5_m_LIBRARY_DEBUG-NOTFOUND
HDF5_m_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libm.so
HDF5_z_LIBRARY_DEBUG:FILEPATH=HDF5_z_LIBRARY_DEBUG-NOTFOUND
HDF5_z_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libz.so

Best,
Peter

On 08/03/2015 02:19 PM, houssen wrote:

Hello,

I built HDF5 from source with CMake. I need parallel HDF5 so I set
HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows "Parallel
HDF5: ON". So this is OK.

Now with this CMakeLists.txt:
~> more CMakeLists.txt
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
FIND_PACKAGE ( HDF5 1.8 REQUIRED C )

I do not get HDF5_IS_PARALLEL :
~> cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads
~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Why HDF5_IS_PARALLEL is not available?

Franck

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

I had no time to test more on this, but, I just wanted to notice
that :

1. I have 2 HDF5 installs : one serial in the system (apt-get
install => /usr/lib), and, one parallel (built from source =>
/home/houssen/Programs/...)
=> I need 2 installs : I need to switch
between 2 softwares who needs one serial, or, parallel HDF5 version.
=>
the first software is Fortran, the second is C : I need support for both
C and Fortran.

2. When I module load "my" parallel version built from
source, cmake find the correct install :
~> cmake -LA | grep
HDF5
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/USR/BIN/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/USR/BIN/h5cc
HDF5_C_LIBRARY:PATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
HDF5_DIFF_EXECUTABLE:FILEPATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff
HDF5_DIR:PATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patch1/local/share/cmake
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/USR/BIN/h5fc

...
But now, I've just wrote these lines, I realize that some variable
point to /usr/lib (HDF5_Fortran_COMPILER_EXECUTABLE) and some other
don't (HDF5_C_LIBRARY) ?!
I don't understand what's going on : it looks
like the install of the parallel HDF5 (build from source) is incomplete
?!... However, I built and installed HDF5 this way
:
~/hdf5-1.8.15-patch1/BUILD> cmake -DHDF5_BUILD_FORTRAN=ON
-DHDF5_ENABLE_F2003=ON -DHDF5_ENABLE_PARALLEL=ON
-DCMAKE_INSTALL_PREFIX=/home/houssen/Programs/XXX ..; make; make
install;

Note : I didn't add C++ support (which could have been
convenient to me) because it seems there is an incompatibility with the
parallel flag.

Franck

~> sudo apt-get install h5utils hdf5-tools
libhdf5-dev libhdf5-serial-dev
~> dpkg -L
libhdf5-7
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libhdf5_hl.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5_fortran.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5hl_fortran.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so.7.0.0
...

Hi Franck,

I

suspect it has something to do with your system or your

installation.

I was finally able to build the cmake dummy package and

the CMakeCache

contains the HDF5_IS_PARALLEL correctly!

Here are my module files

again:

# cmake/3.3.0
set soft_path

/sw/apps/$soft_ware/$soft_version

set soft_arch x86_64
module-whatis

"${soft_ware} ${soft_version}"

prepend-path PATH

$soft_path/bin

prepend-path LD_LIBRARY_PATH $soft_path/lib

prepend-path CMAKE_PREFIX_PATH $soft_path/share/cmake-3.3

#

hdf5/1.8.15-p1-openmpi

set path

/sw/users/steinbac/software/$soft_ware/${soft_version}

set soft_arch

x86_64

module-whatis "${soft_ware} ${soft_version}"

append

soft_dependencies "openmpi/1.8.5"

prepend-path PATH $path/bin

prepend-path LD_LIBRARY_PATH $path/lib

I however have to say, that

the FindHDF5 cmake module seems not to

like the situation if your

environment exposes multiple cmake

installations, e.g.

LD_LIBRARY_PATH=/path/to/custom/hdf5:/usr/lib

^^^^^^^^ might also

contain hdf5

libraries. The same holds for the PATH.

Best,

Peter

Hello,

I

built HDF5 from source with CMake. I need parallel HDF5 so I set

HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows "Parallel

HDF5: ON". So this is OK.

Now with this CMakeLists.txt:
~> more

CMakeLists.txt

CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
FIND_PACKAGE

( HDF5 1.8 REQUIRED C )

I do not get HDF5_IS_PARALLEL :
~>

cmake .

-- Configuring done
-- Generating done
-- Build files

have been written to: /home/houssen/Downloads

~> cmake -LA | grep

HDF

HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++

HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Why

HDF5_IS_PARALLEL is not available?

···

Le 2015-08-06 13:43, Peter Steinbach a écrit :

On 08/03/2015 02:19 PM, houssen wrote:

Franck

_______________________________________________

Hdf-forum is for HDF

software users discussion.

Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Twitter: https://twitter.com/hdf5

_______________________________________________

Hdf-forum is for HDF

software users discussion.

Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Twitter: https://twitter.com/hdf5

Hi Frank,

my setup using the same versions as you is along the lines of

> ~> more /home/houssen/Programs/ModuleFiles/CMake-3.3.0
> #%Module1.0
> prepend-path PATH /home/houssen/Programs/CMake/cmake-3.3.0/local/bin
> prepend-path LD_LIBRARY_PATH
> /home/houssen/Programs/CMake/cmake-3.3.0/local/lib
> prepend-path CMAKE_PREFIX_PATH
> /home/houssen/Programs/CMake/cmake-3.3.0/local/local/share/cmake-3.3
>
> ~> more /home/houssen/Programs/ModuleFiles/PHDF5-1.8.15
> #%Module1.0
> module load CMake-3.3.0 #I am not sure this is needed! (but I see it's handy)
> prepend-path PATH /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin
> prepend-path LD_LIBRARY_PATH
> /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib

with the serial version of hdf5 and it works perfectly on a CentOS 7 box. I'll try the parallel install now.

Best,
Peter

···

On 08/05/2015 02:10 PM, houssen wrote:

Hello Peter,

I run Ubuntu-14.04 (that provides CMake-2.8). I use CMake-3.3.0 that I
had to build from source. I use modules.
Is there a specific feature to turn on when building CMake ? HDF5 ? Or
some missing commands (prepend-path) in module files ? Or any other
suggestions ?

Franck

~> more /home/houssen/Programs/ModuleFiles/CMake-3.3.0
#%Module1.0
prepend-path PATH /home/houssen/Programs/CMake/cmake-3.3.0/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/lib
prepend-path CMAKE_PREFIX_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/local/share/cmake-3.3

~> more /home/houssen/Programs/ModuleFiles/PHDF5-1.8.15
#%Module1.0
module load CMake-3.3.0
prepend-path PATH /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib
prepend-path CMAKE_PREFIX_PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

~> module load PHDF5-1.8.15

~> module list
Currently Loaded Modulefiles:
   1) CMake-3.3.0 2) PHDF5-1.8.15

~> cmake .
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found HDF5:
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
(found suitable version "1.8.15", minimum required is "1.8")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads

~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

~> cmake -LA
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Téléchargements
-- Cache values
CMAKE_AR:FILEPATH=/usr/bin/ar
CMAKE_BUILD_TYPE:STRING=
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
CMAKE_C_FLAGS:STRING=
CMAKE_C_FLAGS_DEBUG:STRING=-g
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
CMAKE_INSTALL_PREFIX:PATH=/usr/local
CMAKE_LINKER:FILEPATH=/usr/bin/ld
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/usr/bin/strip
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Le 2015-08-05 13:37, Peter Steinbach a écrit :

Hi Frank,

which cmake version are you using? I checked your code with cmake
3.0.2 under fc21 and it works:

cmake -LA|grep HDF
CMake Error: The source directory
"/home/steinbac/development/cmake_sandbox/hdf5/build" does not appear
to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_INCLUDE_DIR:PATH=/usr/include
HDF5_DIFF_EXECUTABLE:FILEPATH=/usr/bin/h5diff
HDF5_DIR:PATH=HDF5_DIR-NOTFOUND
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc
HDF5_IS_PARALLEL:BOOL=FALSE
HDF5_dl_LIBRARY_DEBUG:FILEPATH=HDF5_dl_LIBRARY_DEBUG-NOTFOUND
HDF5_dl_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libdl.so
HDF5_hdf5_LIBRARY_DEBUG:FILEPATH=HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND
HDF5_hdf5_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libhdf5.so
HDF5_m_LIBRARY_DEBUG:FILEPATH=HDF5_m_LIBRARY_DEBUG-NOTFOUND
HDF5_m_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libm.so
HDF5_z_LIBRARY_DEBUG:FILEPATH=HDF5_z_LIBRARY_DEBUG-NOTFOUND
HDF5_z_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libz.so

Best,
Peter

On 08/03/2015 02:19 PM, houssen wrote:

Hello,

I built HDF5 from source with CMake. I need parallel HDF5 so I set
HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows "Parallel
HDF5: ON". So this is OK.

Now with this CMakeLists.txt:
~> more CMakeLists.txt
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
FIND_PACKAGE ( HDF5 1.8 REQUIRED C )

I do not get HDF5_IS_PARALLEL :
~> cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads
~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Why HDF5_IS_PARALLEL is not available?

Franck

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

First: HDF5 is supported by two build systems, autotools and CMake. They do
not produce the exact same build framework support.
Only the autotools process creates the h5cc, h5fc, etc.
CMake creates cmake config files and properties.

Second: You have a serial install created by autotools and a parallel install
created by CMake.

You will need to choose one build system to make it easier to do what you
want. Note that the libraries are the same it is just the support framework
for the files.

Allen

···

On Thursday, August 06, 2015 06:42:42 PM houssen wrote:

I had no time to test more on this, but, I just wanted to notice
that :

1. I have 2 HDF5 installs : one serial in the system (apt-get
install => /usr/lib), and, one parallel (built from source =>
/home/houssen/Programs/...)
=> I need 2 installs : I need to switch
between 2 softwares who needs one serial, or, parallel HDF5 version.
=>
the first software is Fortran, the second is C : I need support for both
C and Fortran.

2. When I module load "my" parallel version built from
source, cmake find the correct install :
~> cmake -LA | grep
HDF5
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/USR/BIN/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/USR/BIN/h5cc
HDF5_C_LIBRARY:PATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patch1/local/li
b/libhdf5.a
HDF5_DIFF_EXECUTABLE:FILEPATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patc
h1/local/bin/h5diff
HDF5_DIR:PATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patch1/local/share/c
make HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/USR/BIN/h5fc

...
But now, I've just wrote these lines, I realize that some variable
point to /usr/lib (HDF5_Fortran_COMPILER_EXECUTABLE) and some other
don't (HDF5_C_LIBRARY) ?!
I don't understand what's going on : it looks
like the install of the parallel HDF5 (build from source) is incomplete
?!... However, I built and installed HDF5 this way

~/hdf5-1.8.15-patch1/BUILD> cmake -DHDF5_BUILD_FORTRAN=ON
-DHDF5_ENABLE_F2003=ON -DHDF5_ENABLE_PARALLEL=ON
-DCMAKE_INSTALL_PREFIX=/home/houssen/Programs/XXX ..; make; make
install;

Note : I didn't add C++ support (which could have been
convenient to me) because it seems there is an incompatibility with the
parallel flag.

Franck

~> sudo apt-get install h5utils hdf5-tools
libhdf5-dev libhdf5-serial-dev
~> dpkg -L
libhdf5-7
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libhdf5_hl.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5_fortran.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5hl_fortran.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so.7.0.0
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so.7.0.0
...

Le 2015-08-06 13:43, Peter Steinbach a écrit :
> Hi Franck,
>
> I

suspect it has something to do with your system or your

> installation.

I was finally able to build the cmake dummy package and

> the CMakeCache

contains the HDF5_IS_PARALLEL correctly!

> Here are my module files

again:
> # cmake/3.3.0
> set soft_path

/sw/apps/$soft_ware/$soft_version

> set soft_arch x86_64
> module-whatis

"${soft_ware} ${soft_version}"

> prepend-path PATH

$soft_path/bin

> prepend-path LD_LIBRARY_PATH $soft_path/lib

prepend-path CMAKE_PREFIX_PATH $soft_path/share/cmake-3.3

> #

hdf5/1.8.15-p1-openmpi

> set path

/sw/users/steinbac/software/$soft_ware/${soft_version}

> set soft_arch

x86_64

> module-whatis "${soft_ware} ${soft_version}"
>
> append

soft_dependencies "openmpi/1.8.5"

> prepend-path PATH $path/bin

prepend-path LD_LIBRARY_PATH $path/lib

> I however have to say, that

the FindHDF5 cmake module seems not to

> like the situation if your

environment exposes multiple cmake

> installations, e.g.

LD_LIBRARY_PATH=/path/to/custom/hdf5:/usr/lib

> ^^^^^^^^ might also

contain hdf5

> libraries. The same holds for the PATH.
>
> Best,

Peter

> On 08/03/2015 02:19 PM, houssen wrote:
>> Hello,
>>
>> I

built HDF5 from source with CMake. I need parallel HDF5 so I set

HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows "Parallel

HDF5: ON". So this is OK.

>> Now with this CMakeLists.txt:
>> ~> more

CMakeLists.txt

>> CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
>> FIND_PACKAGE

( HDF5 1.8 REQUIRED C )

>> I do not get HDF5_IS_PARALLEL :
>> ~>

cmake .

>> -- Configuring done
>> -- Generating done
>> -- Build files

have been written to: /home/houssen/Downloads

>> ~> cmake -LA | grep

HDF

>> HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++

HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/li
b/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch
1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cm
ake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

>> Why

HDF5_IS_PARALLEL is not available?

>> Franck

_______________________________________________

>> Hdf-forum is for HDF

software users discussion.

>> Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Twitter: https://twitter.com/hdf5

_______________________________________________

> Hdf-forum is for HDF

software users discussion.

> Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Twitter: https://twitter.com/hdf5

Hi Franck,

Hello Peter,

I run Ubuntu-14.04 (that provides CMake-2.8). I use CMake-3.3.0 that I had
to build from source. I use modules.
Is there a specific feature to turn on when building CMake ? HDF5 ? Or some
missing commands (prepend-path) in module files ? Or any other suggestions ?

Franck

I'm not much of an expert with CMake and even less with HDF5, but
CMake's HDF5 module is called FindHDF5.cmake . On my Ubuntu 15.04
installation, it is located here:

/usr/share/cmake-3.0/Modules/FindHDF5.cmake

Some suggestions might be:

1) Make sure you are loading your v3.3 FindHDF5.cmake and not the v2.8 one.
2) Throw in the CMake equivalent of print-statements
[http://www.cmake.org/cmake/help/v3.0/command/message.html] to see how
things are set.

On my version of CMake (3.0.2), the relevant section in FindHDF5.cmake
seems to be:

    # If the HDF5 include directory was found, open H5pubconf.h to determine if
    # HDF5 was compiled with parallel IO support
    set( HDF5_IS_PARALLEL FALSE )
    foreach( _dir IN LISTS HDF5_INCLUDE_DIRS )
        if( EXISTS "${_dir}/H5pubconf.h" )
            file( STRINGS "${_dir}/H5pubconf.h"
                HDF5_HAVE_PARALLEL_DEFINE
                REGEX "HAVE_PARALLEL 1" )
            if( HDF5_HAVE_PARALLEL_DEFINE )
                set( HDF5_IS_PARALLEL TRUE )
            endif()
        endif()
    endforeach()

I don't know HDF5 well enough to understand this. It seems to
indicate HDF5 PARALLEL is true if H5pubconf.h is found?

Ray

···

On Wed, Aug 5, 2015 at 8:10 PM, houssen <houssen@ipgp.fr> wrote:

OK sure, I understand. I believed CMake and Autotools did the "same
thing" but they don't !... But finally, it works even if I still get
mixed installs in "cmake -LA" (see blue / red underlined path at the end
of this answer)

When I installed the system-based HDF5, I ran this
command line:
~> sudo apt-get install h5utils hdf5-tools libhdf5-dev
libhdf5-serial-dev
Here, I don't think I have a choice for CMake or
Autotools.

I tried to "module purge" (use serial hdf5 from /usr/bin)
and I get the expected result:
~> cmake .; cmake -LA | grep -ni
HDF5
...
-- Found HDF5:
/usr/lib/x86_64-linux-gnu/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so
(Required is at least version "1.8")
-- Configuring done
-- Generating
done
-- Build files have been written to:
/home/houssen/Téléchargements
53:HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
54:HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
55:HDF5_C_INCLUDE_DIR:PATH=/usr/include
56:HDF5_DIFF_EXECUTABLE:FILEPATH=/usr/bin/h5diff
57:HDF5_DIR:PATH=HDF5_DIR-NOTFOUND
58:HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc
59:HDF5_IS_PARALLEL:BOOL=FALSE
60:HDF5_dl_LIBRARY_DEBUG:FILEPATH=HDF5_dl_LIBRARY_DEBUG-NOTFOUND
61:HDF5_dl_LIBRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libdl.so
62:HDF5_hdf5_LIBRARY_DEBUG:FILEPATH=HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND
63:HDF5_hdf5_LIBRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libhdf5.so
64:HDF5_m_LIBRARY_DEBUG:FILEPATH=HDF5_m_LIBRARY_DEBUG-NOTFOUND
65:HDF5_m_LIBRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libm.so
66:HDF5_pthread_LIBRARY_DEBUG:FILEPATH=HDF5_pthread_LIBRARY_DEBUG-NOTFOUND
67:HDF5_pthread_LIBRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libpthread.so
68:HDF5_z_LIBRARY_DEBUG:FILEPATH=HDF5_z_LIBRARY_DEBUG-NOTFOUND
69:HDF5_z_LI
BRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libz.so

Now
I compile a parallel version of HDF5 with Autotools, not CMake, I
module load this parallel HDF5 and get :
~> module load PHDF5-1.8.15;
cmake .; cmake -LA | grep -ni HDF5
...
-- Found HDF5:
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so
(found suitable version "1.8.15", minimum required is "1.8")

···

--
Configuring done
-- Generating done
-- Build files have been written to:
/home/houssen/Téléchargements
53:HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
54:HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
55:HDF5_C_INCLUDE_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/include
56:HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff
57:HDF5_DIR:PATH=HDF5_DIR-NOTFOUND
58:HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc
59:HDF5_IS_PARALLEL:BOOL=TRUE
60:HDF5_dl_LIBRARY_DEBUG:FILEPATH=HDF5_dl_LIBRARY_DEBUG-NOTFOUND
61:HDF5_dl_LIBRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libdl.so
62:HDF5_hdf5_LIBRARY_DEBUG:FILEPATH=HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND
63:HDF5_hdf5_LIBRARY_RELEASE:FILEPATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.so
64:HDF5_m_LIBRARY_DEBUG:FILEPATH=HDF5_m_LIBRARY_DEBUG-NOTFOUND
65:HDF5_m_LIBRARY_RELEASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libm.so
66:HDF5_pthread_LIBRARY_DEBUG:FILEPATH=HDF5_pthread_LIBRARY_DEBUG-NOTFOUND
67:HDF5_pthread_LIBRARY_REL
EASE:FILEPATH=/usr/lib/x86_64-linux-gnu/libpthread.so
68:HDF5_z_LIBRARY_DEBUG:FILEPATH=HDF5_z_LIBRARY_DEBUG-NOTFOUND
69:HDF5_z_LIBRARY_RELEASE:FILEPATH=/USR/LIB/x86_64-linux-gnu/libz.so

Le
2015-08-06 19:00, Allen Byrne a écrit :

First: HDF5 is supported by

two build systems, autotools and CMake. They do

not produce the exact

same build framework support.

Only the autotools process creates the

h5cc, h5fc, etc.

CMake creates cmake config files and properties.

Second: You have a serial install created by autotools and a parallel

install

created by CMake.

You will need to choose one build system

to make it easier to do what you

want. Note that the libraries are the

same it is just the support framework

for the files.

Allen

On Thursday, August 06, 2015 06:42:42 PM houssen wrote:

I had no time

to test more on this, but, I just wanted to notice

that :

1. I

have 2 HDF5 installs : one serial in the system (apt-get

install =>

/usr/lib), and, one parallel (built from source =>

/home/houssen/Programs/...)

=> I need 2 installs : I need to

switch

between 2 softwares who needs one serial, or, parallel HDF5

version.

=>
the first software is Fortran, the second is C : I

need support for both

C and Fortran.

2. When I module load "my"

parallel version built from

source, cmake find the correct install

:

~> cmake -LA | grep
HDF5

HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/USR/BIN/h5c++

HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/USR/BIN/h5cc

HDF5_C_LIBRARY:PATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patch1/local/li

b/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patc

h1/local/bin/h5diff

HDF5_DIR:PATH=/HOME/HOUSSEN/PROGRAMS/PHDF5/hdf5-1.8.15-patch1/local/share/c

make HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/USR/BIN/h5fc

...

But now, I've just wrote these lines, I realize that some

variable

point to /usr/lib (HDF5_Fortran_COMPILER_EXECUTABLE) and

some other

don't (HDF5_C_LIBRARY) ?!
I don't understand what's

going on : it looks

like the install of the parallel HDF5 (build from

source) is incomplete

?!... However, I built and installed HDF5 this

way

~/hdf5-1.8.15-patch1/BUILD> cmake -DHDF5_BUILD_FORTRAN=ON

-DHDF5_ENABLE_F2003=ON -DHDF5_ENABLE_PARALLEL=ON

-DCMAKE_INSTALL_PREFIX=/home/houssen/Programs/XXX ..; make; make

install;

Note : I didn't add C++ support (which could have been

convenient to me) because it seems there is an incompatibility with
the

parallel flag.

Franck

~> sudo apt-get install h5utils

hdf5-tools

libhdf5-dev libhdf5-serial-dev
~> dpkg -L

libhdf5-7

/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu

/usr/lib/x86_64-linux-gnu/libhdf5_hl.so.7.0.0

/usr/lib/x86_64-linux-gnu/libhdf5.so.7.0.0

/usr/lib/x86_64-linux-gnu/libhdf5_fortran.so.7.0.0

/usr/lib/x86_64-linux-gnu/libhdf5hl_fortran.so.7.0.0

/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so.7.0.0

/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so.7.0.0

...

Le

2015-08-06 13:43, Peter Steinbach a écrit :

> Hi Franck,
>
>

I

suspect it has something to do with your system or your

>

installation.

I was finally able to build the cmake dummy package

and

> the CMakeCache

contains the HDF5_IS_PARALLEL

correctly!

> Here are my module files

again:
> #

cmake/3.3.0

> set soft_path

/sw/apps/$soft_ware/$soft_version

> set soft_arch x86_64
>

module-whatis

"${soft_ware} ${soft_version}"

> prepend-path

PATH

$soft_path/bin

> prepend-path LD_LIBRARY_PATH

$soft_path/lib

prepend-path CMAKE_PREFIX_PATH

$soft_path/share/cmake-3.3

> #

hdf5/1.8.15-p1-openmpi

set path

/sw/users/steinbac/software/$soft_ware/${soft_version}

> set

soft_arch

x86_64

> module-whatis "${soft_ware}

${soft_version}"

>
> append

soft_dependencies

"openmpi/1.8.5"

> prepend-path PATH $path/bin

prepend-path

LD_LIBRARY_PATH $path/lib

> I however have to say, that

the

FindHDF5 cmake module seems not to

> like the situation if

your

environment exposes multiple cmake

> installations,

e.g.

LD_LIBRARY_PATH=/path/to/custom/hdf5:/usr/lib

>

^^^^^^^^ might also

contain hdf5

> libraries. The same holds

for the PATH.

>
> Best,

Peter

> On 08/03/2015 02:19 PM, houssen wrote:
>> Hello,
>>
>> I

built HDF5 from

source with CMake. I need parallel HDF5 so I set

HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows
"Parallel

HDF5: ON". So this is OK.

>> Now with this

CMakeLists.txt:

>> ~> more

CMakeLists.txt

>>

CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )

>> FIND_PACKAGE

( HDF5

1.8 REQUIRED C )

>> I do not get HDF5_IS_PARALLEL :
>> ~>

cmake .

>> -- Configuring done
>> -- Generating done
>> --

Build files

have been written to: /home/houssen/Downloads

>>

~> cmake -LA | grep

HDF

>>

HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++

HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/li

b/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch

1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cm

ake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

>>

Why

HDF5_IS_PARALLEL is not available?

>> Franck

_______________________________________________

>> Hdf-forum is

for HDF

software users discussion.

>>

Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Twitter: https://twitter.com/hdf5

_______________________________________________

> Hdf-forum is for

HDF

software users discussion.

>

Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Twitter: https://twitter.com/hdf5

I have just tried with serial version and also with and without the "module load CMake-3.3.0" (indeed, that's handy) : same problem occurs.
Did I miss to do / export something in the module files ?
Peter, did you reproduce the problem at your side ? (if yes, it may give clues to locate the problem at "my side" or "elsewhere" !...)

Franck

PS : I run Ubuntu-14.04 (updated each week)

···

Le 2015-08-05 17:18, Peter Steinbach a écrit :

Hi Frank,

my setup using the same versions as you is along the lines of

~> more /home/houssen/Programs/ModuleFiles/CMake-3.3.0
#%Module1.0
prepend-path PATH /home/houssen/Programs/CMake/cmake-3.3.0/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/lib
prepend-path CMAKE_PREFIX_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/local/share/cmake-3.3

~> more /home/houssen/Programs/ModuleFiles/PHDF5-1.8.15
#%Module1.0
module load CMake-3.3.0 #I am not sure this is needed! (but I see it's handy)
prepend-path PATH /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib

with the serial version of hdf5 and it works perfectly on a CentOS 7
box. I'll try the parallel install now.

Best,
Peter

On 08/05/2015 02:10 PM, houssen wrote:

Hello Peter,

I run Ubuntu-14.04 (that provides CMake-2.8). I use CMake-3.3.0 that I
had to build from source. I use modules.
Is there a specific feature to turn on when building CMake ? HDF5 ? Or
some missing commands (prepend-path) in module files ? Or any other
suggestions ?

Franck

~> more /home/houssen/Programs/ModuleFiles/CMake-3.3.0
#%Module1.0
prepend-path PATH /home/houssen/Programs/CMake/cmake-3.3.0/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/lib
prepend-path CMAKE_PREFIX_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/local/share/cmake-3.3

~> more /home/houssen/Programs/ModuleFiles/PHDF5-1.8.15
#%Module1.0
module load CMake-3.3.0
prepend-path PATH /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib
prepend-path CMAKE_PREFIX_PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

~> module load PHDF5-1.8.15

~> module list
Currently Loaded Modulefiles:
   1) CMake-3.3.0 2) PHDF5-1.8.15

~> cmake .
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found HDF5:
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
(found suitable version "1.8.15", minimum required is "1.8")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads

~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

~> cmake -LA
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Téléchargements
-- Cache values
CMAKE_AR:FILEPATH=/usr/bin/ar
CMAKE_BUILD_TYPE:STRING=
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
CMAKE_C_FLAGS:STRING=
CMAKE_C_FLAGS_DEBUG:STRING=-g
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
CMAKE_INSTALL_PREFIX:PATH=/usr/local
CMAKE_LINKER:FILEPATH=/usr/bin/ld
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/usr/bin/strip
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Le 2015-08-05 13:37, Peter Steinbach a écrit :

Hi Frank,

which cmake version are you using? I checked your code with cmake
3.0.2 under fc21 and it works:

cmake -LA|grep HDF
CMake Error: The source directory
"/home/steinbac/development/cmake_sandbox/hdf5/build" does not appear
to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_INCLUDE_DIR:PATH=/usr/include
HDF5_DIFF_EXECUTABLE:FILEPATH=/usr/bin/h5diff
HDF5_DIR:PATH=HDF5_DIR-NOTFOUND
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc
HDF5_IS_PARALLEL:BOOL=FALSE
HDF5_dl_LIBRARY_DEBUG:FILEPATH=HDF5_dl_LIBRARY_DEBUG-NOTFOUND
HDF5_dl_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libdl.so
HDF5_hdf5_LIBRARY_DEBUG:FILEPATH=HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND
HDF5_hdf5_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libhdf5.so
HDF5_m_LIBRARY_DEBUG:FILEPATH=HDF5_m_LIBRARY_DEBUG-NOTFOUND
HDF5_m_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libm.so
HDF5_z_LIBRARY_DEBUG:FILEPATH=HDF5_z_LIBRARY_DEBUG-NOTFOUND
HDF5_z_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libz.so

Best,
Peter

On 08/03/2015 02:19 PM, houssen wrote:

Hello,

I built HDF5 from source with CMake. I need parallel HDF5 so I set
HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows "Parallel
HDF5: ON". So this is OK.

Now with this CMakeLists.txt:
~> more CMakeLists.txt
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
FIND_PACKAGE ( HDF5 1.8 REQUIRED C )

I do not get HDF5_IS_PARALLEL :
~> cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads
~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Why HDF5_IS_PARALLEL is not available?

Franck

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Ray, It seems you are correct. I have :
~> locate H5pubconf.h
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/include/H5pubconf.h
/usr/include/H5pubconf.h

But I guess the problem is connected to the fact that HDF5_INCLUDE_DIRS is not set by cmake:
~> cmake .; cmake -LA | grep HDF5
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found HDF5: /home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a (found suitable version "1.8.15", minimum required is "1.8")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Téléchargements
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff
HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Franck

···

Le 2015-08-06 11:49, Raymond Wan a écrit :

Hi Franck,

On Wed, Aug 5, 2015 at 8:10 PM, houssen <houssen@ipgp.fr> wrote:

Hello Peter,

I run Ubuntu-14.04 (that provides CMake-2.8). I use CMake-3.3.0 that I had
to build from source. I use modules.
Is there a specific feature to turn on when building CMake ? HDF5 ? Or some
missing commands (prepend-path) in module files ? Or any other suggestions ?

Franck

I'm not much of an expert with CMake and even less with HDF5, but
CMake's HDF5 module is called FindHDF5.cmake . On my Ubuntu 15.04
installation, it is located here:

/usr/share/cmake-3.0/Modules/FindHDF5.cmake

Some suggestions might be:

1) Make sure you are loading your v3.3 FindHDF5.cmake and not the v2.8 one.
2) Throw in the CMake equivalent of print-statements
[http://www.cmake.org/cmake/help/v3.0/command/message.html] to see how
things are set.

On my version of CMake (3.0.2), the relevant section in FindHDF5.cmake
seems to be:

    # If the HDF5 include directory was found, open H5pubconf.h to
determine if
    # HDF5 was compiled with parallel IO support
    set( HDF5_IS_PARALLEL FALSE )
    foreach( _dir IN LISTS HDF5_INCLUDE_DIRS )
        if( EXISTS "${_dir}/H5pubconf.h" )
            file( STRINGS "${_dir}/H5pubconf.h"
                HDF5_HAVE_PARALLEL_DEFINE
                REGEX "HAVE_PARALLEL 1" )
            if( HDF5_HAVE_PARALLEL_DEFINE )
                set( HDF5_IS_PARALLEL TRUE )
            endif()
        endif()
    endforeach()

I don't know HDF5 well enough to understand this. It seems to
indicate HDF5 PARALLEL is true if H5pubconf.h is found?

Ray

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Hi Franck,

I am wrestling with HDF5_ROOT at the moment, as my cmake seems unable to pick up the parallel hdf5 libs in a custom path.

I'll see what I can find out -
Peter

···

On 08/06/2015 11:30 AM, houssen wrote:

I have just tried with serial version and also with and without the
"module load CMake-3.3.0" (indeed, that's handy) : same problem occurs.
Did I miss to do / export something in the module files ?
Peter, did you reproduce the problem at your side ? (if yes, it may give
clues to locate the problem at "my side" or "elsewhere" !...)

Franck

PS : I run Ubuntu-14.04 (updated each week)

Le 2015-08-05 17:18, Peter Steinbach a écrit :

Hi Frank,

my setup using the same versions as you is along the lines of

~> more /home/houssen/Programs/ModuleFiles/CMake-3.3.0
#%Module1.0
prepend-path PATH /home/houssen/Programs/CMake/cmake-3.3.0/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/lib
prepend-path CMAKE_PREFIX_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/local/share/cmake-3.3

~> more /home/houssen/Programs/ModuleFiles/PHDF5-1.8.15
#%Module1.0
module load CMake-3.3.0 #I am not sure this is needed! (but I see
it's handy)
prepend-path PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib

with the serial version of hdf5 and it works perfectly on a CentOS 7
box. I'll try the parallel install now.

Best,
Peter

On 08/05/2015 02:10 PM, houssen wrote:

Hello Peter,

I run Ubuntu-14.04 (that provides CMake-2.8). I use CMake-3.3.0 that I
had to build from source. I use modules.
Is there a specific feature to turn on when building CMake ? HDF5 ? Or
some missing commands (prepend-path) in module files ? Or any other
suggestions ?

Franck

~> more /home/houssen/Programs/ModuleFiles/CMake-3.3.0
#%Module1.0
prepend-path PATH /home/houssen/Programs/CMake/cmake-3.3.0/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/lib
prepend-path CMAKE_PREFIX_PATH
/home/houssen/Programs/CMake/cmake-3.3.0/local/local/share/cmake-3.3

~> more /home/houssen/Programs/ModuleFiles/PHDF5-1.8.15
#%Module1.0
module load CMake-3.3.0
prepend-path PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin
prepend-path LD_LIBRARY_PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib
prepend-path CMAKE_PREFIX_PATH
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

~> module load PHDF5-1.8.15

~> module list
Currently Loaded Modulefiles:
   1) CMake-3.3.0 2) PHDF5-1.8.15

~> cmake .
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found HDF5:
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
(found suitable version "1.8.15", minimum required is "1.8")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads

~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

~> cmake -LA
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Téléchargements
-- Cache values
CMAKE_AR:FILEPATH=/usr/bin/ar
CMAKE_BUILD_TYPE:STRING=
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
CMAKE_C_FLAGS:STRING=
CMAKE_C_FLAGS_DEBUG:STRING=-g
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
CMAKE_INSTALL_PREFIX:PATH=/usr/local
CMAKE_LINKER:FILEPATH=/usr/bin/ld
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/usr/bin/strip
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Le 2015-08-05 13:37, Peter Steinbach a écrit :

Hi Frank,

which cmake version are you using? I checked your code with cmake
3.0.2 under fc21 and it works:

cmake -LA|grep HDF
CMake Error: The source directory
"/home/steinbac/development/cmake_sandbox/hdf5/build" does not appear
to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_INCLUDE_DIR:PATH=/usr/include
HDF5_DIFF_EXECUTABLE:FILEPATH=/usr/bin/h5diff
HDF5_DIR:PATH=HDF5_DIR-NOTFOUND
HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc
HDF5_IS_PARALLEL:BOOL=FALSE
HDF5_dl_LIBRARY_DEBUG:FILEPATH=HDF5_dl_LIBRARY_DEBUG-NOTFOUND
HDF5_dl_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libdl.so
HDF5_hdf5_LIBRARY_DEBUG:FILEPATH=HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND
HDF5_hdf5_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libhdf5.so
HDF5_m_LIBRARY_DEBUG:FILEPATH=HDF5_m_LIBRARY_DEBUG-NOTFOUND
HDF5_m_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libm.so
HDF5_z_LIBRARY_DEBUG:FILEPATH=HDF5_z_LIBRARY_DEBUG-NOTFOUND
HDF5_z_LIBRARY_RELEASE:FILEPATH=/usr/lib64/libz.so

Best,
Peter

On 08/03/2015 02:19 PM, houssen wrote:

Hello,

I built HDF5 from source with CMake. I need parallel HDF5 so I set
HDF5_ENABLE_PARALLEL=ON in ccmake : libhdf5.settings shows "Parallel
HDF5: ON". So this is OK.

Now with this CMakeLists.txt:
~> more CMakeLists.txt
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
FIND_PACKAGE ( HDF5 1.8 REQUIRED C )

I do not get HDF5_IS_PARALLEL :
~> cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/houssen/Downloads
~> cmake -LA | grep HDF
HDF5_CXX_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5c++
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a

HDF5_DIFF_EXECUTABLE:FILEPATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/bin/h5diff

HDF5_DIR:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/share/cmake

HDF5_Fortran_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5fc

Why HDF5_IS_PARALLEL is not available?

Franck

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Hi Franck,

Ray, It seems you are correct. I have :
~> locate H5pubconf.h
/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/include/H5pubconf.h
/usr/include/H5pubconf.h

As a sanity check, one thing you can try is to add:

MESSAGE (STATUS "HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}")

to see what it's being set to.

Also, you said you had CMake 2.8 lying around? Perhaps you should
uninstall it from your system, in case you have an issue with one
version of CMake loading the other version's FindHDF5. Likewise, you
should remove one of the two hdf5's -- the second one is the older
version installed via apt-get? As I guess you don't want to use that,
perhaps you should uninstall that, too.

I understand you need both HDF5's but maybe you should check you can
get one right with CMake first?

Your CMake output before had this:

...
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc
HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
...

Isn't the first one installed by apt-get and the second manually in
your home directory? If so, this can't be a good sign...

Perhaps you can ask over at the CMake mailing list -- maybe somewhere
there can suggest how you can have two co-existing HDF5's...

Ray

PS: Just read your recent posting -- seems like you got it figured
out? About this:

~> sudo apt-get install h5utils hdf5-tools libhdf5-dev libhdf5-serial-dev
Here, I don't think I have a choice for CMake or Autotools.

Yes, you are correct. You don't have a "choice" because when you
install packages via apt-get, they've already been compiled for you.

···

On Fri, Aug 7, 2015 at 5:18 PM, houssen <houssen@ipgp.fr> wrote:

Hi Ray,

Hi Franck,

Ray, It seems you are correct. I have :
~> locate H5pubconf.h

/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/include/H5pubconf.h
/usr/include/H5pubconf.h

As a sanity check, one thing you can try is to add:

MESSAGE (STATUS "HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}")

Already tried this, I get a blank message, HDF5_INCLUDE_DIRS is empty.

to see what it's being set to.

Also, you said you had CMake 2.8 lying around? Perhaps you should
uninstall it from your system, in case you have an issue with one
version of CMake loading the other version's FindHDF5. Likewise, you
should remove one of the two hdf5's -- the second one is the older
version installed via apt-get? As I guess you don't want to use that,
perhaps you should uninstall that, too.

The hdf5 installed by apt-get is convenient as there is no need to module load, and, this is the one mostly used.
Anyway, either I will stick to build HDF5 with autotools, or, I will remove HDF5 from the system and built 2 versions of HDF5 with CMake.

I still have to make a decision about this.

···

Le 2015-08-07 11:43, Raymond Wan a écrit :

On Fri, Aug 7, 2015 at 5:18 PM, houssen <houssen@ipgp.fr> wrote:

I understand you need both HDF5's but maybe you should check you can
get one right with CMake first?

Your CMake output before had this:

...
HDF5_C_COMPILER_EXECUTABLE:FILEPATH=/usr/bin/h5cc

HDF5_C_LIBRARY:PATH=/home/houssen/Programs/PHDF5/hdf5-1.8.15-patch1/local/lib/libhdf5.a
...

Isn't the first one installed by apt-get and the second manually in
your home directory? If so, this can't be a good sign...

Perhaps you can ask over at the CMake mailing list -- maybe somewhere
there can suggest how you can have two co-existing HDF5's...

Ray

PS: Just read your recent posting -- seems like you got it figured
out? About this:

~> sudo apt-get install h5utils hdf5-tools libhdf5-dev libhdf5-serial-dev
Here, I don't think I have a choice for CMake or Autotools.

Yes, you are correct. You don't have a "choice" because when you
install packages via apt-get, they've already been compiled for you.

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org

http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Hi Franck,

The hdf5 installed by apt-get is convenient as there is no need to module
load, and, this is the one mostly used.
Anyway, either I will stick to build HDF5 with autotools, or, I will remove
HDF5 from the system and built 2 versions of HDF5 with CMake.

I still have to make a decision about this.

I'm glad you more or less figured out a way around it!

By the way, I was curious and looked at the CMake bug tracker and it
seems someone had a problem with serial and parallel HDF5
installations in Ubuntu 15.04:

https://public.kitware.com/Bug/view.php?id=15527

It's not related to your problem, but the issue was reported in April
2015 and someone [see bottom of page] indicated that there is no
longer a maintainer for the FindHDF5 package of CMake...so, if there's
a bug, most likely it won't get fixed...

Ray

···

On Fri, Aug 7, 2015 at 6:43 PM, houssen <houssen@ipgp.fr> wrote: