Skip to content

Commit

Permalink
VFD SWMR: Merges from develop (#1670)
Browse files Browse the repository at this point in the history
* Cleans up SWMR test scripts (both legacy and VFD)

* Brings over format source changes for Java

* Normalization of HL, Fortran, C++, Java w/ develop

* Removes the STATIC flavor of FUNC_ENTER macros (#1622)

* Removes the STATIC flavor of FUNC_ENTER macros

* Remove H5_NO_ALIGNMENT_RESTRICTIONS (#1426)

* Do not conditionally compile code that uses a pointer dereference
and assignment to copy a potentially unaligned variable to aligned
automatic storage, or vice versa.  Instead, always use naked `memcpy(3)`s.
Disassembling the generated code reveals that the `memcpy(3)`s optimize
(`-O3`) to a single `mov` instruction for x86_64, which is not strict
about alignment.

This change reduces the size of code and scripts by 143 lines, eases
our way to cross-compilation, and avoids invoking undefined behavior.

* Committing clang-format changes

* Per discussion, use HD and add comments.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* Removes unused definitions from module headers (#1624)

* Misc stuff from develop (includes some parallel things)

* Brings over SWMR test quiet mode changes from develop

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
derobins and github-actions[bot] authored Apr 21, 2022
1 parent bc62da7 commit ec14985
Show file tree
Hide file tree
Showing 487 changed files with 17,058 additions and 13,870 deletions.
32 changes: 18 additions & 14 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
---
Language: Cpp
BasedOnStyle: LLVM
AlignConsecutiveAssignments: true
BraceWrapping:
AfterFunction: true
#llvm10-11: AfterControlStatement: false - Never
BeforeCatch: true
BeforeElse: true
#llvm11: BeforeLambdaBody: false
#llvm11: BeforeWhile: false
BreakBeforeBraces: Stroustrup
BreakAfterJavaFieldAnnotations: true
BreakStringLiterals: true
ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also
IndentWidth: 4
---
Language: Cpp
#llvm11: AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
Expand All @@ -22,17 +35,6 @@ AlwaysBreakAfterReturnType: AllDefinitions
# - H5_ATTR_CONST
# - H5_ATTR_PURE
# - H5_ATTR_FALLTHROUGH
BraceWrapping:
AfterFunction: true
#llvm10-11: AfterControlStatement: false - Never
BeforeCatch: true
BeforeElse: true
#llvm11: BeforeLambdaBody: false
#llvm11: BeforeWhile: false
BreakBeforeBraces: Stroustrup
BreakAfterJavaFieldAnnotations: true
BreakStringLiterals: true
ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also
ForEachMacros: ['ALL_MEMBERS', 'UNIQUE_MEMBERS']
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Expand All @@ -55,7 +57,6 @@ IndentCaseLabels: true
#llvm11: IndentCaseBlocks: false
IndentGotoLabels: false
#llvm11: IndentExternBlock: AfterExternBlock
IndentWidth: 4
#llvm11: InsertTrailingCommas: None
MacroBlockBegin: "^BEGIN_FUNC"
MacroBlockEnd: "^END_FUNC"
Expand Down Expand Up @@ -92,5 +93,8 @@ StatementMacros:
#llvm11: WhitespaceSensitiveMacros:
#llvm11: - STRINGIZE
#llvm11: - PP_STRINGIZE
---
Language: Java
BreakAfterJavaFieldAnnotations: true
JavaImportGroups: ['java', 'hdf', 'hdf.hdf5lib', 'org']
...

4 changes: 2 additions & 2 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C programs.
- name: Run clang-format style check for C and java programs.
uses: DoozyX/[email protected]
with:
source: '.'
extensions: 'c,h,cpp,hpp'
extensions: 'c,h,cpp,hpp,java'
clangFormatVersion: 10
style: file
exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h'
4 changes: 2 additions & 2 deletions .github/workflows/clang-format-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check for C programs.
- name: Run clang-format style check for C and Java programs.
uses: DoozyX/[email protected]
with:
source: '.'
extensions: 'c,h,cpp,hpp'
extensions: 'c,h,cpp,hpp,java'
clangFormatVersion: 10
inplace: True
style: file
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- uses: codespell-project/actions-codespell@master
with:
skip: ./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c
ignore_words_list: isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,minnum
ignore_words_list: isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,minnum,ro,oce
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
- '.github/**'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
name: hdf5 dev CI
name: PR hdf5 dev CI

# Controls when the action will run. Triggers the workflow on push or pull request
on:
pull_request:
branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8, feature/vfd_swmr ]

paths-ignore:
- '.github/**'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Expand Down
136 changes: 41 additions & 95 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,7 @@
# Note that aclocal will attempt to include libtool's share/aclocal
# directory.
#
# This script takes two potential options:
#
# -p
#
# When this is selected, the autotools versions are set to the paths
# and versions used by The HDF Group to produce the released versions
# of the library.
#
# NOTE: This is probably temporary. Once we update our dev machines
# to have recent versions of the autotools this option will probably
# be removed.
# Aside from -h for help, this script takes one potential option:
#
# -v
#
Expand All @@ -72,9 +62,6 @@ echo "* HDF5 autogen.sh script *"
echo "**************************"
echo

# Default is not production
production=false

# Default is not verbose output
verbose=false

Expand All @@ -86,22 +73,13 @@ while getopts "$optspec" optchar; do
echo
echo " -h Print this help message."
echo
echo " -p Used by THG to use hard-codes autotools"
echo " paths on THG machines. Not for non-HDF-Group"
echo " users!"
echo
echo " -v Show more verbose output."
echo
echo " NOTE: Each tool can be set via an environment variable."
echo " These are documented inside this autogen.sh script."
echo
exit 0
;;
p)
echo "Setting THG production mode..."
echo
production=true
;;
v)
echo "Setting verbosity: high"
echo
Expand All @@ -117,84 +95,52 @@ while getopts "$optspec" optchar; do
esac
done

if [ "$production" = true ] ; then

# Production mode
#
# Hard-code canonical HDF Group tool locations.

# If paths to tools are not specified, assume they are
# located in /usr/hdf/bin/AUTOTOOLS and set paths accordingly.
if test -z ${HDF5_AUTOCONF}; then
HDF5_AUTOCONF=/usr/hdf/bin/AUTOTOOLS/autoconf
fi
if test -z ${HDF5_AUTOMAKE}; then
HDF5_AUTOMAKE=/usr/hdf/bin/AUTOTOOLS/automake
fi
if test -z ${HDF5_AUTOHEADER}; then
HDF5_AUTOHEADER=/usr/hdf/bin/AUTOTOOLS/autoheader
fi
if test -z ${HDF5_ACLOCAL}; then
HDF5_ACLOCAL=/usr/hdf/bin/AUTOTOOLS/aclocal
fi
if test -z ${HDF5_LIBTOOL}; then
HDF5_LIBTOOL=/usr/hdf/bin/AUTOTOOLS/libtool
fi
if test -z ${HDF5_M4}; then
HDF5_M4=/usr/hdf/bin/AUTOTOOLS/m4
fi

else

# Not in production mode
#
# If paths to autotools are not specified, use whatever the system
# has installed as the default. We use 'which <tool>' to
# show exactly what's being used.
if test -z ${HDF5_AUTOCONF}; then
HDF5_AUTOCONF=$(which autoconf)
fi
if test -z ${HDF5_AUTOMAKE}; then
HDF5_AUTOMAKE=$(which automake)
fi
if test -z ${HDF5_AUTOHEADER}; then
HDF5_AUTOHEADER=$(which autoheader)
fi
if test -z ${HDF5_ACLOCAL}; then
HDF5_ACLOCAL=$(which aclocal)
fi
if test -z ${HDF5_LIBTOOL}; then
case "`uname`" in
Darwin*)
# libtool on OS-X is non-gnu
HDF5_LIBTOOL=$(which glibtool)
;;
*)
HDF5_LIBTOOL=$(which libtool)
;;
esac
fi
if test -z ${HDF5_M4}; then
HDF5_M4=$(which m4)
fi

