diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index fa98a129c4..960ad0174a 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -21,6 +21,11 @@ class Adios2(CMakePackage, CudaPackage): tags = ["e4s"] version("master", branch="master") + version( + "2.9.0", + sha256="69f98ef58c818bb5410133e1891ac192653b0ec96eb9468590140f2552b6e5d1", + preferred=True, + ) version("2.8.3", sha256="4906ab1899721c41dd918dddb039ba2848a1fb0cf84f3a563a1179b9d6ee0d9f") version("2.8.2", sha256="9909f6409dc44b2c28c1fda0042dab4b711f25ec3277ef0cb6ffc40f5483910d") version("2.8.1", sha256="3f515b442bbd52e3189866b121613fe3b59edb8845692ea86fad83d1eba35d93") diff --git a/var/spack/repos/builtin/packages/paraview/adios2-remove-deprecated-functions.patch b/var/spack/repos/builtin/packages/paraview/adios2-remove-deprecated-functions.patch new file mode 100644 index 0000000000..d90b840220 --- /dev/null +++ b/var/spack/repos/builtin/packages/paraview/adios2-remove-deprecated-functions.patch @@ -0,0 +1,31 @@ +From fdb93d3e9d447b9dd6ce5c77aca18396cf9b6aa3 Mon Sep 17 00:00:00 2001 +From: Vicente Bolea +Date: Mon, 3 Apr 2023 12:58:58 -0400 +Subject: [PATCH] Update /VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx + +--- + VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx b/VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx +index 5d58905a88..3ce039345a 100644 +--- a/VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx ++++ b/VTK/IO/ADIOS2/vtkADIOS2CoreImageReader.cxx +@@ -361,12 +361,12 @@ bool vtkADIOS2CoreImageReader::OpenAndReadMetaData() + vtkMPICommunicator* comm = + static_cast(this->Controller->GetCommunicator()); + +- this->Impl->Adios.reset(new adios2::ADIOS(*comm->GetMPIComm()->GetHandle(), adios2::DebugON)); ++ this->Impl->Adios.reset(new adios2::ADIOS(*comm->GetMPIComm()->GetHandle())); + #else + // Make sure the ADIOS subsystem is initialized before processing any + // sort of request. + +- this->Impl->Adios.reset(new adios2::ADIOS(adios2::DebugON)); ++ this->Impl->Adios.reset(new adios2::ADIOS()); + // Before processing any request, read the meta data first + #endif + } +-- +2.35.3 + diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index 56b18f88a1..9759097ed7 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -285,6 +285,10 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage): # Fix VTK to work with external freetype using CONFIG mode for find_package patch("FindFreetype.cmake.patch", when="@5.10.1:") + # Fix VTK to remove deprecated ADIOS2 functions + # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10113 + patch("adios2-remove-deprecated-functions.patch", when="@5.10: ^adios2@2.9:") + generator("ninja", "make", default="ninja") # https://gitlab.kitware.com/paraview/paraview/-/issues/21223 conflicts("generator=ninja", when="%xl") diff --git a/var/spack/repos/builtin/packages/sensei/adios2-remove-deprecated-functions.patch b/var/spack/repos/builtin/packages/sensei/adios2-remove-deprecated-functions.patch new file mode 100644 index 0000000000..eb0641b07c --- /dev/null +++ b/var/spack/repos/builtin/packages/sensei/adios2-remove-deprecated-functions.patch @@ -0,0 +1,200 @@ +From 9a2d334febe1cf62efd7bc857ea6fbd958a3cb11 Mon Sep 17 00:00:00 2001 +From: Vicente Bolea +Date: Mon, 3 Apr 2023 16:51:58 +0000 +Subject: [PATCH] Removed ADIOS2 deprecated functions invokation + +--- + sensei/ADIOS2AnalysisAdaptor.cxx | 10 ++++++---- + sensei/ADIOS2AnalysisAdaptor.h | 4 ---- + sensei/ADIOS2DataAdaptor.cxx | 8 -------- + sensei/ADIOS2DataAdaptor.h | 3 --- + sensei/ADIOS2Schema.cxx | 6 +++++- + sensei/ADIOS2Schema.h | 8 +------- + sensei/testing/testADIOS2Read.py | 1 - + sensei/testing/testADIOS2Write.py | 1 - + 8 files changed, 12 insertions(+), 29 deletions(-) + +diff --git a/sensei/ADIOS2AnalysisAdaptor.cxx b/sensei/ADIOS2AnalysisAdaptor.cxx +index 4358e4d..73cd408 100644 +--- a/sensei/ADIOS2AnalysisAdaptor.cxx ++++ b/sensei/ADIOS2AnalysisAdaptor.cxx +@@ -46,7 +46,7 @@ senseiNewMacro(ADIOS2AnalysisAdaptor); + + //---------------------------------------------------------------------------- + ADIOS2AnalysisAdaptor::ADIOS2AnalysisAdaptor() : +- Schema(nullptr), FileName("sensei.bp"), DebugMode(0), ++ Schema(nullptr), FileName("sensei.bp"), + StepsPerFile(0), StepIndex(0), FileIndex(0) + { + this->Handles.io = nullptr; +@@ -270,9 +270,6 @@ int ADIOS2AnalysisAdaptor::Initialize(pugi::xml_node &node) + if (!bufferMode.empty()) + this->AddParameter("QueueFullPolicy", bufferMode); + +- // turn on/off debug output +- this->SetDebugMode(node.attribute("debug_mode").as_int(0)); +- + // enable file series for file based engines + this->SetStepsPerFile(node.attribute("steps_per_file").as_int(0)); + +@@ -329,8 +326,13 @@ int ADIOS2AnalysisAdaptor::InitializeADIOS2() + } + + // initialize adios2 ++#if ADIOS2_VERSION_MAJOR > 2 || (ADIOS2_VERSION_MAJOR == 2 && ADIOS2_VERSION_MINOR >= 9) ++ // adios2_init()'s signature changed in version 2.9.0 ++ this->Adios = adios2_init(this->GetCommunicator()); ++#else + this->Adios = adios2_init(this->GetCommunicator(), + adios2_debug_mode(this->DebugMode)); ++#endif + + if (this->Adios == nullptr) + { +diff --git a/sensei/ADIOS2AnalysisAdaptor.h b/sensei/ADIOS2AnalysisAdaptor.h +index 4919ddb..c5c6d2c 100644 +--- a/sensei/ADIOS2AnalysisAdaptor.h ++++ b/sensei/ADIOS2AnalysisAdaptor.h +@@ -75,9 +75,6 @@ public: + void SetStepsPerFile(long steps) + { this->StepsPerFile = steps; } + +- /// Enable/disable debugging output. The default value is 0. +- void SetDebugMode(int mode) +- { this->DebugMode = mode; } + + /** Adds a set of sensei::DataRequirements, typically this will come from an XML + * configuratiopn file. Data requirements tell the adaptor what to fetch from +@@ -146,7 +143,6 @@ protected: + senseiADIOS2::AdiosHandle Handles; + adios2_adios *Adios; + std::vector> Parameters; +- int DebugMode; + long StepsPerFile; + long StepIndex; + long FileIndex; +diff --git a/sensei/ADIOS2DataAdaptor.cxx b/sensei/ADIOS2DataAdaptor.cxx +index 5c0c036..bbb093e 100644 +--- a/sensei/ADIOS2DataAdaptor.cxx ++++ b/sensei/ADIOS2DataAdaptor.cxx +@@ -56,12 +56,6 @@ void ADIOS2DataAdaptor::SetReadEngine(const std::string &engine) + this->Internals->Stream.SetReadEngine(engine); + } + +-//---------------------------------------------------------------------------- +-void ADIOS2DataAdaptor::SetDebugMode(int mode) +-{ +- this->Internals->Stream.SetDebugMode(mode); +-} +- + //---------------------------------------------------------------------------- + void ADIOS2DataAdaptor::AddParameter(const std::string &name, + const std::string &value) +@@ -96,8 +90,6 @@ int ADIOS2DataAdaptor::Initialize(pugi::xml_node &node) + if (node.attribute("timeout")) + this->AddParameter("OpenTimeoutSecs", node.attribute("timeout").value()); + +- this->SetDebugMode(node.attribute("debug_mode").as_int(0)); +- + pugi::xml_node params = node.child("engine_parameters"); + if (params) + { +diff --git a/sensei/ADIOS2DataAdaptor.h b/sensei/ADIOS2DataAdaptor.h +index b0c2009..58be416 100644 +--- a/sensei/ADIOS2DataAdaptor.h ++++ b/sensei/ADIOS2DataAdaptor.h +@@ -30,9 +30,6 @@ public: + // given to the write side analysis adaptor + void SetReadEngine(const std::string &readEngine); + +- // enable/disable adios internal debug messages +- void SetDebugMode(int mode); +- + // add name value pairs to pass into ADIOS after the + // engine has been created + void AddParameter(const std::string &name, const std::string &value); +diff --git a/sensei/ADIOS2Schema.cxx b/sensei/ADIOS2Schema.cxx +index b1263ca..7b66d19 100644 +--- a/sensei/ADIOS2Schema.cxx ++++ b/sensei/ADIOS2Schema.cxx +@@ -422,7 +422,12 @@ int InputStream::Initialize(MPI_Comm comm) + sensei::TimeEvent<128> mark("senseiADIOS2::InputStream::Initialize"); + + // initialize adios2 ++#if ADIOS2_VERSION_MAJOR > 2 || (ADIOS2_VERSION_MAJOR == 2 && ADIOS2_VERSION_MINOR >= 9) ++ // adios2_init()'s signature changed in version 2.9.0 ++ this->Adios = adios2_init(comm); ++#else + this->Adios = adios2_init(comm, adios2_debug_mode(this->DebugMode)); ++#endif + if (this->Adios == nullptr) + { + SENSEI_ERROR("adios2_init failed") +@@ -651,7 +656,6 @@ int InputStream::Finalize() + this->Handles.engine = nullptr; + this->Handles.io = nullptr; + this->ReadEngine = ""; +- this->DebugMode = 0; + + return 0; + } +diff --git a/sensei/ADIOS2Schema.h b/sensei/ADIOS2Schema.h +index b8e5bfb..bc4f3bc 100644 +--- a/sensei/ADIOS2Schema.h ++++ b/sensei/ADIOS2Schema.h +@@ -109,8 +109,7 @@ struct InputStream + { + InputStream() : Handles(), Adios(nullptr), + ReadEngine(""), FileName(""), FileSeries(0), +- StepsPerFile(0), FileIndex(0), StepIndex(0), +- DebugMode(0) {} ++ StepsPerFile(0), FileIndex(0), StepIndex(0) {} + + // pass engine parameters to ADIOS2 in key value pairs + void AddParameter(const std::string &key, const std::string &value); +@@ -120,10 +119,6 @@ struct InputStream + void SetReadEngine(const std::string &engine) + { this->ReadEngine = engine; } + +- // set debug mode 0 off, 1 on +- void SetDebugMode(int mode) +- { this->DebugMode = mode; } +- + /// @brief Set the filename. + /// Default value is "sensei.bp" which is suitable for use with streams or + /// transport engines such as SST. When writing files to disk using the BP4 +@@ -165,7 +160,6 @@ struct InputStream + int FileIndex; + int StepIndex; + std::vector> Parameters; +- int DebugMode; + }; + + } +diff --git a/sensei/testing/testADIOS2Read.py b/sensei/testing/testADIOS2Read.py +index b2fd8d2..916c28f 100644 +--- a/sensei/testing/testADIOS2Read.py ++++ b/sensei/testing/testADIOS2Read.py +@@ -39,7 +39,6 @@ def read_data(engine, fileName, verbose): + da = ADIOS2DataAdaptor.New() + da.SetReadEngine(engine) + da.SetFileName(fileName) +- da.SetDebugMode(1) + da.SetPartitioner(BlockPartitioner.New()) + da.OpenStream() + # process all time steps +diff --git a/sensei/testing/testADIOS2Write.py b/sensei/testing/testADIOS2Write.py +index d6f2f67..28a6631 100644 +--- a/sensei/testing/testADIOS2Write.py ++++ b/sensei/testing/testADIOS2Write.py +@@ -155,7 +155,6 @@ def write_data(engine, file_name, steps_per_file, n_its): + aw.SetEngineName(engine) + aw.SetFileName(file_name) + aw.SetStepsPerFile(steps_per_file) +- aw.SetDebugMode(1) + + # create the datasets + # the first mesh is an image +-- +2.35.3 + diff --git a/var/spack/repos/builtin/packages/sensei/package.py b/var/spack/repos/builtin/packages/sensei/package.py index 67df780cd0..76c6d172b8 100644 --- a/var/spack/repos/builtin/packages/sensei/package.py +++ b/var/spack/repos/builtin/packages/sensei/package.py @@ -98,6 +98,8 @@ class Sensei(CMakePackage): conflicts("+ascent", when="+libsim") # Patches + # https://github.com/SENSEI-insitu/SENSEI/pull/114 + patch("adios2-remove-deprecated-functions.patch", when="@4:4.1 ^adios2@2.9:") patch("libsim-add-missing-symbol-visibility-pr67.patch", when="@4.0.0") patch("sensei-find-mpi-component-cxx-pr68.patch", when="@4.0.0") patch("sensei-install-external-pugixml-pr69.patch", when="@4.0.0")