23 #include "openPMD/config.hpp" 25 #if openPMD_HAVE_ADIOS1 27 #include "openPMD/IO/ADIOS/ADIOS1Auxiliary.hpp" 28 #include "openPMD/IO/ADIOS/ADIOS1FilePosition.hpp" 29 #include "openPMD/IO/AbstractIOHandler.hpp" 30 #include "openPMD/IO/AbstractIOHandlerImpl.hpp" 31 #include "openPMD/auxiliary/DerefDynamicCast.hpp" 32 #include "openPMD/auxiliary/Filesystem.hpp" 33 #include "openPMD/auxiliary/JSON_internal.hpp" 34 #include "openPMD/auxiliary/Memory.hpp" 35 #include "openPMD/auxiliary/StringManip.hpp" 38 #include <adios_read.h> 43 #include <unordered_map> 44 #include <unordered_set> 49 template <
typename ChildClass>
91 void close(ADIOS_FILE *);
93 flush_attribute(int64_t group, std::string
const &name,
Attribute const &);
96 template <
typename... Args>
101 ADIOS_READ_METHOD m_readMethod;
102 std::unordered_map<Writable *, std::shared_ptr<std::string> > m_filePaths;
103 std::unordered_map<std::shared_ptr<std::string>, int64_t> m_groups;
104 std::unordered_map<std::shared_ptr<std::string>,
bool> m_existsOnDisk;
105 std::unordered_map<std::shared_ptr<std::string>, int64_t>
106 m_openWriteFileHandles;
107 std::unordered_map<std::shared_ptr<std::string>, ADIOS_FILE *>
108 m_openReadFileHandles;
111 ADIOS_SELECTION *selection;
112 std::shared_ptr<void> data;
114 std::unordered_map<ADIOS_FILE *, std::vector<ScheduledRead> >
116 std::unordered_map<int64_t, std::unordered_map<std::string, Attribute> >
119 std::string m_defaultTransform;
Extend nlohmann::json with tracing of which keys have been accessed by operator[]().
Definition: JSON_internal.hpp:67
void deleteDataset(Writable *, Parameter< Operation::DELETE_DATASET > const &) override
Delete an existing dataset.
void extendDataset(Writable *, Parameter< Operation::EXTEND_DATASET > const &) override
Increase the extent of an existing dataset.
Definition: IOTask.hpp:203
void deleteFile(Writable *, Parameter< Operation::DELETE_FILE > const &) override
Delete an existing file from physical storage.
Definition: CommonADIOS1IOHandler.hpp:50
void readAttribute(Writable *, Parameter< Operation::READ_ATT > &) override
Read the value of an existing attribute.
void createFile(Writable *, Parameter< Operation::CREATE_FILE > const &) override
Create a new file in physical storage, possibly overriding an existing file.
void deleteAttribute(Writable *, Parameter< Operation::DELETE_ATT > const &) override
Delete an existing attribute.
void deregister(Writable *, Parameter< Operation::DEREGISTER > const &) override
Notify the backend that the Writable has been / will be deallocated.
Definition: IOTask.hpp:673
Definition: IOTask.hpp:294
void writeAttribute(Writable *, Parameter< Operation::WRITE_ATT > const &) override
Create a single attribute and fill the value, possibly overwriting an existing attribute.
Definition: IOTask.hpp:407
void listAttributes(Writable *, Parameter< Operation::LIST_ATTS > &) override
List all attributes associated with an object.
void createPath(Writable *, Parameter< Operation::CREATE_PATH > const &) override
Create all necessary groups for a path, possibly recursively.
Definition: IOTask.hpp:148
Definition: CommonADIOS1IOHandler.hpp:109
void openDataset(Writable *, Parameter< Operation::OPEN_DATASET > &) override
Open an existing dataset and determine its datatype and extent.
void closeFile(Writable *, Parameter< Operation::CLOSE_FILE > const &) override
Close the file corresponding with the writable and release file handles.
void deletePath(Writable *, Parameter< Operation::DELETE_PATH > const &) override
Delete all objects within an existing path.
void listDatasets(Writable *, Parameter< Operation::LIST_DATASETS > &) override
List all datasets inside a group, non-recursively.
void availableChunks(Writable *, Parameter< Operation::AVAILABLE_CHUNKS > &) override
Report chunks that are available for loading from the dataset represented by this writable...
Definition: IOTask.hpp:175
Varidic datatype supporting at least all formats for attributes specified in the openPMD standard...
Definition: Attribute.hpp:54
Definition: IOTask.hpp:220
Definition: IOTask.hpp:522
void checkFile(Writable *, Parameter< Operation::CHECK_FILE > &) override
Check if the file specified by the parameter is already present on disk.
Public definitions of openPMD-api.
int64_t GetFileHandle(Writable *)
Call this function to get adios file id for a Writable.
Layer to mirror structure of logical data and persistent data in file.
Definition: Writable.hpp:64
void writeDataset(Writable *, Parameter< Operation::WRITE_DATASET > &) override
Write a chunk of data into an existing dataset.
Definition: IOTask.hpp:449
Definition: IOTask.hpp:591
void openPath(Writable *, Parameter< Operation::OPEN_PATH > const &) override
Open all contained groups in a path, possibly recursively.
void listPaths(Writable *, Parameter< Operation::LIST_PATHS > &) override
List all paths/sub-groups inside a group, non-recursively.
Definition: IOTask.hpp:128
Definition: IOTask.hpp:634
Definition: IOTask.hpp:471
void openFile(Writable *, Parameter< Operation::OPEN_FILE > &) override
Open an existing file assuming it conforms to openPMD.
Definition: IOTask.hpp:386
Definition: IOTask.hpp:239
Definition: AbstractIOHandlerImpl.hpp:35
Definition: IOTask.hpp:541
Definition: IOTask.hpp:333
Definition: IOTask.hpp:569
Definition: IOTask.hpp:367
Definition: IOTask.hpp:275
void createDataset(Writable *, Parameter< Operation::CREATE_DATASET > const &) override
Create a new dataset of given type, extent and storage properties.
Definition: IOTask.hpp:426
Definition: IOTask.hpp:313
void readDataset(Writable *, Parameter< Operation::READ_DATASET > &) override
Read a chunk of data from an existing dataset.