From afd997132815eb9f0890bff7379d6ca94deab2ab Mon Sep 17 00:00:00 2001 From: "jacques.morice" Date: Fri, 31 Jan 2025 16:22:10 +0100 Subject: [PATCH 1/5] fix error if BUILD_HDF5_PARALLEL=OFF --- plugins/decl_hdf5/dataset_op.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/decl_hdf5/dataset_op.cxx b/plugins/decl_hdf5/dataset_op.cxx index 27c6b9b3..76ede916 100644 --- a/plugins/decl_hdf5/dataset_op.cxx +++ b/plugins/decl_hdf5/dataset_op.cxx @@ -215,9 +215,11 @@ void Dataset_op::execute(Context& ctx, hid_t h5_file, bool use_mpio, const unord { Raii_hid xfer_lst = make_raii_hid(H5Pcreate(H5P_DATASET_XFER), H5Pclose); if (use_mpio) { +#ifdef H5_HAVE_PARALLEL if (0 > H5Pset_dxpl_mpio(xfer_lst, m_mpio)) { handle_hdf5_err(); } +#endif } if (m_direction == READ) { do_read(ctx, h5_file, xfer_lst); From 5a4e04f2b236154d3f446d09a9677ce822be0067 Mon Sep 17 00:00:00 2001 From: "jacques.morice" Date: Fri, 31 Jan 2025 16:34:37 +0100 Subject: [PATCH 2/5] update changelog and copyright, fix #55 [pdidev/pkgs] --- plugins/decl_hdf5/CHANGELOG.md | 2 ++ plugins/decl_hdf5/dataset_op.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/decl_hdf5/CHANGELOG.md b/plugins/decl_hdf5/CHANGELOG.md index f2d0ee2d..8accd25b 100644 --- a/plugins/decl_hdf5/CHANGELOG.md +++ b/plugins/decl_hdf5/CHANGELOG.md @@ -17,6 +17,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Removed ### Fixed +* Fixed compilation error when BUILD_HDF5_PARALLEL=OFF + [#55](https://github.com/pdidev/pkgs/issues/55) ### Security diff --git a/plugins/decl_hdf5/dataset_op.cxx b/plugins/decl_hdf5/dataset_op.cxx index 76ede916..09f2e978 100644 --- a/plugins/decl_hdf5/dataset_op.cxx +++ b/plugins/decl_hdf5/dataset_op.cxx @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (C) 2015-2024 Commissariat a l'energie atomique et aux energies alternatives (CEA) + * Copyright (C) 2015-2025 Commissariat a l'energie atomique et aux energies alternatives (CEA) * Copyright (C) 2021-2022 Institute of Bioorganic Chemistry Polish Academy of Science (PSNC) * All rights reserved. * From cb4e6ab22a560e5c8e15f2cff528f06e85db8335 Mon Sep 17 00:00:00 2001 From: Jacques Morice Date: Mon, 3 Feb 2025 11:28:07 +0100 Subject: [PATCH 3/5] Update plugins/decl_hdf5/dataset_op.cxx Co-authored-by: Benoit Martin --- plugins/decl_hdf5/dataset_op.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/decl_hdf5/dataset_op.cxx b/plugins/decl_hdf5/dataset_op.cxx index 09f2e978..5058a271 100644 --- a/plugins/decl_hdf5/dataset_op.cxx +++ b/plugins/decl_hdf5/dataset_op.cxx @@ -214,13 +214,13 @@ void Dataset_op::fletcher(Context& ctx, Expression value) void Dataset_op::execute(Context& ctx, hid_t h5_file, bool use_mpio, const unordered_map& dsets) { Raii_hid xfer_lst = make_raii_hid(H5Pcreate(H5P_DATASET_XFER), H5Pclose); - if (use_mpio) { #ifdef H5_HAVE_PARALLEL + if (use_mpio) { if (0 > H5Pset_dxpl_mpio(xfer_lst, m_mpio)) { handle_hdf5_err(); } -#endif } +#endif if (m_direction == READ) { do_read(ctx, h5_file, xfer_lst); } else { From 0e530608e3b976168c1c3313ca66a1981a381dc7 Mon Sep 17 00:00:00 2001 From: "jacques.morice" Date: Tue, 4 Feb 2025 15:16:42 +0100 Subject: [PATCH 4/5] fix changelog --- plugins/decl_hdf5/CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/decl_hdf5/CHANGELOG.md b/plugins/decl_hdf5/CHANGELOG.md index 8accd25b..f2d0ee2d 100644 --- a/plugins/decl_hdf5/CHANGELOG.md +++ b/plugins/decl_hdf5/CHANGELOG.md @@ -17,8 +17,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Removed ### Fixed -* Fixed compilation error when BUILD_HDF5_PARALLEL=OFF - [#55](https://github.com/pdidev/pkgs/issues/55) ### Security From fdea1e82f77ef00f8695cf43b510e8967e22abc2 Mon Sep 17 00:00:00 2001 From: "jacques.morice" Date: Wed, 5 Feb 2025 11:08:49 +0100 Subject: [PATCH 5/5] add comment in AUTHORS for this issue --- plugins/decl_hdf5/AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/decl_hdf5/AUTHORS b/plugins/decl_hdf5/AUTHORS index c82136f0..935bea53 100644 --- a/plugins/decl_hdf5/AUTHORS +++ b/plugins/decl_hdf5/AUTHORS @@ -13,6 +13,7 @@ Julien Bigot - CEA (julien.bigot@cea.fr) Jacques Morice - CEA (jacques.morice@cea.fr) * contribution to feature improvement, validation +* fix issue [#55](https://github.com/pdidev/pkgs/issues/55) Yacine Ould Rouis - CNRS (yacine.ould-rouis@inria.fr) * contribution to feature design, validation