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.
>>
>> >>
[email protected]
>>
>>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
>>
>>
Twitter: https://twitter.com/hdf5
>>
>>
>>
_______________________________________________
>>
>> > Hdf-forum is for
HDF
>>
>> software users discussion.
>>
>> >
[email protected]
>>
>>
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
>>
>>
Twitter: https://twitter.com/hdf5
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5