Skip to content

Commit

Permalink
Revert "Another attempt to use re-compiled SiS jHDF5 library with re-…
Browse files Browse the repository at this point in the history
…compiled HDF5 1.10.11 library from sources with plugin support enabled. Currently only for Windows and Linux."

This reverts commit 7d4adf9.
  • Loading branch information
AxisAlexNT committed Jan 13, 2024
1 parent 58fc46e commit fb72eda
Show file tree
Hide file tree
Showing 62 changed files with 19 additions and 37 deletions.
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ application {
}

dependencies {
implementation(fileTree("src/main/resources/libs"))
runtimeOnly(fileTree("src/main/resources/libs/natives"))
// implementation(fileTree("src/main/resources/libs"))
// runtimeOnly(fileTree("src/main/resources/libs/natives"))

// implementation("cisd:jhdf5:19.04.1")
implementation("cisd:jhdf5:19.04.1")


// https://mvnrepository.com/artifact/cisd/base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,24 @@ public class HDF5LibraryInitializer {
private static final PathCollectingJNIExtractor jniExtractor = new PathCollectingJNIExtractor(defaultJNIExtractor);

static {
// SiS JHDF5 dependencies:
libraryNames.put("libnativedata", "NativeData (Linux-style naming)");
libraryNames.put("nativedata", "NativeData (Windows-style naming)");
libraryNames.put("libunix", "libunix.so (Linux-style naming), not needed on Windows");
libraryNames.put("unix", "libunix.so (Windows-style naming), not needed on Windows");
// Main HDF5 library, rebuilt from sources:
libraryNames.put("libhdf5", "HDF5 (Linux-style naming)");
libraryNames.put("hdf5", "HDF5 (Windows-style naming)");
// HDF5_java library (from source on Linux, from SiS-modified jni/ folder JHDF5 source on Windows):
libraryNames.put("libhdf5_java", "HDF5 (Linux-style naming)");
libraryNames.put("hdf5_java", "HDF5 (Windows-style naming)");
// SiS-modified jni/ folder source linked to libhdf5.a on Linux, SiS-modified version of hdf5_java.dll on Windows
libraryNames.put("hdf5", "HDF5");
libraryNames.put("jhdf5", "jHDF5");
// This library might be in dependencies:
libraryNames.put("hdf5_tools", "HDF5_tools");
// The most important HDF5 filter plugins for HiCT (bitshuffle and LZF compression):
libraryNames.put("hdf5_java", "HDF5_java");
libraryNames.put("libh5blosc", "HDF5 BLOSC filter plugin (Linux-style naming)");
libraryNames.put("h5blosc", "HDF5 BLOSC filter plugin (Windows-style naming)");
libraryNames.put("libh5bshuf", "HDF5 Shuffle filter plugin (Linux-style naming)");
libraryNames.put("h5bshuf", "HDF5 Shuffle filter plugin (Windows-style naming)");
libraryNames.put("h5lzf", "HDF5 LZ4 filter plugin (Windows-style naming)");
libraryNames.put("libh5lzf", "HDF5 LZF filter plugin (Linux-style naming)");
// Other general compression plugins:
libraryNames.put("libh5bz2", "HDF5 BZ2 filter plugin (Linux-style naming)");
libraryNames.put("h5bz2", "HDF5 BZ2 filter plugin (Windows-style naming)");
libraryNames.put("libh5lz4", "HDF5 LZ4 filter plugin (Linux-style naming)");
libraryNames.put("h5lz4", "HDF5 LZ4 filter plugin (Windows-style naming)");
libraryNames.put("libh5lzf", "HDF5 LZF filter plugin (Linux-style naming)");
libraryNames.put("h5lzf", "HDF5 LZF filter plugin (Windows-style naming)");
libraryNames.put("libh5zfp", "HDF5 ZFP filter plugin (Linux-style naming)");
libraryNames.put("h5zfp", "HDF5 ZFP filter plugin (Windows-style naming)");
libraryNames.put("libh5zstd", "HDF5 zSTD filter plugin (Linux-style naming)");
libraryNames.put("h5zstd", "HDF5 zSTD filter plugin (Windows-style naming)");
// Lossy compression plugins currently not used by HiCT:
libraryNames.put("libh5blosc", "HDF5 BLOSC filter plugin (Linux-style naming)");
libraryNames.put("h5blosc", "HDF5 BLOSC filter plugin (Windows-style naming)");

initializeHDF5Library();
}
Expand All @@ -74,12 +60,11 @@ public static synchronized void initializeHDF5Library() {
final var name = e.getValue();
log.info("Loading " + name + " library");
try {
if (!NativeLibraryUtil.loadNativeLibrary(jniExtractor, lib, "resources/", "resources/libs/", "resources/libs/natives/", "/resources/", "/resources/libs/", "/resources/libs/natives/")) {
if (!NativeLibraryUtil.loadNativeLibrary(jniExtractor, lib)) {
log.warn("Failed to load library " + lib + " with custom JNI Extractor, will try fallback method.");
NativeLoader.loadLibrary(lib);
log.warn("Fallback method succeeded but the library path won't be added to the H5 plugins search registry.");
}
log.info("Successfully loaded library " + lib + " using NativeLoader");
} catch (final IOException err) {
log.warn("Failed to load native library " + name + " by NativeLoader due to IOException", err);
// log.warn("Failed to load native library due to IOException");
Expand All @@ -91,6 +76,14 @@ public static synchronized void initializeHDF5Library() {
}
}

try {
H5.loadH5Lib();
log.info("Loaded HDF5 library");
} catch (final Throwable uoe) {
log.error("Caught an Unsupported Operation Exception while initializing HDF5 Library, if it complains about library version, you can simply ignore that", uoe);
}


for (final var libPath : jniExtractor.getAbsolutePathsCollection()) {
try {
log.info("Prepending " + libPath + " to the plugin path registry of H5 library");
Expand All @@ -102,16 +95,6 @@ public static synchronized void initializeHDF5Library() {
}
}

try {
H5.loadH5Lib();
log.info("Loaded HDF5 library");
} catch (final Throwable uoe) {
log.error("Caught an Unsupported Operation Exception while initializing HDF5 Library, if it complains about library version, you can simply ignore that", uoe);
}




hdf5LibraryInitialized.set(true);
}

Expand Down
Binary file removed src/main/resources/libs/args4j-2.33.jar
Binary file not shown.
Binary file removed src/main/resources/libs/commons-io-2.6.jar
Binary file not shown.
Binary file removed src/main/resources/libs/commons-lang3-3.7.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/libs/natives/linux_64/libh5lzf.so
Binary file not shown.
Binary file removed src/main/resources/libs/natives/linux_64/libh5zfp.so
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/libs/natives/linux_64/libhdf5.so
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/libs/natives/linux_64/libjhdf5.so
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/libs/natives/linux_64/libunix.so
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/libs/natives/windows_64/hdf5.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/libs/natives/windows_64/jhdf5.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/libs/sis-base-18.09.0.jar
Binary file not shown.
Binary file removed src/main/resources/libs/sis-jhdf5-19.04.1.jar
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libh5blosc.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libh5bshuf.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libh5bz2.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libh5jpeg.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libh5lzf.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libh5zfp.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libh5zstd.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libhdf5.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libhdf5_java.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libjhdf5.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libnativedata.so
Binary file not shown.
Binary file removed src/main/resources/natives/linux_64/libunix.so
Binary file not shown.
Binary file removed src/main/resources/natives/windows_64/blosc.dll
Binary file not shown.
Binary file removed src/main/resources/natives/windows_64/hdf5.dll
Binary file not shown.
Binary file removed src/main/resources/natives/windows_64/hdf5_java.dll
Binary file not shown.
Binary file removed src/main/resources/natives/windows_64/jhdf5.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/natives/windows_64/libh5bz2.dll
Binary file not shown.
Binary file removed src/main/resources/natives/windows_64/libh5lz4.dll
Binary file not shown.
Binary file not shown.
Binary file removed src/main/resources/natives/windows_64/libh5zfp.dll
Binary file not shown.
Binary file removed src/main/resources/natives/windows_64/libh5zstd.dll
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.30-72a7298-webui_cc7ffbd
1.0.29-aed9a29-webui_d454f01

0 comments on commit fb72eda

Please sign in to comment.