Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
08eb916
Base structure for scientific defaults
franzpoeschel Jan 12, 2026
faf1670
Start adding defaults
franzpoeschel Jan 12, 2026
6e034a9
debugging output
franzpoeschel Jan 12, 2026
2ddef6e
Fixes
franzpoeschel Jan 12, 2026
8fd66f9
BaseRecord --> unitDimension
franzpoeschel Jan 12, 2026
3b2eb72
nunja hehe
franzpoeschel Jan 12, 2026
31f6b21
Fixes
franzpoeschel Jan 12, 2026
b22f816
Further fixes
franzpoeschel Jan 13, 2026
f33ff57
further fixes
franzpoeschel Jan 13, 2026
ee09603
tests temporarily passing :D
franzpoeschel Jan 13, 2026
994a6eb
Cleanup
franzpoeschel Jan 13, 2026
121b9b4
UnitDimension for position/positionOffset
franzpoeschel Jan 13, 2026
b09c386
WIP: RecordComponent stuff
franzpoeschel Jan 13, 2026
17dcadd
Fix coretests
franzpoeschel Jan 14, 2026
50864a9
Clean up Iteration finalizing logic
franzpoeschel Jan 14, 2026
ff7252b
Add defaults for Iteration class
franzpoeschel Jan 14, 2026
26afddb
Fix variadic template template parameters
franzpoeschel Jan 15, 2026
2caac49
Remove flush-time check for populized components
franzpoeschel Jan 16, 2026
c25606b
Make the default specification more flexible
franzpoeschel Jan 16, 2026
0d6a852
WIP
franzpoeschel Jan 20, 2026
003547c
continue
franzpoeschel Jan 20, 2026
7360a36
Split this into internal and public header
franzpoeschel Jan 21, 2026
fcef505
Distinguish writing from reading
franzpoeschel Jan 21, 2026
5ca0859
Tests now working again
franzpoeschel Jan 21, 2026
aa5d94c
Mostly move Mesh reading to ScientificDefaults
franzpoeschel Jan 21, 2026
c3f9e0b
Fix type conversions between char and string
franzpoeschel Jan 21, 2026
357ee0b
Somewhat working Mesh reading
franzpoeschel Jan 21, 2026
e1f0ea7
Fix little parent call bug
franzpoeschel Jan 22, 2026
7495b11
Mention expected datatypes in attribute reading error messages
franzpoeschel Jan 22, 2026
ef3a590
Move Iteration reading to ScientificDefaults class
franzpoeschel Jan 22, 2026
2c9441b
Introduce genericsetter, use for unitDimension
franzpoeschel Jan 22, 2026
027d70f
Record / BaseRecord Reading
franzpoeschel Jan 22, 2026
093b7f5
Readers for everything now except version-dependent stuff
franzpoeschel Jan 22, 2026
0b41570
Add gridUnitDimension in ScientificDefaults
franzpoeschel Jan 23, 2026
dc05ccb
Do not use templates for defaults setter
franzpoeschel Jan 26, 2026
f93a194
Wew NewAttributeReader
franzpoeschel Jan 27, 2026
ff640b1
Fixes
franzpoeschel Jan 27, 2026
1d556ee
Fixes
franzpoeschel Jan 27, 2026
ab74bbd
Defaults for patchRecord
franzpoeschel Jan 27, 2026
3982624
Adapt PatchRecordComponent
franzpoeschel Jan 27, 2026
df2e6d2
Fixes
franzpoeschel Jan 27, 2026
bfe290e
Cleanup
franzpoeschel Jan 28, 2026
4306430
Cleanup
franzpoeschel Jan 28, 2026
066bcd1
Avoid overcomplex attribute type conversions
franzpoeschel Jan 28, 2026
3240e76
reduce binary size a bit
franzpoeschel Jan 28, 2026
5a55a55
Try further reducing amount of lambdas...
franzpoeschel Jan 28, 2026
f21e264
Annotate MB sizes
franzpoeschel Jan 28, 2026
4f3b143
Reduce implementation sizes for RequireScalar / RequireVector
franzpoeschel Jan 29, 2026
5507d62
vibe-coded suggestions for size optimization
franzpoeschel Jan 29, 2026
1d733bd
Avoid using lambdas for require_type
franzpoeschel Jan 29, 2026
761e08a
Change code order
franzpoeschel Jan 29, 2026
d67ccc7
Replace if constexpr with SFINAE
franzpoeschel Jan 30, 2026
eacad1f
Fix nvhpc/msvc builds
franzpoeschel Jan 30, 2026
ffdb4f5
doxygen fix
franzpoeschel Feb 2, 2026
62fd923
Cleanup
franzpoeschel Feb 4, 2026
24e2d63
scientificdefaults_internal.cpp
franzpoeschel Feb 24, 2026
5f9c6ae
Add visitor pattern
franzpoeschel Feb 24, 2026
4003c6d
wip: ScientificDefaults without CRT
franzpoeschel Feb 24, 2026
3f627d6
Move defaults impl to classes
franzpoeschel Feb 24, 2026
836adc7
Fix visitHierarchy
franzpoeschel Feb 24, 2026
f22213f
Fix visithierarchy
franzpoeschel Feb 24, 2026
2438e9d
Compiles
franzpoeschel Feb 24, 2026
500fca5
Fix inheritance issue
franzpoeschel Feb 25, 2026
781828b
Cleanup
franzpoeschel Mar 3, 2026
8aedfaa
Move files
franzpoeschel Mar 3, 2026
f132c92
Split files
franzpoeschel Mar 3, 2026
6c32488
Cleanup, documentation
franzpoeschel Mar 3, 2026
293ea60
Fix JSON backend bug when missing attributes
franzpoeschel Mar 3, 2026
7985c4a
Add memory selection task to backend
franzpoeschel Aug 7, 2025
95f5927
Add future helper
franzpoeschel Aug 7, 2025
02c7959
Fixes for UniquePtr.hpp
franzpoeschel Aug 7, 2025
634ca3a
Main implementation of LoadStoreChunk.hpp
franzpoeschel Aug 7, 2025
0b2e01f
Adapt RecordComponent implementation based on new API
franzpoeschel Aug 7, 2025
f4c1da4
Testing
franzpoeschel Aug 7, 2025
338ff77
Enable support for const unique pointers?
franzpoeschel Aug 7, 2025
bc7b6ed
Use a better trick to cheat clang-tidy
franzpoeschel Aug 7, 2025
2529385
clang-tidy fixes
franzpoeschel Aug 8, 2025
56efb26
Fix linker error
franzpoeschel Jan 8, 2026
d7ebda3
Reimplement unique_ptr-based span API
franzpoeschel Jan 8, 2026
aa3431e
Fix parallel tests
franzpoeschel Jan 8, 2026
8143762
Type signature fix
franzpoeschel Jan 8, 2026
6a5eb70
Destructor for ~DeferredComputation
franzpoeschel Jan 9, 2026
0871056
CI fixes
franzpoeschel Feb 3, 2026
933e10b
wip: runtime-erase pointer type
franzpoeschel Feb 9, 2026
c9b5d26
Continue
franzpoeschel Feb 9, 2026
7332c10
Mostly working again
franzpoeschel Feb 9, 2026
8777595
bad fix, remove the bool from python bindings
franzpoeschel Feb 9, 2026
faa881d
Remove bool dataset operations from python API
franzpoeschel Feb 9, 2026
f8fd5a7
Fix Coretest
franzpoeschel Feb 9, 2026
97e2b6e
instantiate some more methods
franzpoeschel Feb 10, 2026
ebea5aa
wip: unify common code into compiled functions
franzpoeschel Feb 10, 2026
a4c30e7
clang-tidy fixes
franzpoeschel Feb 10, 2026
6c06c4c
CI fixes
franzpoeschel Feb 11, 2026
7645f40
Remove CRT pattern and core namespace
franzpoeschel Feb 12, 2026
afefc49
Move wrappers to header code
franzpoeschel Feb 12, 2026
65a96b5
Interface cleanup
franzpoeschel Feb 13, 2026
1fa6d2d
Fix after rebase
franzpoeschel Mar 12, 2026
d983533
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 12, 2026
5f156ad
Fix bug with metadata set too late
franzpoeschel Mar 20, 2026
ab106fa
Merge branch 'defaults-upon-close'
franzpoeschel Mar 20, 2026
faa6cc1
Extract GlobalParameters struct
franzpoeschel Jan 9, 2026
6e78284
Better initialization of global params
franzpoeschel Jan 9, 2026
eebabdd
First attempt at immediate flushing
franzpoeschel Jan 12, 2026
a17bc8a
Fix coretests
franzpoeschel Jan 14, 2026
3bfbbbe
wip: try splitting m_work in two
franzpoeschel Jan 14, 2026
d8c38d6
push_chunk: distinguish immediate from deferred flushes
franzpoeschel Jan 14, 2026
f4b14e5
Avoid flush_immediately for Span operations
franzpoeschel Jan 14, 2026
5a359b7
Fix dirty handling
franzpoeschel Jan 14, 2026
f950916
Bug fix in RecordComponent::flush
franzpoeschel Feb 2, 2026
6de90f6
tmp: deactivate some tests
franzpoeschel Feb 2, 2026
94bbb7e
Properly distinguish flush modi in tests
franzpoeschel Feb 2, 2026
3b23c85
CI fixes
franzpoeschel Feb 2, 2026
822c03f
CI fixes
franzpoeschel Feb 3, 2026
33b4186
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ set(CORE_SOURCE
src/Format.cpp
src/Iteration.cpp
src/IterationEncoding.cpp
src/LoadStoreChunk.cpp
src/Mesh.cpp
src/ParticlePatches.cpp
src/ParticleSpecies.cpp
Expand All @@ -411,6 +412,7 @@ set(CORE_SOURCE
src/version.cpp
src/auxiliary/Date.cpp
src/auxiliary/Filesystem.cpp
src/auxiliary/Future.cpp
src/auxiliary/JSON.cpp
src/auxiliary/JSONMatcher.cpp
src/auxiliary/Memory.cpp
Expand All @@ -426,6 +428,11 @@ set(CORE_SOURCE
src/backend/PatchRecord.cpp
src/backend/PatchRecordComponent.cpp
src/backend/Writable.cpp
src/backend/scientific_defaults/ScientificDefaults.cpp
src/backend/scientific_defaults/ScientificDefaults_auxiliary.cpp
src/backend/scientific_defaults/ProcessParsedAttribute.cpp
src/backend/scientific_defaults/AttributeReader.cpp
src/backend/scientific_defaults/ConfigAttribute.cpp
src/auxiliary/OneDimensionalBlockSlicer.cpp
src/helper/list_series.cpp
src/snapshots/ContainerImpls.cpp
Expand Down
6 changes: 6 additions & 0 deletions include/openPMD/Dataset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ namespace openPMD
using Extent = std::vector<std::uint64_t>;
using Offset = std::vector<std::uint64_t>;

struct MemorySelection
{
Offset offset;
Extent extent;
};

class Dataset
{
friend class RecordComponent;
Expand Down
55 changes: 33 additions & 22 deletions include/openPMD/Datatype.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,36 +223,52 @@ namespace detail
template <typename T>
constexpr bool is_char_v = is_char<T>::value;

template <typename T_Char1, typename T_Char2>
inline bool isSameChar()
struct IsChar
{
return
// both must be char types
is_char_v<T_Char1> && is_char_v<T_Char2> &&
// both must have equivalent sign
std::is_signed_v<T_Char1> == std::is_signed_v<T_Char2> &&
// both must have equivalent size
sizeof(T_Char1) == sizeof(T_Char2);
template <typename T>
static constexpr bool call()
{
return is_char_v<T>;
}
template <size_t N>
static constexpr bool call()
{
return false;
}
};

constexpr inline bool isChar(Datatype dtype)
{
return switchType<IsChar>(dtype);
}

template <typename T1>
struct IsSameChar
struct DtypeSize
{
template <typename T2>
static bool call()
template <typename T>
static constexpr size_t call()
{
return isSameChar<T1, T2>();
return sizeof(T);
}

static constexpr char const *errorMsg = "IsSameChar";
static constexpr char const *errorMsg = "DtypeSize";
};

constexpr inline size_t dtypeSize(Datatype dtype)
{
return switchType<DtypeSize>(dtype);
}
} // namespace detail

template <typename T_Char>
constexpr inline bool isSameChar(Datatype d)
{
return switchType<detail::IsSameChar<T_Char>>(d);
return isSameChar(d, determineDatatype<T_Char>());
}

constexpr bool isSameChar(Datatype d1, Datatype d2)
{
return detail::isChar(d1) && detail::isChar(d2) &&
isSigned(d1) == isSigned(d2) &&
detail::dtypeSize(d1) == detail::dtypeSize(d2);
}

namespace detail
Expand Down Expand Up @@ -285,11 +301,6 @@ constexpr inline bool isSigned(Datatype d)
return switchType<detail::IsSigned>(d);
}

constexpr inline bool isSameChar(Datatype d, Datatype e)
{
return isChar(d) && isChar(e) && isSigned(d) == isSigned(e);
}

constexpr bool isSame(openPMD::Datatype const d, openPMD::Datatype const e)
{
return
Expand Down
2 changes: 2 additions & 0 deletions include/openPMD/IO/ADIOS/ADIOS2File.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*/
#pragma once

#include "openPMD/Dataset.hpp"
#include "openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp"
#include "openPMD/IO/ADIOS/ADIOS2PreloadAttributes.hpp"
#include "openPMD/IO/ADIOS/ADIOS2PreloadVariables.hpp"
Expand Down Expand Up @@ -112,6 +113,7 @@ struct BufferedUniquePtrPut
std::string name;
Offset offset;
Extent extent;
std::optional<MemorySelection> memorySelection;
UniquePtrWithLambda<void> data;
Datatype dtype = Datatype::UNDEFINED;

Expand Down
28 changes: 20 additions & 8 deletions include/openPMD/IO/ADIOS/ADIOS2IOHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/
#pragma once

#include "openPMD/Dataset.hpp"
#include "openPMD/Error.hpp"
#include "openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp"
#include "openPMD/IO/ADIOS/ADIOS2FilePosition.hpp"
Expand All @@ -30,6 +31,7 @@
#include "openPMD/IO/AbstractIOHandler.hpp"
#include "openPMD/IO/AbstractIOHandlerImpl.hpp"
#include "openPMD/IO/AbstractIOHandlerImplCommon.hpp"
#include "openPMD/IO/AbstractIOHandler_internal.hpp"
#include "openPMD/IO/FlushParametersInternal.hpp"
#include "openPMD/IO/IOTask.hpp"
#include "openPMD/IO/InvalidatableFile.hpp"
Expand Down Expand Up @@ -509,6 +511,7 @@ class ADIOS2IOHandlerImpl
adios2::Variable<T> verifyDataset(
Offset const &offset,
Extent const &extent,
std::optional<MemorySelection> const &memorySelection,
adios2::IO &IO,
adios2::Engine &engine,
std::string const &varName,
Expand Down Expand Up @@ -622,13 +625,26 @@ class ADIOS2IOHandlerImpl
var.SetSelection(
{adios2::Dims(offset.begin(), offset.end()),
adios2::Dims(extent.begin(), extent.end())});

if (memorySelection.has_value())
{
var.SetMemorySelection(
{adios2::Dims(
memorySelection->offset.begin(),
memorySelection->offset.end()),
adios2::Dims(
memorySelection->extent.begin(),
memorySelection->extent.end())});
}

return var;
}

struct
{
bool noGroupBased = false;
bool blosc2bp5 = false;
bool memorySelection = false;
} printedWarningsAlready;
}; // ADIOS2IOHandlerImpl

Expand Down Expand Up @@ -942,7 +958,7 @@ class ADIOS2IOHandler : public AbstractIOHandler
try
{
auto params = internal::defaultParsedFlushParams;
this->flush(params);
this->flush_impl(params);
}
catch (std::exception const &ex)
{
Expand All @@ -962,9 +978,7 @@ class ADIOS2IOHandler : public AbstractIOHandler
#if openPMD_HAVE_MPI

ADIOS2IOHandler(
std::optional<std::unique_ptr<AbstractIOHandler>> initialize_from,
std::string path,
Access,
internal::AbstractIOHandlerInitFrom &&initialize_from,
MPI_Comm,
json::TracingJSON options,
std::string engineType,
Expand All @@ -973,9 +987,7 @@ class ADIOS2IOHandler : public AbstractIOHandler
#endif

ADIOS2IOHandler(
std::optional<std::unique_ptr<AbstractIOHandler>> initialize_from,
std::string path,
Access,
internal::AbstractIOHandlerInitFrom &&initialize_from,
json::TracingJSON options,
std::string engineType,
std::string specifiedExtension);
Expand All @@ -990,6 +1002,6 @@ class ADIOS2IOHandler : public AbstractIOHandler
return true;
}

std::future<void> flush(internal::ParsedFlushParams &) override;
std::future<void> flush_impl(internal::ParsedFlushParams &) override;
}; // ADIOS2IOHandler
} // namespace openPMD
23 changes: 23 additions & 0 deletions include/openPMD/IO/ADIOS/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,29 @@
#define openPMD_HAVE_ADIOS2_BP5 0
#endif

namespace openPMD
{
namespace detail
{
template <typename Variable, typename SFINAE = void>
struct CanTheMemorySelectionBeReset
{
static constexpr bool value = false;
};

template <typename Variable>
struct CanTheMemorySelectionBeReset<
Variable,
decltype(std::declval<Variable>().SetMemorySelection())>
{
static constexpr bool value = true;
};
} // namespace detail

constexpr bool CanTheMemorySelectionBeReset =
detail::CanTheMemorySelectionBeReset<adios2::Variable<int>>::value;
} // namespace openPMD

#else

#define openPMD_HAS_ADIOS_2_8 0
Expand Down
Loading
Loading