TRIQS/TRIQS — Issue #10: Building on CentOS can't find HDF5 or FFTW.
Author: spikebike
Created: 2011-11-15 00:19:50+00:00
State: open

Our CentOS based environment has cmake-2.8.6, gcc 4.5, szip 2.1, HDF-1.8.7, and FFTW-3.2.2.

When we follow the directions at (including downloading boost): http://ipht.cea.fr/triqs/doc/user_manual/install/install.html

We get:

/opt/src/triqs_build# cmake /opt/src/triqs_sources -DBOOST_SOURCE_DIR=/opt/src/boost_src/ -DCMAKE_INSTALL_PREFIX=/share/apps/triqs-0.8/gcc/4.5
-- Installation directory is /share/apps/triqs-0.8/gcc/4.5
-- DYNAMIC Built
-- CMAKE_GENERATOR: Unix Makefiles
-- CMAKE_CL_64:
-- CMAKE_SIZEOF_VOID_P: 8
-- CMAKE_GENERATOR: Unix Makefiles
-- CMAKE_CL_64:
-- Build type: Release
-- MPI compiler was /share/apps/openmpi14-1.4.1/gcc/4.5/bin/mpicxx
-- Falling back to CMake provied LAPACK/BLAS detection.
-- A library with BLAS API found.
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Could NOT find FFTW (missing: FFTW_LIBRARIES FFTW_INCLUDE_DIR)
CMake Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
cmake/FindHDF5.cmake:450 (find_package_handle_standard_args)
cmake/FindTRIQS_dep_libs.cmake:160 (find_package)
CMakeLists.txt:39 (find_package)

From looking at the source it looks like setting HDF5_ROOT should let it find our HDF5:

/opt/src/triqs_build# ls $HDF5_ROOT $HDF5_ROOT/bin $HDF5_ROOT/lib
/share/apps/hdf5cse-1.8.7/gcc/4.5:
bin include lib share

/share/apps/hdf5cse-1.8.7/gcc/4.5/bin:
gif2h5 h5debug h5import h5mkgrp h5perf_serial h5repack h5unjam
h52gif h5diff h5jam h5pcc h5pfc h5repart ph5diff
h5copy h5dump h5ls h5perf h5redeploy h5stat

/share/apps/hdf5cse-1.8.7/gcc/4.5/lib:
libhdf5.a libhdf5hl_fortran.a libhdf5_hl.so.7
libhdf5_fortran.a libhdf5hl_fortran.la libhdf5_hl.so.7.0.1
libhdf5_fortran.la libhdf5hl_fortran.so libhdf5.la
libhdf5_fortran.so libhdf5hl_fortran.so.7 libhdf5.settings
libhdf5_fortran.so.7 libhdf5hl_fortran.so.7.0.1 libhdf5.so
libhdf5_fortran.so.7.0.1 libhdf5_hl.la libhdf5.so.7
libhdf5_hl.a libhdf5_hl.so libhdf5.so.7.0.1
tribe:/opt/src/bill/triqs_build#

I also tried setting FFTW_LIBRARIES FFTW_INCLUDE_DIR
HDF5_LIBRARIES and HDF5_INCLUDE_DIR without success.

/opt/src/bill/triqs_build# ls /share/apps/fftw-3.2.2/gcc/4.5/ /share/apps/fftw-3.2.2/gcc/4.5/include/ /share/apps/fftw-3.2.2/gcc/4.5/bin
/share/apps/fftw-3.2.2/gcc/4.5/:
bin include lib share

/share/apps/fftw-3.2.2/gcc/4.5/bin:
fftwl-wisdom fftw-wisdom fftw-wisdom-to-conf

/share/apps/fftw-3.2.2/gcc/4.5/include/:
fftw3.f fftw3.h
tribe:/opt/src/bill/triqs_build#

How can I get triqs to look in /share/apps/hdf5cse-1.8.7/gcc/4.5 and /share/apps/fftw-3.2.2/gcc/4.5?

The HDF_Root documentation is in:
cmake-2.8/Modules/FindHDF5.cmake

Around like 21:
# To provide the module with a hint about where to find your HDF5 installation,
# you can set the environment variable HDF5_ROOT. The Find module will then
# look in this path when searching for HDF5 executables, paths, and libraries.