Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove H5detect and H5make_libsettings #3104

Merged
merged 24 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9211ec9
Hard-code H5Tinit.c code as H5Tinit_float.c
derobins Jun 11, 2023
95ea389
Move macros and functionality from H5detect
derobins Jun 11, 2023
7aa8f26
Set most fields dynamically
derobins Jun 11, 2023
48e9580
Remove varname
derobins Jun 11, 2023
e559382
Cleaned up H5Tinit_float.c
derobins Jun 11, 2023
55cde0e
Removed H5detect.c
derobins Jun 11, 2023
71d0535
Format source
derobins Jun 11, 2023
daaf916
Add RELEASE.txt note
derobins Jun 11, 2023
e0a91eb
Yank H5make_libsettings from Autotools
derobins Jun 11, 2023
bc5789a
Remove leftover generated file cruft
derobins Jun 11, 2023
5eaf6ab
Add missing fields to CMake libsettings file
derobins Jun 11, 2023
d59515b
Add missing Autotools content from past commit
derobins Jun 11, 2023
51ca096
CMake works
derobins Jun 11, 2023
1970849
Added a release note about H5make_libsettings
derobins Jun 11, 2023
9876338
Removed unused CMake cross-compile variables
derobins Jun 11, 2023
c008c9d
Fix missing conditional cleanup in Autotools
derobins Jun 11, 2023
bf2b7c5
Remove useless Automake conditionals from CMake
derobins Jun 11, 2023
e3df34a
Fix incredibly fragile version test
derobins Jun 11, 2023
fcd1563
CMake changes to address PR issues
derobins Jun 12, 2023
3d96705
Merge branch 'develop' into yank_h5make_libsettings
derobins Jun 12, 2023
dd2a8bd
Remove warning hax
derobins Jun 12, 2023
ccbcb4f
Add error checks to H5Tinit_float.c
derobins Jun 12, 2023
664ab30
Format source
derobins Jun 12, 2023
7b64137
Remove extra semicolon
derobins Jun 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1224,10 +1224,4 @@ endif ()
#-----------------------------------------------------------------------------
configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_SRC_BINARY_DIR}/H5pubconf.h @ONLY)

#-----------------------------------------------------------------------------
# Options for use by cross compiling and toolchains
#-----------------------------------------------------------------------------
option (HDF5_USE_PREGEN "Use pre-generated Files" OFF)
option (HDF5_BATCH_H5DETECT "Use a batch command for running h5detect" OFF)

include (CMakeInstallation.cmake)
20 changes: 0 additions & 20 deletions bin/batch/knl_H5detect.sl.in.cmake

This file was deleted.

