|
| 1 | +From 4957785c768d6f2816ae989a6acf6e6e84055da8 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Sam Gardner <sam@wx4stg.com> |
| 3 | +Date: Mon, 17 Mar 2025 03:27:16 -0500 |
| 4 | +Subject: [PATCH] disable hdf5 parallelism |
| 5 | + |
| 6 | +--- |
| 7 | + libhdf5/hdf5create.c | 16 ++++++++-------- |
| 8 | + libhdf5/hdf5open.c | 12 ++++++------ |
| 9 | + 2 files changed, 14 insertions(+), 14 deletions(-) |
| 10 | + |
| 11 | +diff --git a/libhdf5/hdf5create.c b/libhdf5/hdf5create.c |
| 12 | +index 02cd1b92ed..9a46c5192c 100644 |
| 13 | +--- a/libhdf5/hdf5create.c |
| 14 | ++++ b/libhdf5/hdf5create.c |
| 15 | +@@ -198,14 +198,14 @@ nc4_create_file(const char *path, int cmode, size_t initialsz, |
| 16 | + H5P_CRT_ORDER_INDEXED)) < 0) |
| 17 | + BAIL(NC_EHDFERR); |
| 18 | + } |
| 19 | +-#ifdef HDF5_HAS_COLL_METADATA_OPS |
| 20 | +- /* If HDF5 supports collective metadata operations, turn them |
| 21 | +- * on. This is only relevant for parallel I/O builds of HDF5. */ |
| 22 | +- if (H5Pset_all_coll_metadata_ops(fapl_id, 1) < 0) |
| 23 | +- BAIL(NC_EHDFERR); |
| 24 | +- if (H5Pset_coll_metadata_write(fapl_id, 1) < 0) |
| 25 | +- BAIL(NC_EHDFERR); |
| 26 | +-#endif |
| 27 | ++// #ifdef HDF5_HAS_COLL_METADATA_OPS |
| 28 | ++// /* If HDF5 supports collective metadata operations, turn them |
| 29 | ++// * on. This is only relevant for parallel I/O builds of HDF5. */ |
| 30 | ++// if (H5Pset_all_coll_metadata_ops(fapl_id, 1) < 0) |
| 31 | ++// BAIL(NC_EHDFERR); |
| 32 | ++// if (H5Pset_coll_metadata_write(fapl_id, 1) < 0) |
| 33 | ++// BAIL(NC_EHDFERR); |
| 34 | ++// #endif |
| 35 | + |
| 36 | + if (cmode & NC_NODIMSCALE_ATTACH) { |
| 37 | + /* See https://github.com/Unidata/netcdf-c/issues/2128 */ |
| 38 | +diff --git a/libhdf5/hdf5open.c b/libhdf5/hdf5open.c |
| 39 | +index 082d528a0a..e2126cf4c6 100644 |
| 40 | +--- a/libhdf5/hdf5open.c |
| 41 | ++++ b/libhdf5/hdf5open.c |
| 42 | +@@ -810,12 +810,12 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid) |
| 43 | + } |
| 44 | + } |
| 45 | + |
| 46 | +-#ifdef HDF5_HAS_COLL_METADATA_OPS |
| 47 | +- /* If collective metadata operations are available in HDF5, turn |
| 48 | +- * them on. */ |
| 49 | +- if (H5Pset_all_coll_metadata_ops(fapl_id, 1) < 0) |
| 50 | +- BAIL(NC_EPARINIT); |
| 51 | +-#endif /* HDF5_HAS_COLL_METADATA_OPS */ |
| 52 | ++// #ifdef HDF5_HAS_COLL_METADATA_OPS |
| 53 | ++// /* If collective metadata operations are available in HDF5, turn |
| 54 | ++// * them on. */ |
| 55 | ++// if (H5Pset_all_coll_metadata_ops(fapl_id, 1) < 0) |
| 56 | ++// BAIL(NC_EPARINIT); |
| 57 | ++// #endif /* HDF5_HAS_COLL_METADATA_OPS */ |
| 58 | + #endif /* USE_PARALLEL4 */ |
| 59 | + |
| 60 | + /* Only set cache for non-parallel opens. */ |
0 commit comments