diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2022-06-24 03:16:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-24 03:16:21 (GMT) |
commit | ac7bddf2af317d4bc34854f5565396da51ff12aa (patch) | |
tree | f06f4267731f53e29da848d7d043950ec023f0b3 /java | |
parent | 50b3fb09a79cf94064d09087df6c44e680adc3a8 (diff) | |
download | hdf5-ac7bddf2af317d4bc34854f5565396da51ff12aa.zip hdf5-ac7bddf2af317d4bc34854f5565396da51ff12aa.tar.gz hdf5-ac7bddf2af317d4bc34854f5565396da51ff12aa.tar.bz2 |
VFD SWMR: sync with develop (#1825)
* bin directory sync
* doxygen changes
* C++ sync with develop
* Fortran sync with develop
* Sync various docs with develop
* Java sync with develop
* More doxygen sync with develop
* tools sync with develop
* h5test.h testing macros get enclosed in do..while loops (#1721)
* Minor examples normalization with develop
* hl sync with develop
* sprintf to snprintf (#1815)
* Misc sync w/ develop
* Brings some selection I/O bits over from develop
* Brings over some const fixes from develop
* Brings over more const bits from develop
* Minor bits missed in early syncs
* Brings over rest of selection I/O
* Sync of mirror VFD changes w/ develop
* Committing clang-format changes
* Adds missing testpar file
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'java')
-rw-r--r-- | java/examples/datasets/JavaDatasetExample.sh.in | 16 | ||||
-rw-r--r-- | java/examples/datatypes/JavaDatatypeExample.sh.in | 16 | ||||
-rw-r--r-- | java/examples/groups/JavaGroupExample.sh.in | 16 | ||||
-rw-r--r-- | java/examples/intro/JavaIntroExample.sh.in | 16 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/H5.java | 2 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/HDF5Constants.java | 4 | ||||
-rw-r--r-- | java/src/jni/h5util.c | 8 | ||||
-rw-r--r-- | java/test/junit.sh.in | 13 |
8 files changed, 54 insertions, 37 deletions
diff --git a/java/examples/datasets/JavaDatasetExample.sh.in b/java/examples/datasets/JavaDatasetExample.sh.in index 9a5ddd8..b299ff2 100644 --- a/java/examples/datasets/JavaDatasetExample.sh.in +++ b/java/examples/datasets/JavaDatasetExample.sh.in @@ -29,6 +29,7 @@ CMP='cmp' DIFF='diff -c' CP='cp' DIRNAME='dirname' +BASENAME='basename' LS='ls' AWK='awk' @@ -103,17 +104,21 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." # Comment out this to CREATE expected file exit $EXIT_FAILURE fi + BNAME=`$BASENAME $tstfile` + if [ "$BNAME" = "libhdf5_java.dylib" ]; then + COPIED_LIBHDF5_JAVA=1 + fi fi fi done - if [ "$IS_DARWIN" = "yes" ]; then + if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then (cd $BLDLIBDIR; \ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ @@ -134,7 +139,7 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." @@ -155,10 +160,7 @@ CLEAN_LIBFILES_AND_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - for tstfile in $COPY_JARTESTFILES - do - $RM $BLDLIBDIR/tstfile - done + $RM -rf $BLDLIBDIR fi } diff --git a/java/examples/datatypes/JavaDatatypeExample.sh.in b/java/examples/datatypes/JavaDatatypeExample.sh.in index c6f5dbc..a82d883 100644 --- a/java/examples/datatypes/JavaDatatypeExample.sh.in +++ b/java/examples/datatypes/JavaDatatypeExample.sh.in @@ -26,6 +26,7 @@ CMP='cmp' DIFF='diff -c' CP='cp' DIRNAME='dirname' +BASENAME='basename' LS='ls' AWK='awk' @@ -100,17 +101,21 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." # Comment out this to CREATE expected file exit $EXIT_FAILURE fi + BNAME=`$BASENAME $tstfile` + if [ "$BNAME" = "libhdf5_java.dylib" ]; then + COPIED_LIBHDF5_JAVA=1 + fi fi fi done - if [ "$IS_DARWIN" = "yes" ]; then + if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then (cd $BLDLIBDIR; \ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ @@ -131,7 +136,7 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." @@ -152,10 +157,7 @@ CLEAN_LIBFILES_AND_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - for tstfile in $COPY_JARTESTFILES - do - $RM $BLDLIBDIR/tstfile - done + $RM -rf $BLDLIBDIR fi } diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in index 86f90bf..1b84ed3 100644 --- a/java/examples/groups/JavaGroupExample.sh.in +++ b/java/examples/groups/JavaGroupExample.sh.in @@ -26,6 +26,7 @@ CMP='cmp' DIFF='diff -c' CP='cp' DIRNAME='dirname' +BASENAME='basename' LS='ls' AWK='awk' @@ -95,17 +96,21 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." # Comment out this to CREATE expected file exit $EXIT_FAILURE fi + BNAME=`$BASENAME $tstfile` + if [ "$BNAME" = "libhdf5_java.dylib" ]; then + COPIED_LIBHDF5_JAVA=1 + fi fi fi done - if [ "$IS_DARWIN" = "yes" ]; then + if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then (cd $BLDLIBDIR; \ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ @@ -126,7 +131,7 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." @@ -147,10 +152,7 @@ CLEAN_LIBFILES_AND_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - for tstfile in $COPY_JARTESTFILES - do - $RM $BLDLIBDIR/tstfile - done + $RM -rf $BLDLIBDIR fi } diff --git a/java/examples/intro/JavaIntroExample.sh.in b/java/examples/intro/JavaIntroExample.sh.in index a095f27..41ed694 100644 --- a/java/examples/intro/JavaIntroExample.sh.in +++ b/java/examples/intro/JavaIntroExample.sh.in @@ -26,6 +26,7 @@ CMP='cmp' DIFF='diff -c' CP='cp' DIRNAME='dirname' +BASENAME='basename' LS='ls' AWK='awk' @@ -89,17 +90,21 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." # Comment out this to CREATE expected file exit $EXIT_FAILURE fi + BNAME=`$BASENAME $tstfile` + if [ "$BNAME" = "libhdf5_java.dylib" ]; then + COPIED_LIBHDF5_JAVA=1 + fi fi fi done - if [ "$IS_DARWIN" = "yes" ]; then + if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then (cd $BLDLIBDIR; \ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ @@ -120,7 +125,7 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." @@ -141,10 +146,7 @@ CLEAN_LIBFILES_AND_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - for tstfile in $COPY_JARTESTFILES - do - $RM $BLDLIBDIR/tstfile - done + $RM -rf $BLDLIBDIR fi } diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 9fac20c..905a092 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -6991,7 +6991,7 @@ public class H5 implements java.io.Serializable { /** * H5Oflush causes all buffers associated with an object to be immediately flushed to disk without * removing the data from the cache. object_id can be any named object associated with an HDF5 file - * ncluding a dataset, a group, or a committed datatype. + * including a dataset, a group, or a committed datatype. * * @param object_id * IN: Identifier of the object to be flushed. diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index cbdf463..b0c639c 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -916,6 +916,8 @@ public class HDF5Constants { /** */ public static final int H5R_OBJ_REF_BUF_SIZE = H5R_OBJ_REF_BUF_SIZE(); /** */ + public static final int H5R_DSET_REG_REF_BUF_SIZE = H5R_DSET_REG_REF_BUF_SIZE(); + /** */ public static final int H5R_OBJECT = H5R_OBJECT(); /** */ public static final int H5R_OBJECT1 = H5R_OBJECT1(); @@ -2397,6 +2399,8 @@ public class HDF5Constants { private static native final int H5R_OBJ_REF_BUF_SIZE(); + private static native final int H5R_DSET_REG_REF_BUF_SIZE(); + private static native final int H5R_OBJECT(); private static native final int H5R_OBJECT1(); diff --git a/java/src/jni/h5util.c b/java/src/jni/h5util.c index 2de5d87..7ea09c8 100644 --- a/java/src/jni/h5util.c +++ b/java/src/jni/h5util.c @@ -211,9 +211,9 @@ h5str_convert(JNIEnv *env, char **in_str, hid_t container, hid_t tid, void *out_ /* Build default formats for long long types */ if (!fmt_llong[0]) { - if (HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH) < 0) + if (HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%lld") < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_convert: HDsnprintf failure"); - if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%%su", H5_PRINTF_LL_WIDTH) < 0) + if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%llu") < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_convert: HDsnprintf failure"); } /* end if */ @@ -781,9 +781,9 @@ h5str_sprintf(JNIEnv *env, h5str_t *out_str, hid_t container, hid_t tid, void *i /* Build default formats for long long types */ if (!fmt_llong[0]) { - if (HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH) < 0) + if (HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%lld") < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsnprintf failure"); - if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%%su", H5_PRINTF_LL_WIDTH) < 0) + if (HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%llu") < 0) H5_JNI_FATAL_ERROR(ENVONLY, "h5str_sprintf: HDsnprintf failure"); } /* end if */ switch (tclass) { diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index ca2b3a9..4e5152b 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -31,6 +31,7 @@ CMP='cmp' DIFF='diff -c' CP='cp' DIRNAME='dirname' +BASENAME='basename' LS='ls' AWK='awk' @@ -141,17 +142,21 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." # Comment out this to CREATE expected file exit $EXIT_FAILURE fi + BNAME=`$BASENAME $tstfile` + if [ "$BNAME" = "libhdf5_java.dylib" ]; then + COPIED_LIBHDF5_JAVA=1 + fi fi fi done - if [ "$IS_DARWIN" = "yes" ]; then + if [[ "$IS_DARWIN" = "yes" ]] && [[ $COPIED_LIBHDF5_JAVA -eq 1 ]]; then (cd testlibs; \ install_name_tool -add_rpath @loader_path libhdf5_java.dylib; \ exist_path=` otool -l libhdf5_java.dylib | grep libhdf5 | grep -v java | awk '{print $2}'`; \ @@ -172,7 +177,7 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." @@ -195,7 +200,7 @@ COPY_LIBFILES_TO_BLDLIBDIR() INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $BLDLIBDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then - $CP -f $tstfile $BLDLIBDIR + $CP -fR $tstfile $BLDLIBDIR if [ $? -ne 0 ]; then echo "Error: FAILED to copy $tstfile ." |