Skip to content

Commit

Permalink
Primary change is HDFFV-11212 - new refs and JNI (#372)
Browse files Browse the repository at this point in the history
* OESS-98 convert plugin option to FetchContent, add tests

* Fixes for pkcfg files because of plugin option

* OESS-98 fix tools test for plugins

* Keep doxygen comments under 100 chars long - format hint

* Whitespace

* HDFFV-11144 - Reclassify CMake messages

* HDFFV-11099/11100 added help text

* Reworked switch statement to compare string instead

* Fix typo

* Update CDash mode

* Correct name of threadsafe

* Correct option name

* Undo accidental commit

* Note LLVM 10 to 11 format default changes

* Update format plugin

* Undo clang-format version 11 changes

* One more correction

* Update supported platforms

* Revert whitespace changes

* Correct whitespace

* Changes from PR#3

* HDFFV-11213 added option to control gcc10 warnings diagnostics

* HDFFV-11212 Use the new references correctly in JNI utility and tests

* format source

* Fix typo

* Add new test file

* HDFFV-11212 - update test and remove unused arg

* Minor non-space formatting changes

* Use H5I_INVALID_ID instead of "-1"

* source formatting

* add missing testfile, update jni function

* Undo commit of debug code

* remove mislocated file

* Fix h5repack test for handling of fapls and id close

* Update h5diff test files usage text

* HDFFV-11212 add new ref tests for JNI export dataset

* src format update

* Remove blank line typo

* src format typo

* long double requires %Lg

* Another long double foramt specifer S.B. %Lg

* issue with t128bit test

* Windows issue with h5dump and type.

* Fix review issues

* refactor function nesting and fix error checks

* format fixes

* Remove untested functions and javadoc quiet comments

* Restore TRY block.

* Change string append errors to memory exception

* revert to H5_JNI_FATAL_ERROR - support functions need work

* Add assertion error for h5util functions

* remove duplicate function

* format fix

* Revert HD function error handling

* Update copyright comments
  • Loading branch information
byrnHDF authored Feb 25, 2021
1 parent c29e1b9 commit c7ffe68
Show file tree
Hide file tree
Showing 123 changed files with 2,643 additions and 1,272 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
Language: Cpp
BasedOnStyle: LLVM
AlignConsecutiveMacros: true
AlignConsecutiveAssignments: true
#llvm11: AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
#llvm10-11: AlignOperands: true - Align
#llvm11: AllowShortEnumsOnASingleLine: true
AlwaysBreakAfterReturnType: AllDefinitions
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -2019,6 +2019,7 @@
./tools/testfiles/tintsnodata.h5
./tools/testfiles/tlarge_objname.ddl
./tools/testfiles/tlarge_objname.h5
./tools/testfiles/tldouble.ddl
./tools/testfiles/tldouble.h5
./tools/testfiles/tlonglinks.ddl
./tools/testfiles/tlonglinks.h5
Expand Down Expand Up @@ -3428,6 +3429,7 @@
./java/test/testfiles/JUnit-TestH5Pvirtual.txt
./java/test/testfiles/JUnit-TestH5PL.txt
./java/test/testfiles/JUnit-TestH5R.txt
./java/test/testfiles/JUnit-TestH5Rref.txt
./java/test/testfiles/JUnit-TestH5Sbasic.txt
./java/test/testfiles/JUnit-TestH5S.txt
./java/test/testfiles/JUnit-TestH5Tparams.txt
Expand Down Expand Up @@ -3468,6 +3470,7 @@
./java/test/TestH5Pvirtual.java
./java/test/TestH5PL.java
./java/test/TestH5R.java
./java/test/TestH5Rref.java
./java/test/TestH5Sbasic.java
./java/test/TestH5S.java
./java/test/TestH5Tparams.java
Expand Down
10 changes: 5 additions & 5 deletions java/examples/datasets/H5Ex_D_Alloc.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ public static H5D_space_status get(int code) {
}

private static void allocation() {
long file_id = -1;
long filespace_id = -1;
long dataset_id1 = -1;
long dataset_id2 = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id1 = HDF5Constants.H5I_INVALID_HID;
long dataset_id2 = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
int space_status = 0;
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Checksum.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ private static boolean checkFletcher32Filter() {
}

private static void writeChecksum() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -193,9 +193,9 @@ private static void writeChecksum() {
}

private static void readChecksum() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
16 changes: 8 additions & 8 deletions java/examples/datasets/H5Ex_D_Chunk.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ public static H5D_layout get(int code) {
}

private static void writeChunk() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -201,10 +201,10 @@ private static void writeChunk() {
}

private static void readChunk() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
16 changes: 8 additions & 8 deletions java/examples/datasets/H5Ex_D_Compact.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public static H5D_layout get(int code) {
}

private static void writeCompact() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];

Expand Down Expand Up @@ -163,10 +163,10 @@ private static void writeCompact() {
}

private static void readCompact() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open file and dataset using the default properties.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_External.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public class H5Ex_D_External {
private static final int NAME_BUF_SIZE = 32;

private static void writeExternal() {
long file_id = -1;
long dcpl_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];

Expand Down Expand Up @@ -138,9 +138,9 @@ private static void writeExternal() {
}

private static void readExternal() {
long file_id = -1;
long dcpl_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];
String[] Xname = new String[1];

Expand Down
8 changes: 4 additions & 4 deletions java/examples/datasets/H5Ex_D_FillValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public class H5Ex_D_FillValue {
private static final int FILLVAL = 99;

private static void fillValue() {
long file_id = -1;
long dcpl_id = -1;
long dataspace_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long dataspace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] extdims = { EDIM_X, EDIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Gzip.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ private static boolean checkGzipFilter() {
}

private static void writeGzip() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -196,9 +196,9 @@ private static void writeGzip() {
}

private static void readGzip() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Hyperslab.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public class H5Ex_D_Hyperslab {
private static final int RANK = 2;

private static void writeHyperslab() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];

Expand Down Expand Up @@ -142,10 +142,10 @@ private static void writeHyperslab() {
}

private static void readHyperslab() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
16 changes: 8 additions & 8 deletions java/examples/datasets/H5Ex_D_Nbit.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ private static boolean checkNbitFilter() {
}

private static void writeData() throws Exception {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dtype_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dtype_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -157,9 +157,9 @@ private static void writeData() throws Exception {
}

private static void readData() throws Exception {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
10 changes: 5 additions & 5 deletions java/examples/datasets/H5Ex_D_ReadWrite.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public class H5Ex_D_ReadWrite {
private static final int RANK = 2;

private static void WriteDataset() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];

Expand Down Expand Up @@ -109,8 +109,8 @@ private static void WriteDataset() {
}

private static void ReadDataset() {
long file_id = -1;
long dataset_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open file using the default properties.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Shuffle.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ private static boolean checkShuffleFilter() {
}

private static void writeShuffle() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -229,9 +229,9 @@ private static void writeShuffle() {
}

private static void readShuffle() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open an existing file.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Sofloat.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ private static boolean checkScaleoffsetFilter() {
}

private static void writeData() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
double[][] dset_data = new double[DIM_X][DIM_Y];
Expand Down Expand Up @@ -213,9 +213,9 @@ private static void writeData() {
}

private static void readData() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
double[][] dset_data = new double[DIM_X][DIM_Y];

// Open file using the default properties.
Expand Down
14 changes: 7 additions & 7 deletions java/examples/datasets/H5Ex_D_Soint.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ private static boolean checkScaleoffsetFilter() {
}

private static void writeData() {
long file_id = -1;
long filespace_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long filespace_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
long[] dims = { DIM_X, DIM_Y };
long[] chunk_dims = { CHUNK_X, CHUNK_Y };
int[][] dset_data = new int[DIM_X][DIM_Y];
Expand Down Expand Up @@ -195,9 +195,9 @@ private static void writeData() {
}

private static void readData() {
long file_id = -1;
long dataset_id = -1;
long dcpl_id = -1;
long file_id = HDF5Constants.H5I_INVALID_HID;
long dataset_id = HDF5Constants.H5I_INVALID_HID;
long dcpl_id = HDF5Constants.H5I_INVALID_HID;
int[][] dset_data = new int[DIM_X][DIM_Y];

// Open file using the default properties.
Expand Down
Loading

0 comments on commit c7ffe68

Please sign in to comment.