6 changes: 1 addition & 5 deletions bin/checkposix
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ foreach $arg (@ARGV) {
# Skip files that don't include H5private.h
# H5system. has to be inspected by hand since it wraps POSIX files
#
# H5detect and H5make_libsettings are created before the library exists
# so calls that link to function replacements won't work. We'll ignore
# it here.
#
# If a user specifies one file, process it no matter what so people
# can inspect files we normally skip (like H5system.c).

$ignore = 0;

# Ignored files in src/
if($#ARGV gt 0 and $filename =~ /H5FDmulti|H5FDstdio|H5VLpassthru|H5system|H5detect|H5make_libsettings/) {
if($#ARGV gt 0 and $filename =~ /H5FDmulti|H5FDstdio|H5VLpassthru|H5system/) {
$ignore = 1;
}
# Ignored atomic test files in test/
Expand Down
32 changes: 17 additions & 15 deletions config/cmake/libhdf5.settings.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Linking Options:
AM_LDFLAGS: @AM_LDFLAGS@
Extra libraries: @LINK_LIBS@
Archiver: @CMAKE_AR@
AR_FLAGS:
Ranlib: @CMAKE_RANLIB@

Languages:
Expand All @@ -44,24 +45,24 @@ Languages:
Static C Library: @H5_ENABLE_STATIC_LIB@

Fortran: @HDF5_BUILD_FORTRAN@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @CMAKE_Fortran_COMPILER@ @CMAKE_Fortran_COMPILER_VERSION@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @CMAKE_Fortran_FLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @HDF5_CMAKE_Fortran_FLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Shared Fortran Library: @H5_ENABLE_SHARED_LIB@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: @H5_ENABLE_STATIC_LIB@
@BUILD_FORTRAN_CONDITIONAL_TRUE@ Module Directory: @CMAKE_Fortran_MODULE_DIRECTORY@
Fortran Compiler: @CMAKE_Fortran_COMPILER@ @CMAKE_Fortran_COMPILER_VERSION@
Fortran Flags: @CMAKE_Fortran_FLAGS@
H5 Fortran Flags: @HDF5_CMAKE_Fortran_FLAGS@
AM Fortran Flags: @AM_FCFLAGS@
Shared Fortran Library: @H5_ENABLE_SHARED_LIB@
Static Fortran Library: @H5_ENABLE_STATIC_LIB@
Module Directory: @CMAKE_Fortran_MODULE_DIRECTORY@

C++: @HDF5_BUILD_CPP_LIB@
@BUILD_CXX_CONDITIONAL_TRUE@ C++ Compiler: @CMAKE_CXX_COMPILER@ @CMAKE_CXX_COMPILER_VERSION@
@BUILD_CXX_CONDITIONAL_TRUE@ C++ Flags: @CMAKE_CXX_FLAGS@
@BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @HDF5_CMAKE_CXX_FLAGS@
@BUILD_CXX_CONDITIONAL_TRUE@ AM C++ Flags: @AM_CXXFLAGS@
@BUILD_CXX_CONDITIONAL_TRUE@ Shared C++ Library: @H5_ENABLE_SHARED_LIB@
@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: @H5_ENABLE_STATIC_LIB@
C++ Compiler: @CMAKE_CXX_COMPILER@ @CMAKE_CXX_COMPILER_VERSION@
C++ Flags: @CMAKE_CXX_FLAGS@
H5 C++ Flags: @HDF5_CMAKE_CXX_FLAGS@
AM C++ Flags: @AM_CXXFLAGS@
Shared C++ Library: @H5_ENABLE_SHARED_LIB@
Static C++ Library: @H5_ENABLE_STATIC_LIB@

JAVA: @HDF5_BUILD_JAVA@
@BUILD_JAVA_CONDITIONAL_TRUE@ JAVA Compiler: @CMAKE_Java_COMPILER@ @Java_VERSION@
JAVA: @HDF5_BUILD_JAVA@
JAVA Compiler: @CMAKE_Java_COMPILER@ @Java_VERSION@

Features:
---------
Expand All @@ -77,6 +78,7 @@ Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@
Default API mapping: @DEFAULT_API_VERSION@
With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@
I/O filters (external): @EXTERNAL_FILTERS@
Map (H5M) API: @H5_HAVE_MAP_API@
Direct VFD: @H5_HAVE_DIRECT@
Mirror VFD: @H5_HAVE_MIRROR_VFD@
Subfiling VFD: @H5_HAVE_SUBFILING_VFD@
Expand Down
24 changes: 19 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,21 @@ AM_MAINTAINER_MODE([enable])
## This allows multiple src-dir builds within one host.
AC_PREFIX_DEFAULT([`pwd`/hdf5])

## Run post processing on files created by configure.
## Run post processing on files created by configure
##
## src/H5pubconf.h:
## Generate src/H5pubconf.h from src/H5config.h by prepending H5_ to all
## macro names. This avoid name conflict between HDF5 macro names and those
## generated by another software package that uses the HDF5 library.
##
## src/libhdf5.settings:
## Remove all lines begun with "#" which are generated by CONDITIONAL's of
## configure.
## Remove all lines beginning with "#" which are generated by CONDITIONAL's
## of configure.
##
## src/H5build_settings.c
## Remove all lines beginning with "#" which are generated by CONDITIONAL's
## of configure. This uses a check for whitespace after the pound sign
## to avoid clobbering include statements.
AC_CONFIG_COMMANDS([pubconf], [
echo "creating src/H5pubconf.h"
sed 's/#define /#define H5_/' <src/H5config.h |\
Expand All @@ -105,6 +112,10 @@ AC_CONFIG_COMMANDS([pubconf], [
sed '/^#/d' < src/libhdf5.settings > libhdf5.settings.TMP
cp libhdf5.settings.TMP src/libhdf5.settings
rm -f libhdf5.settings.TMP
echo "Post process src/H5build_settings.c"
sed '/^# /d' < src/H5build_settings.c > H5build_settings.TMP
cp H5build_settings.TMP src/H5build_settings.c
rm -f H5build_settings.TMP
])

## It's possible to configure for a host other than the one on which
Expand Down Expand Up @@ -3725,9 +3736,11 @@ AC_ARG_ENABLE([embedded-libinfo],

if test "${enable_embedded_libinfo}" = "yes"; then
AC_MSG_RESULT([yes])
BUILD_SETTINGS_FILE="src/H5build_settings.autotools.c.in"
AC_DEFINE([HAVE_EMBEDDED_LIBINFO], [1],
[Define if library information should be embedded in the executables])
else
BUILD_SETTINGS_FILE="src/H5build_settings.off.c.in"
AC_MSG_RESULT([no])
fi

Expand Down Expand Up @@ -3860,10 +3873,11 @@ fi
##
AM_CONDITIONAL([HAVE_SHARED_CONDITIONAL], [test "X$enable_shared" = "Xyes"])

AC_CONFIG_FILES([src/libhdf5.settings
Makefile
AC_CONFIG_FILES([Makefile
doxygen/Doxyfile
src/Makefile
src/libhdf5.settings
src/H5build_settings.c:${BUILD_SETTINGS_FILE}
test/Makefile
test/H5srcdir_str.h
test/test_abort_fail.sh
Expand Down
9 changes: 0 additions & 9 deletions release_docs/INSTALL_CMake.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1030,15 +1030,6 @@ References:
https://stackoverflow.com/questions/54539682/how-to-set-up-cmake-to-cross-compile-with-clang-for-arm-embedded-on-windows?rq=1
https://developer.android.com/ndk/guides/cmake

Predefine H5Tinit.c file
-------------------------------
The one file that needs to be pre-generated is the H5Tinit.c file. The variables
indicated in the error log (see above) are the variables that need to match the target system.

The HDF5 CMake variables;
HDF5_USE_PREGEN: set this to true
HDF5_USE_PREGEN_DIR: set this path to the preset H5Tinit.c file


========================================================================
X: Using CMakePresets.json for compiling
Expand Down
19 changes: 0 additions & 19 deletions release_docs/README_HPC
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Section II: Obtain HDF5 source
Section III: Using ctest command to build and test
Section IV: Cross compiling
Section V: Manual alternatives
Section VI: Other cross compiling options

************************************************************************

Expand Down Expand Up @@ -184,21 +183,3 @@ or
for parallel builds.

Tests on machines using LSF will typically use "bsub ctestS.lsf", etc.

========================================================================
VI. Other cross compiling options
========================================================================
Settings for two other cross-compiling options are also in the config/toolchain
files which do not seem to be necessary with the Cray PrgEnv-* modules

1. HDF5_USE_PREGEN. This option, along with the HDF5_USE_PREGEN_DIR CMake
variable would allow the use of an appropriate H5Tinit.c file with type
information generated on a compute node to be used when cross compiling
for those compute nodes. The use of the variables in lines 110 and 111
of HDF5options.cmake file seem to preclude needing this option with the
available Cray modules and CMake option.

2. HDF5_BATCH_H5DETECT and associated CMake variables. This option when
properly configured will run H5detect in a batch job on a compute node
at the beginning of the CMake build process. It was also found to be
unnecessary with the available Cray modules and CMake options.
18 changes: 18 additions & 0 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@ New Features

Configuration:
-------------
- Removed CMake cross-compiling variables

* HDF5_USE_PREGEN
* HDF5_BATCH_H5DETECT

These were used to work around H5detect and H5make_libsettings and
are no longer required.

- Running H5make_libsettings is no longer required for cross-compiling

The functionality of H5make_libsettings is now handled via template files,
so H5make_libsettings has been removed.

- Running H5detect is no longer required for cross-compiling
qkoziol marked this conversation as resolved.
Show resolved Hide resolved

The functionality of H5detect is now exercised at library startup,
so H5detect has been removed.

- Removed long double work-around symbols and configure options

Several options and public symbols that were provided to paper over
Expand Down
Loading