[ET Trac] #2830: CarpetX depends on BLOSC support in ADIOS2 but BLOSC is not in the ET

Erik Schnetter trac-noreply at einsteintoolkit.org
Fri Nov 15 11:22:27 CST 2024


#2830: CarpetX depends on BLOSC support in ADIOS2 but BLOSC is not in the ET

 Reporter: Roland Haas
   Status: open
Milestone: ET_2024_11
  Version: 
     Type: bug
 Priority: blocker
Component: EinsteinToolkit thorn

Comment (by Erik Schnetter):

This works for me:

```c++
diff --git a/CarpetX/src/io_openpmd.cxx b/CarpetX/src/io_openpmd.cxx
index acdbf9f7..43f30a9d 100644
--- a/CarpetX/src/io_openpmd.cxx
+++ b/CarpetX/src/io_openpmd.cxx
@@ -16,6 +16,10 @@

 #include <openPMD/openPMD.hpp>

+#ifdef HAVE_CAPABILITY_ADIOS2
+#include <adios2.h>
+#endif
+
 #if defined _OPENMP
 #include <omp.h>
 #elif defined __HIPCC__
@@ -116,6 +120,7 @@ constexpr openPMD::IterationEncoding iterationEncoding =
     openPMD::IterationEncoding::fileBased;

 // TODO: Set number of threads?
+#ifdef ADIOS2_HAVE_BLOSC2
 const std::string options = R"EOS(
   {
     "adios2": {
@@ -133,6 +138,18 @@ const std::string options = R"EOS(
     }
   }
 )EOS";
+#else
+const std::string options = R"EOS(
+  {
+    "adios2": {
+      "dataset": {
+        "operators": [
+        ]
+      }
+    }
+  }
+)EOS";
+#endif

 constexpr bool input_ghosts = false;
 constexpr bool output_ghosts = false;
```

‌

I the long term we would want to be able to use Cactus parameters to choose this…

If you prefer you can also just undo the changes that require Blosc.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2830/carpetx-depends-on-blosc-support-in-adios2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einsteintoolkit.org/pipermail/trac/attachments/20241115/37bc9687/attachment.htm>


More information about the Trac mailing list