fi # production
# If paths to autotools are not specified, use whatever the system
# has installed as the default. We use 'command -v <tool>' to
# show exactly what's being used (shellcheck complains that 'which'
# is non-standard and deprecated).
if test -z "${HDF5_AUTOCONF}"; then
HDF5_AUTOCONF="$(command -v autoconf)"
fi
if test -z "${HDF5_AUTOMAKE}"; then
HDF5_AUTOMAKE="$(command -v automake)"
fi
if test -z "${HDF5_AUTOHEADER}"; then
HDF5_AUTOHEADER="$(command -v autoheader)"
fi
if test -z "${HDF5_ACLOCAL}"; then
HDF5_ACLOCAL="$(command -v aclocal)"
fi
if test -z "${HDF5_LIBTOOL}"; then
case "$(uname)" in
Darwin*)
# libtool on OS-X is non-gnu
HDF5_LIBTOOL="$(command -v glibtool)"
;;
*)
HDF5_LIBTOOL="$(command -v libtool)"
;;
esac
fi
if test -z "${HDF5_M4}"; then
HDF5_M4="$(command -v m4)"
fi


# Make sure that these versions of the autotools are in the path
AUTOCONF_DIR=`dirname ${HDF5_AUTOCONF}`
LIBTOOL_DIR=`dirname ${HDF5_LIBTOOL}`
M4_DIR=`dirname ${HDF5_M4}`
AUTOCONF_DIR=$(dirname "${HDF5_AUTOCONF}")
LIBTOOL_DIR=$(dirname "${HDF5_LIBTOOL}")
M4_DIR=$(dirname "${HDF5_M4}")
PATH=${AUTOCONF_DIR}:${LIBTOOL_DIR}:${M4_DIR}:$PATH

