Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
bbc7e78
Base structure for scientific defaults
franzpoeschel Jan 12, 2026
2c10afc
Start adding defaults
franzpoeschel Jan 12, 2026
a84c715
debugging output
franzpoeschel Jan 12, 2026
09805c6
Fixes
franzpoeschel Jan 12, 2026
965fcad
BaseRecord --> unitDimension
franzpoeschel Jan 12, 2026
47dd320
nunja hehe
franzpoeschel Jan 12, 2026
7f49637
Fixes
franzpoeschel Jan 12, 2026
5d68a68
Further fixes
franzpoeschel Jan 13, 2026
0735fdd
further fixes
franzpoeschel Jan 13, 2026
d861aba
tests temporarily passing :D
franzpoeschel Jan 13, 2026
83c9c76
Cleanup
franzpoeschel Jan 13, 2026
a4d163d
UnitDimension for position/positionOffset
franzpoeschel Jan 13, 2026
1cd7c0d
WIP: RecordComponent stuff
franzpoeschel Jan 13, 2026
615a00d
Fix coretests
franzpoeschel Jan 14, 2026
a3bcd7d
Clean up Iteration finalizing logic
franzpoeschel Jan 14, 2026
f027f5b
Add defaults for Iteration class
franzpoeschel Jan 14, 2026
a469f94
Fix variadic template template parameters
franzpoeschel Jan 15, 2026
24de416
Remove flush-time check for populized components
franzpoeschel Jan 16, 2026
61abebd
Make the default specification more flexible
franzpoeschel Jan 16, 2026
17be0a7
WIP
franzpoeschel Jan 20, 2026
aed4574
continue
franzpoeschel Jan 20, 2026
105a09b
Split this into internal and public header
franzpoeschel Jan 21, 2026
d397399
Distinguish writing from reading
franzpoeschel Jan 21, 2026
a681895
Tests now working again
franzpoeschel Jan 21, 2026
6b50b2d
Mostly move Mesh reading to ScientificDefaults
franzpoeschel Jan 21, 2026
4dae283
Fix type conversions between char and string
franzpoeschel Jan 21, 2026
1ffc588
Somewhat working Mesh reading
franzpoeschel Jan 21, 2026
aa5407d
Fix little parent call bug
franzpoeschel Jan 22, 2026
1a6f171
Mention expected datatypes in attribute reading error messages
franzpoeschel Jan 22, 2026
1091274
Move Iteration reading to ScientificDefaults class
franzpoeschel Jan 22, 2026
068e019
Introduce genericsetter, use for unitDimension
franzpoeschel Jan 22, 2026
2e9efae
Record / BaseRecord Reading
franzpoeschel Jan 22, 2026
3c63b16
Readers for everything now except version-dependent stuff
franzpoeschel Jan 22, 2026
ffa9304
Add gridUnitDimension in ScientificDefaults
franzpoeschel Jan 23, 2026
b7a7849
Do not use templates for defaults setter
franzpoeschel Jan 26, 2026
bfe954f
Wew NewAttributeReader
franzpoeschel Jan 27, 2026
5c4cff0
Fixes
franzpoeschel Jan 27, 2026
b01d16b
Fixes
franzpoeschel Jan 27, 2026
5c27f43
Defaults for patchRecord
franzpoeschel Jan 27, 2026
ed4473c
Adapt PatchRecordComponent
franzpoeschel Jan 27, 2026
df14a37
Fixes
franzpoeschel Jan 27, 2026
0d3664b
Cleanup
franzpoeschel Jan 28, 2026
59e1eaa
Cleanup
franzpoeschel Jan 28, 2026
d3c7a5b
Avoid overcomplex attribute type conversions
franzpoeschel Jan 28, 2026
c720b59
reduce binary size a bit
franzpoeschel Jan 28, 2026
75c697e
Try further reducing amount of lambdas...
franzpoeschel Jan 28, 2026
f235b68
Annotate MB sizes
franzpoeschel Jan 28, 2026
3ac1455
Reduce implementation sizes for RequireScalar / RequireVector
franzpoeschel Jan 29, 2026
210e286
vibe-coded suggestions for size optimization
franzpoeschel Jan 29, 2026
78018fa
Avoid using lambdas for require_type
franzpoeschel Jan 29, 2026
8ace899
Change code order
franzpoeschel Jan 29, 2026
a222056
Replace if constexpr with SFINAE
franzpoeschel Jan 30, 2026
8200e23
Fix nvhpc/msvc builds
franzpoeschel Jan 30, 2026
f5750fb
doxygen fix
franzpoeschel Feb 2, 2026
54d58ef
Cleanup
franzpoeschel Feb 4, 2026
7bb30c2
scientificdefaults_internal.cpp
franzpoeschel Feb 24, 2026
fc35899
Add visitor pattern
franzpoeschel Feb 24, 2026
4e41fdf
wip: ScientificDefaults without CRT
franzpoeschel Feb 24, 2026
8153d1f
Move defaults impl to classes
franzpoeschel Feb 24, 2026
7cd0031
Fix visitHierarchy
franzpoeschel Feb 24, 2026
04821d8
Fix visithierarchy
franzpoeschel Feb 24, 2026
02cf91c
Compiles
franzpoeschel Feb 24, 2026
895fb50
Fix inheritance issue
franzpoeschel Feb 25, 2026
35ec8ae
Cleanup
franzpoeschel Mar 3, 2026
3502c46
Move files
franzpoeschel Mar 3, 2026
4bb6d5c
Split files
franzpoeschel Mar 3, 2026
eb385ed
Cleanup, documentation
franzpoeschel Mar 3, 2026
07d1096
Fix JSON backend bug when missing attributes
franzpoeschel Mar 3, 2026
a00d87e
Fix bug with metadata set too late
franzpoeschel Mar 20, 2026
867ee9a
Write defaults upon flush, thats good enough actually
franzpoeschel Mar 25, 2026
23e378d
... wip visitor without templates ...
franzpoeschel Mar 20, 2026
8f55bfe
somewhat compiles
franzpoeschel Mar 20, 2026
0e47c03
Clean up visitHierarchy API
franzpoeschel Mar 20, 2026
48d4465
Further cleanup
franzpoeschel Mar 20, 2026
14740bf
Implement lambda visitor in terms of explicit visitor
franzpoeschel Mar 20, 2026
110abeb
Fix Python bindings
franzpoeschel Mar 20, 2026
8c34387
populateDefaultMetadata -> commitStructuralSetup
franzpoeschel Mar 25, 2026
a432bd6
Cleanup
franzpoeschel Mar 25, 2026
ac59e11
Documentation
franzpoeschel Mar 25, 2026
2c60cae
Postfix traversal, document visitHierarchy
franzpoeschel Mar 25, 2026
5ec174b
commitStructuralSetup --> populateMissingMetadata(bool recursive)
franzpoeschel Apr 7, 2026
d912517
Add memory selection task to backend
franzpoeschel Aug 7, 2025
3f808db
Add future helper
franzpoeschel Aug 7, 2025
74f2054
Fixes for UniquePtr.hpp
franzpoeschel Aug 7, 2025
3769b66
Main implementation of LoadStoreChunk.hpp
franzpoeschel Aug 7, 2025
3e13ff0
Adapt RecordComponent implementation based on new API
franzpoeschel Aug 7, 2025
b9ecb47
Testing
franzpoeschel Aug 7, 2025
f79fe4d
Enable support for const unique pointers?
franzpoeschel Aug 7, 2025
bf3cbc6
Use a better trick to cheat clang-tidy
franzpoeschel Aug 7, 2025
c3d1bfc
clang-tidy fixes
franzpoeschel Aug 8, 2025
23f432f
Fix linker error
franzpoeschel Jan 8, 2026
c61a9b4
Reimplement unique_ptr-based span API
franzpoeschel Jan 8, 2026
facd0f9
Fix parallel tests
franzpoeschel Jan 8, 2026
0a0dc7a
Type signature fix
franzpoeschel Jan 8, 2026
0fdacc4
Destructor for ~DeferredComputation
franzpoeschel Jan 9, 2026
8b42aa2
CI fixes
franzpoeschel Feb 3, 2026
fea26c1
wip: runtime-erase pointer type
franzpoeschel Feb 9, 2026
1cde0d8
Continue
franzpoeschel Feb 9, 2026
9f2917a
Mostly working again
franzpoeschel Feb 9, 2026
279d1df
bad fix, remove the bool from python bindings
franzpoeschel Feb 9, 2026
5d0e8cf
Remove bool dataset operations from python API
franzpoeschel Feb 9, 2026
da2f797
Fix Coretest
franzpoeschel Feb 9, 2026
71a7705
instantiate some more methods
franzpoeschel Feb 10, 2026
1ffa757
wip: unify common code into compiled functions
franzpoeschel Feb 10, 2026
2f4cfb5
clang-tidy fixes
franzpoeschel Feb 10, 2026
809bc9f
CI fixes
franzpoeschel Feb 11, 2026
ffd9f32
Remove CRT pattern and core namespace
franzpoeschel Feb 12, 2026
c51e4cc
Move wrappers to header code
franzpoeschel Feb 12, 2026
adec503
Interface cleanup
franzpoeschel Feb 13, 2026
9bcbcee
Fix after rebase
franzpoeschel Mar 12, 2026
25c053b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 12, 2026
fd39465
Merge branch 'defaults-upon-close'
franzpoeschel Apr 7, 2026
2c917b8
Extract GlobalParameters struct
franzpoeschel Jan 9, 2026
689ec45
Better initialization of global params
franzpoeschel Jan 9, 2026
092f2be
First attempt at immediate flushing
franzpoeschel Jan 12, 2026
7539ddf
Fix coretests
franzpoeschel Jan 14, 2026
37acb3a
wip: try splitting m_work in two
franzpoeschel Jan 14, 2026
00e9c33
push_chunk: distinguish immediate from deferred flushes
franzpoeschel Jan 14, 2026
a61db6d
Avoid flush_immediately for Span operations
franzpoeschel Jan 14, 2026
bf09155
Fix dirty handling
franzpoeschel Jan 14, 2026
0a2b313
Bug fix in RecordComponent::flush
franzpoeschel Feb 2, 2026
2a7ec97
tmp: deactivate some tests
franzpoeschel Feb 2, 2026
2f20db0
Properly distinguish flush modi in tests
franzpoeschel Feb 2, 2026
bc82873
CI fixes
franzpoeschel Feb 2, 2026
a34b85d
CI fixes
franzpoeschel Feb 3, 2026
7b99854
[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