diff --git a/vcell-core/src/main/java/cbit/vcell/export/server/ASCIIExporter.java b/vcell-core/src/main/java/cbit/vcell/export/server/ASCIIExporter.java index 512396db40..c78b7baedf 100644 --- a/vcell-core/src/main/java/cbit/vcell/export/server/ASCIIExporter.java +++ b/vcell-core/src/main/java/cbit/vcell/export/server/ASCIIExporter.java @@ -549,7 +549,12 @@ private List exportPDEData(OutputContext outputContext, long jobID GeometrySpecs geometrySpecs, ASCIISpecs asciiSpecs, String contextName, FileDataContainerManager fileDataContainerManager) throws DataAccessException, IOException{ - NativeLib.HDF5.load(); + // skip loading legacy native HDF5 library if the system is a macos arm64 + // will get runtime errors for Chombo and MovingBoundary until HDF5 is updated + boolean MacosArm64 = System.getProperty("os.arch").equals("aarch64") && System.getProperty("os.name").equals("Mac OS X"); + if (!MacosArm64) { + NativeLib.HDF5.load(); + } ExportSpecs.SimNameSimDataID[] simNameSimDataIDs = asciiSpecs.getSimNameSimDataIDs(); Vector exportOutputV = new Vector(); double progressCounter = 0; diff --git a/vcell-core/src/main/java/cbit/vcell/simdata/VtkMeshGenerator.java b/vcell-core/src/main/java/cbit/vcell/simdata/VtkMeshGenerator.java index e7c3bb5284..95df587b7f 100644 --- a/vcell-core/src/main/java/cbit/vcell/simdata/VtkMeshGenerator.java +++ b/vcell-core/src/main/java/cbit/vcell/simdata/VtkMeshGenerator.java @@ -38,7 +38,12 @@ public VtkMeshGenerator(User owner, KeyValue simKey, int jobIndex) { @Override public int execute() { try { - NativeLib.HDF5.load(); + // skip loading legacy native HDF5 library if the system is a macos arm64 + // will get runtime errors for Chombo and MovingBoundary until HDF5 is updated + boolean MacosArm64 = System.getProperty("os.arch").equals("aarch64") && System.getProperty("os.name").equals("Mac OS X"); + if (!MacosArm64) { + NativeLib.HDF5.load(); + } KeyValue u = new KeyValue(userkey); User owner = new User(username,u); KeyValue simKey = new KeyValue(simkey); diff --git a/vcell-core/src/test/java/cbit/vcell/resource/NativeLibTest.java b/vcell-core/src/test/java/cbit/vcell/resource/NativeLibTest.java index 7e5cf45820..dac9c77d0e 100644 --- a/vcell-core/src/test/java/cbit/vcell/resource/NativeLibTest.java +++ b/vcell-core/src/test/java/cbit/vcell/resource/NativeLibTest.java @@ -15,6 +15,10 @@ public void init( ) { @Test public void loadEm( ) { for (NativeLib nl : NativeLib.values()) { + // skip if nl is HDF5 and system is a macos arm64 + if (nl == NativeLib.HDF5 && System.getProperty("os.arch").equals("aarch64") && System.getProperty("os.name").equals("Mac OS X")) { + continue; + } nl.load(); } } diff --git a/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryH5FileStructureTest.java b/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryH5FileStructureTest.java index bd80ae5597..d350cc8a91 100644 --- a/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryH5FileStructureTest.java +++ b/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryH5FileStructureTest.java @@ -58,7 +58,12 @@ public class MovingBoundaryH5FileStructureTest { @BeforeAll public static void setup() { PropertyLoader.setProperty(PropertyLoader.installationRoot, new File("..").getAbsolutePath()); - NativeLib.HDF5.load(); + // skip loading legacy native HDF5 library if the system is a macos arm64 + // will get runtime errors for Chombo and MovingBoundary until HDF5 is updated + boolean MacosArm64 = System.getProperty("os.arch").equals("aarch64") && System.getProperty("os.name").equals("Mac OS X"); + if (!MacosArm64) { + NativeLib.HDF5.load(); + } } //public static void main(String args[]) throws Exception { diff --git a/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryResultTest.java b/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryResultTest.java index a0f69f9b25..557f10b8cf 100644 --- a/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryResultTest.java +++ b/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryResultTest.java @@ -23,7 +23,12 @@ public class MovingBoundaryResultTest { @BeforeAll public static void setup() { PropertyLoader.setProperty(PropertyLoader.installationRoot, new File("..").getAbsolutePath()); - NativeLib.HDF5.load(); + // skip loading legacy native HDF5 library if the system is a macos arm64 + // will get runtime errors for Chombo and MovingBoundary until HDF5 is updated + boolean MacosArm64 = System.getProperty("os.arch").equals("aarch64") && System.getProperty("os.name").equals("Mac OS X"); + if (!MacosArm64) { + NativeLib.HDF5.load(); + } } public MovingBoundaryResultTest() { Logger lg = LogManager.getLogger("ncsa"); diff --git a/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryVH5PathTest.java b/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryVH5PathTest.java index 1cf8988a54..ec39122fe3 100644 --- a/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryVH5PathTest.java +++ b/vcell-core/src/test/java/cbit/vcell/solvers/mb/MovingBoundaryVH5PathTest.java @@ -36,7 +36,12 @@ public class MovingBoundaryVH5PathTest { @BeforeEach public void setup( ) throws Exception { PropertyLoader.setProperty(PropertyLoader.installationRoot, new File("..").getAbsolutePath()); - NativeLib.HDF5.load(); + // skip loading legacy native HDF5 library if the system is a macos arm64 + // will get runtime errors for Chombo and MovingBoundary until HDF5 is updated + boolean MacosArm64 = System.getProperty("os.arch").equals("aarch64") && System.getProperty("os.name").equals("Mac OS X"); + if (!MacosArm64) { + NativeLib.HDF5.load(); + } // retrieve an instance of H5File