# Make libtoolize match the specified libtool
case "`uname`" in
case "$(uname)" in
Darwin*)
# On OS X, libtoolize could be named glibtoolize or
# libtoolize. Try the former first, then fall back
# to the latter if it's not found.
HDF5_LIBTOOLIZE="${LIBTOOL_DIR}/glibtoolize"
if [ ! -f $HDF5_LIBTOOLIZE ] ; then
if [ ! -f "$HDF5_LIBTOOLIZE" ] ; then
HDF5_LIBTOOLIZE="${LIBTOOL_DIR}/libtoolize"
fi
;;
Expand Down Expand Up @@ -249,7 +195,7 @@ echo

# LIBTOOLIZE
libtoolize_cmd="${HDF5_LIBTOOLIZE} --copy --force"
echo ${libtoolize_cmd}
echo "${libtoolize_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_LIBTOOLIZE} --version
fi
Expand All @@ -264,7 +210,7 @@ if test -e "${LIBTOOL_DIR}/../share/aclocal" ; then
aclocal_include="-I ${LIBTOOL_DIR}/../share/aclocal"
fi
aclocal_cmd="${HDF5_ACLOCAL} --force -I m4 ${aclocal_include}"
echo ${aclocal_cmd}
echo "${aclocal_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_ACLOCAL} --version
fi
Expand All @@ -273,7 +219,7 @@ echo

# AUTOHEADER
autoheader_cmd="${HDF5_AUTOHEADER} --force"
echo ${autoheader_cmd}
echo "${autoheader_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_AUTOHEADER} --version
fi
Expand All @@ -282,7 +228,7 @@ echo

# AUTOMAKE
automake_cmd="${HDF5_AUTOMAKE} --copy --add-missing --force-missing"
echo ${automake_cmd}
echo "${automake_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_AUTOMAKE} --version
fi
Expand All @@ -291,7 +237,7 @@ echo

# AUTOCONF
autoconf_cmd="${HDF5_AUTOCONF} --force"
echo ${autoconf_cmd}
echo "${autoconf_cmd}"
if [ "$verbose" = true ] ; then
${HDF5_AUTOCONF} --version
fi
Expand Down
2 changes: 0 additions & 2 deletions bin/README

This file was deleted.

2 changes: 1 addition & 1 deletion bin/format_source
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ find . \( -type d -path ./config -prune -and -not -path ./config \) \
-or -name H5version.h \
-or -name H5overflow.h \
\) \) \
-and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
-and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp -or -iname *.java \) \) \
| xargs clang-format -style=file -i -fallback-style=none

exit 0
2 changes: 1 addition & 1 deletion bin/format_source_patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ find . \( -type d -path ./config -prune -and -not -path ./config \) \
-or -name H5version.h \
-or -name H5overflow.h \
\) \) \
-and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp \) \) \
-and \( -iname *.h -or -iname *.c -or -iname *.cpp -or -iname *.hpp -or -iname *.java \) \) \
| xargs clang-format -style=file -i -fallback-style=none

git diff > clang_format.patch
Expand Down
2 changes: 1 addition & 1 deletion bin/h5cc.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ HL="@HL@"
## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS ##
## $LIBS $clibpath $link_objs $link_args $shared_link ##
## ##
## These settings can be overridden by setting HDF5_CFLAGS, ##
## These settings can be overridden by setting HDF5_CFLAGS, ##
## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
## ##
############################################################################
Expand Down
2 changes: 1 addition & 1 deletion bin/make_vers
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use warnings;
# (The max_idx parameter is the only thing that needs to be changed when adding
# support for a new major release. If support for a prior major release
# is added (like support for 1.4, etc), the min_sup_idx parameter will
# need to be decremented. - QAK)
# need to be decremented.)

# Max. library "index" (0 = v1.0, 1 = 1.2, 2 = 1.4, 3 = 1.6, 4 = 1.8, 5 = 1.10, 6 = 1.12, 7 = 1.14, etc)
$max_idx = 7;
Expand Down
3 changes: 3 additions & 0 deletions bin/restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ rm -f bin/missing
rm -f bin/test-driver
rm -f bin/depcomp

echo "Remove files generated by autoheader"
rm -f src/H5config.h.in

echo "Remove files generated by bin/make_err"
rm -f src/H5Epubgen.h
rm -f src/H5Einit.h
Expand Down
1 change: 1 addition & 0 deletions c++/src/H5Attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* [email protected]. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#include <cstdlib>
#include <iostream>
#include <string>

Expand Down
Loading

0 comments on commit ec14985

Please sign in to comment.