From 0a86636ad40a69db701a37d3211a1bac9d863975 Mon Sep 17 00:00:00 2001 From: Ben Ryan Date: Thu, 12 Oct 2023 10:25:26 -0600 Subject: [PATCH 1/8] Convert numpy arrays to ASCII strings --- external/Catch2 | 2 +- external/Kokkos | 2 +- .../packages/parthenon_tools/parthenon_tools/phdf.py | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/external/Catch2 b/external/Catch2 index 216713a4066b..81d52c4a5ffc 160000 --- a/external/Catch2 +++ b/external/Catch2 @@ -1 +1 @@ -Subproject commit 216713a4066b79d9803d374f261ccb30c0fb451f +Subproject commit 81d52c4a5ffc1e527ce158c7570aa94dadc8c002 diff --git a/external/Kokkos b/external/Kokkos index 62d2b6c879b7..4b97a22ff7be 160000 --- a/external/Kokkos +++ b/external/Kokkos @@ -1 +1 @@ -Subproject commit 62d2b6c879b74b6ae7bd06eb3e5e80139c4708e6 +Subproject commit 4b97a22ff7be7635116930bb97173058d6079202 diff --git a/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py b/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py index 39f87957c0c1..72a5be447ff3 100644 --- a/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py +++ b/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py @@ -180,6 +180,14 @@ def __init__(self, filename): else: self.Params = None + # If strings are converted to numpy arrays of ASCII values, convert back to + # strings + for key in self.Params.keys(): + val = self.Params[key] + if type(val) is type(np.zeros(0)): + val_str = ''.join([chr(c) for c in val]) + self.Params[key] = val_str + # Read in coordinates def load_coord(coord_i): coord_name = ["x", "y", "z"][coord_i] From 0fe96fed8a1f168fef8d667a364ec8dc3f453f7f Mon Sep 17 00:00:00 2001 From: Ben Ryan Date: Thu, 12 Oct 2023 10:28:52 -0600 Subject: [PATCH 2/8] format --- scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py b/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py index 72a5be447ff3..a29d2408e230 100644 --- a/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py +++ b/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py @@ -185,7 +185,7 @@ def __init__(self, filename): for key in self.Params.keys(): val = self.Params[key] if type(val) is type(np.zeros(0)): - val_str = ''.join([chr(c) for c in val]) + val_str = "".join([chr(c) for c in val]) self.Params[key] = val_str # Read in coordinates From ce9ff45af2f4373040bcbe547dcbbb63ac518179 Mon Sep 17 00:00:00 2001 From: Ben Ryan Date: Thu, 12 Oct 2023 10:29:51 -0600 Subject: [PATCH 3/8] Dont update submodule versions --- external/Catch2 | 2 +- external/Kokkos | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/external/Catch2 b/external/Catch2 index 81d52c4a5ffc..216713a4066b 160000 --- a/external/Catch2 +++ b/external/Catch2 @@ -1 +1 @@ -Subproject commit 81d52c4a5ffc1e527ce158c7570aa94dadc8c002 +Subproject commit 216713a4066b79d9803d374f261ccb30c0fb451f diff --git a/external/Kokkos b/external/Kokkos index 4b97a22ff7be..62d2b6c879b7 160000 --- a/external/Kokkos +++ b/external/Kokkos @@ -1 +1 @@ -Subproject commit 4b97a22ff7be7635116930bb97173058d6079202 +Subproject commit 62d2b6c879b74b6ae7bd06eb3e5e80139c4708e6 From b46d963db72e2b428053428a541c03e686d53c7d Mon Sep 17 00:00:00 2001 From: Ben Ryan Date: Wed, 25 Oct 2023 13:30:36 -0600 Subject: [PATCH 4/8] Switch to fix inside parthenon --- .../packages/parthenon_tools/parthenon_tools/phdf.py | 8 -------- src/outputs/parthenon_hdf5.cpp | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py b/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py index a29d2408e230..39f87957c0c1 100644 --- a/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py +++ b/scripts/python/packages/parthenon_tools/parthenon_tools/phdf.py @@ -180,14 +180,6 @@ def __init__(self, filename): else: self.Params = None - # If strings are converted to numpy arrays of ASCII values, convert back to - # strings - for key in self.Params.keys(): - val = self.Params[key] - if type(val) is type(np.zeros(0)): - val_str = "".join([chr(c) for c in val]) - self.Params[key] = val_str - # Read in coordinates def load_coord(coord_i): coord_name = ["x", "y", "z"][coord_i] diff --git a/src/outputs/parthenon_hdf5.cpp b/src/outputs/parthenon_hdf5.cpp index 95b89b93b627..35942418092f 100644 --- a/src/outputs/parthenon_hdf5.cpp +++ b/src/outputs/parthenon_hdf5.cpp @@ -820,7 +820,8 @@ HDF5GetAttributeInfo(hid_t location, const std::string &name, H5A &attr) { // template specializations for std::string and bool void HDF5WriteAttribute(const std::string &name, const std::string &value, hid_t location) { - HDF5WriteAttribute(name, value.size(), value.c_str(), location); + //HDF5WriteAttribute(name, value.size(), value.c_str(), location); + HDF5WriteAttribute(name, value.c_str(), location); } template <> From ecb3c437ed5a4b9ff9de84ba02a4285eab78752b Mon Sep 17 00:00:00 2001 From: Ben Ryan Date: Wed, 25 Oct 2023 13:31:07 -0600 Subject: [PATCH 5/8] comment --- src/outputs/parthenon_hdf5.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/outputs/parthenon_hdf5.cpp b/src/outputs/parthenon_hdf5.cpp index 35942418092f..004054d8421a 100644 --- a/src/outputs/parthenon_hdf5.cpp +++ b/src/outputs/parthenon_hdf5.cpp @@ -820,7 +820,6 @@ HDF5GetAttributeInfo(hid_t location, const std::string &name, H5A &attr) { // template specializations for std::string and bool void HDF5WriteAttribute(const std::string &name, const std::string &value, hid_t location) { - //HDF5WriteAttribute(name, value.size(), value.c_str(), location); HDF5WriteAttribute(name, value.c_str(), location); } From d6fc6eb351be3e2289b2678e6b3972162ddd8197 Mon Sep 17 00:00:00 2001 From: Ben Ryan Date: Thu, 26 Oct 2023 13:13:05 -0600 Subject: [PATCH 6/8] upgold --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33c19c34256d..fe9b1f7e3d86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,9 +62,9 @@ include(cmake/Format.cmake) include(cmake/Lint.cmake) # regression test reference data -set(REGRESSION_GOLD_STANDARD_VER 19 CACHE STRING "Version of gold standard to download and use") +set(REGRESSION_GOLD_STANDARD_VER 20 CACHE STRING "Version of gold standard to download and use") set(REGRESSION_GOLD_STANDARD_HASH - "SHA512=e1d1a06b9cf9b761d42d0b6b241056ac75658db90138b6b867b1ca7ead4308af4f980285af092b40aee1dbbfb68b4e8cb15efcc9b83d7930c18bf992ae95c729" + "SHA512=e5e421f3c0be01e4708965542bb8b1b79b5c96de97091e46972e375c7616588d026a9a8e29226d9c7ef75346bc859fd9af72acdc7e95e0d783b5ef29aa4630b1" CACHE STRING "Hash of default gold standard file to download") option(REGRESSION_GOLD_STANDARD_SYNC "Automatically sync gold standard files." ON) From a8270da8941a6c7e6df8a633fdc21695fb2c59c0 Mon Sep 17 00:00:00 2001 From: Ben Ryan Date: Thu, 26 Oct 2023 15:14:46 -0600 Subject: [PATCH 7/8] hash issue --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe9b1f7e3d86..ee1fcee7d741 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ include(cmake/Lint.cmake) # regression test reference data set(REGRESSION_GOLD_STANDARD_VER 20 CACHE STRING "Version of gold standard to download and use") set(REGRESSION_GOLD_STANDARD_HASH - "SHA512=e5e421f3c0be01e4708965542bb8b1b79b5c96de97091e46972e375c7616588d026a9a8e29226d9c7ef75346bc859fd9af72acdc7e95e0d783b5ef29aa4630b1" + "SHA512=cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" CACHE STRING "Hash of default gold standard file to download") option(REGRESSION_GOLD_STANDARD_SYNC "Automatically sync gold standard files." ON) From 67a50768e7d8d7e87c966e8dbb8adb71220c4150 Mon Sep 17 00:00:00 2001 From: Ben Ryan Date: Thu, 26 Oct 2023 15:22:46 -0600 Subject: [PATCH 8/8] The original hash was right? --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee1fcee7d741..fe9b1f7e3d86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ include(cmake/Lint.cmake) # regression test reference data set(REGRESSION_GOLD_STANDARD_VER 20 CACHE STRING "Version of gold standard to download and use") set(REGRESSION_GOLD_STANDARD_HASH - "SHA512=cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" + "SHA512=e5e421f3c0be01e4708965542bb8b1b79b5c96de97091e46972e375c7616588d026a9a8e29226d9c7ef75346bc859fd9af72acdc7e95e0d783b5ef29aa4630b1" CACHE STRING "Hash of default gold standard file to download") option(REGRESSION_GOLD_STANDARD_SYNC "Automatically sync gold standard files." ON)