31 #include "splash/SerialDataCollector.hpp" 32 #include "splash/AttributeInfo.hpp" 33 #include "splash/core/DCAttribute.hpp" 34 #include "splash/core/DCDataSet.hpp" 35 #include "splash/core/DCGroup.hpp" 36 #include "splash/core/SDCHelper.hpp" 37 #include "splash/core/logging.hpp" 38 #include "splash/core/H5IdWrapper.hpp" 39 #include "splash/basetypes/basetypes.hpp" 48 void SerialDataCollector::setFileAccessParams(hid_t& fileAccProperties)
50 fileAccProperties = H5P_FILE_ACCESS_DEFAULT;
52 int metaCacheElements = 0;
53 size_t rawCacheElements = 0;
54 size_t rawCacheSize = 0;
58 H5Pget_cache(fileAccProperties, &metaCacheElements, &rawCacheElements, &rawCacheSize, &policy);
59 rawCacheSize = 256 * 1024 * 1024;
60 H5Pset_cache(fileAccProperties, metaCacheElements, rawCacheElements, rawCacheSize, policy);
62 log_msg(3,
"Raw Data Cache (File) = %llu KiB", (
long long unsigned) (rawCacheSize / 1024));
65 bool SerialDataCollector::fileExists(std::string filename)
68 return (stat(filename.c_str(), &fileInfo) == 0);
71 std::string SerialDataCollector::getFullFilename(
const Dimensions mpiPos, std::string baseFilename,
72 bool isFullNameAllowed)
const throw (DCException)
75 if (baseFilename.find(
".h5") == baseFilename.length() - 3)
77 if (isFullNameAllowed)
80 throw DCException(
"Full filename is not allowed!");
83 std::stringstream serial_filename;
84 serial_filename << baseFilename <<
"_" << mpiPos[0] <<
"_" << mpiPos[1] <<
85 "_" << mpiPos[2] <<
".h5";
87 return serial_filename.str();
90 std::string SerialDataCollector::getExceptionString(std::string func, std::string msg,
93 std::stringstream full_msg;
94 full_msg <<
"Exception for SerialDataCollector::" << func <<
98 full_msg <<
" (" << info <<
")";
100 return full_msg.str();
108 handles(maxFileHandles, HandleMgr::FNS_FULLNAME),
109 fileStatus(FST_CLOSED),
120 throw DCException(getExceptionString(
"SerialDataCollector",
121 "failed to initialize/open HDF5 library"));
123 #ifndef SPLASH_VERBOSE_HDF5 125 if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
126 throw DCException(getExceptionString(
"SerialDataCollector",
127 "failed to disable error printing"));
131 setFileAccessParams(fileAccProperties);
142 log_msg(1,
"opening serial data collector");
144 if (filename == NULL)
145 throw DCException(getExceptionString(
"open",
"filename must not be null"));
147 if (fileStatus != FST_CLOSED)
148 throw DCException(getExceptionString(
"open",
"this access is not permitted"));
150 switch (attr.fileAccType)
153 openRead(filename, attr);
156 openWrite(filename, attr);
159 openCreate(filename, attr);
161 case FAT_READ_MERGED:
169 if (fileStatus == FST_CLOSED)
172 log_msg(1,
"closing serial data collector");
174 if ((fileStatus == FST_CREATING || fileStatus == FST_WRITING) &&
181 group.open(handles.get(0), SDC_GROUP_HEADER);
182 ColTypeInt32 ctInt32;
183 DCAttribute::writeAttribute(SDC_ATTR_MAX_ID, ctInt32.getDataType(),
184 group.getHandle(), &maxID);
187 log_msg(0,
"Exception: %s", e.what());
193 mpiTopology.
set(1, 1, 1);
198 fileStatus = FST_CLOSED;
201 void SerialDataCollector::openCustomGroup(DCGroup& group,
206 if (fileStatus == FST_CLOSED || fileStatus == FST_CREATING)
207 throw DCException(getExceptionString(
"openCustomGroup",
"this access is not permitted"));
209 std::stringstream group_custom_name;
210 if (mpiPosition == NULL || fileStatus == FST_MERGING)
211 group_custom_name << SDC_GROUP_CUSTOM;
213 group_custom_name << SDC_GROUP_CUSTOM <<
"_" <<
214 (*mpiPosition)[0] <<
"_" << (*mpiPosition)[1] <<
"_" << (*mpiPosition)[2];
215 const std::string custom_string = group_custom_name.str();
218 uint32_t mpi_rank = 0;
219 if (fileStatus == FST_MERGING)
222 if (mpiPosition != NULL)
223 mpi_pos = *mpiPosition;
225 mpi_rank = mpi_pos[2] * mpiTopology[0] * mpiTopology[1] + mpi_pos[1] * mpiTopology[0] + mpi_pos[0];
228 group.open(handles.get(mpi_rank), custom_string.c_str());
231 hid_t SerialDataCollector::openGroup(DCGroup& group, int32_t
id,
const char* dataName,
237 if (dataName && strlen(dataName) == 0)
238 throw DCException(getExceptionString(
"openGroup",
"empty dataset name"));
240 if (fileStatus == FST_CLOSED || fileStatus == FST_CREATING)
241 throw DCException(getExceptionString(
"openGroup",
"this access is not permitted"));
243 std::string group_path, obj_name;
244 std::string dataNameInternal =
"";
246 dataNameInternal.assign(dataName);
247 DCDataSet::getFullDataPath(dataNameInternal, SDC_GROUP_DATA,
id, group_path, obj_name);
250 if ((fileStatus == FST_MERGING) && (mpiPosition != NULL))
252 mpi_pos.
set(*mpiPosition);
255 group.open(handles.get(mpi_pos), group_path);
260 if (H5Lexists(group.getHandle(), obj_name.c_str(), H5P_LINK_ACCESS_DEFAULT))
261 return H5Oopen(group.getHandle(), obj_name.c_str(), H5P_DEFAULT);
265 "dataset not found", obj_name.c_str()));
279 throw DCException(getExceptionString(
"readGlobalAttributeInfo",
"a parameter was null"));
281 DCGroup group_custom;
282 openCustomGroup(group_custom, mpiPosition);
284 return DCAttribute::readAttributeInfo(name, group_custom.getHandle());
294 if (name == NULL || data == NULL)
295 throw DCException(getExceptionString(
"readGlobalAttribute",
"a parameter was null"));
297 DCGroup group_custom;
298 openCustomGroup(group_custom, mpiPosition);
302 DCAttribute::readAttribute(name, group_custom.getHandle(), data);
305 throw DCException(getExceptionString(
"readGlobalAttribute",
"failed to open attribute", name));
325 if (name == NULL || data == NULL)
326 throw DCException(getExceptionString(
"writeGlobalAttribute",
"a parameter was null"));
328 if (fileStatus == FST_CLOSED || fileStatus == FST_READING || fileStatus == FST_MERGING)
329 throw DCException(getExceptionString(
"writeGlobalAttribute",
"this access is not permitted"));
331 if (ndims < 1u || ndims > DSP_DIM_MAX)
332 throw DCException(getExceptionString(
"writeGlobalAttribute",
"maximum dimension `ndims` is invalid"));
334 DCGroup group_custom;
335 group_custom.open(handles.get(0), SDC_GROUP_CUSTOM);
339 DCAttribute::writeAttribute(name, type.getDataType(), group_custom.getHandle(), ndims, dims, data);
342 std::cerr << e.what() << std::endl;
343 throw DCException(getExceptionString(
"writeGlobalAttribute",
"failed to write attribute", name));
348 const char *dataName,
349 const char *attrName,
354 if (attrName == NULL)
355 throw DCException(getExceptionString(
"readAttributeInfo",
"a parameter was null"));
357 if (strlen(attrName) == 0)
358 throw DCException(getExceptionString(
"readAttributeInfo",
"empty attribute name"));
361 H5ObjectId objId(openGroup(group,
id, dataName, mpiPosition));
365 return DCAttribute::readAttributeInfo(attrName, group.getHandle());
367 return DCAttribute::readAttributeInfo(attrName, objId);
371 const char *dataName,
372 const char *attrName,
378 if (attrName == NULL || data == NULL)
379 throw DCException(getExceptionString(
"readAttribute",
"a parameter was null"));
381 if (strlen(attrName) == 0)
382 throw DCException(getExceptionString(
"readAttribute",
"empty attribute name"));
385 H5ObjectId objId(openGroup(group,
id, dataName, mpiPosition));
389 DCAttribute::readAttribute(attrName, objId, data);
391 DCAttribute::readAttribute(attrName, group.getHandle(), data);
396 const char *dataName,
397 const char *attrName,
408 const char *dataName,
409 const char *attrName,
415 if (attrName == NULL || data == NULL)
416 throw DCException(getExceptionString(
"writeAttribute",
"a parameter was null"));
419 if (dataName && strlen(dataName) == 0)
420 throw DCException(getExceptionString(
"writeAttribute",
"empty dataset name"));
422 if (strlen(attrName) == 0)
423 throw DCException(getExceptionString(
"writeAttribute",
"empty attribute name"));
425 if (fileStatus == FST_CLOSED || fileStatus == FST_READING || fileStatus == FST_MERGING)
426 throw DCException(getExceptionString(
"writeAttribute",
"this access is not permitted"));
428 if (ndims < 1u || ndims > DSP_DIM_MAX)
429 throw DCException(getExceptionString(
"writeAttribute",
"maximum dimension `ndims` is invalid"));
434 std::string group_path, obj_name;
435 std::string dataNameInternal =
"";
437 dataNameInternal.assign(dataName);
438 DCDataSet::getFullDataPath(dataNameInternal, SDC_GROUP_DATA,
id, group_path, obj_name);
449 std::string pathAndName(group_path +
"/" + obj_name);
450 if(!DCGroup::exists(handles.get(
id), pathAndName))
451 group.create(handles.get(
id), pathAndName);
454 group.open(handles.get(0), group_path);
456 hid_t obj_id = H5Oopen(group.getHandle(), obj_name.c_str(), H5P_DEFAULT);
459 throw DCException(getExceptionString(
"writeAttribute",
460 "object not found", obj_name.c_str()));
465 DCAttribute::writeAttribute(attrName, type.getDataType(), obj_id, ndims, dims, data);
475 group.openCreate(handles.get(0), group_path);
476 DCAttribute::writeAttribute(attrName, type.getDataType(), group.getHandle(), ndims, dims, data);
497 if (fileStatus != FST_READING && fileStatus != FST_WRITING && fileStatus != FST_MERGING)
498 throw DCException(getExceptionString(
"read",
"this access is not permitted"));
501 readCompleteDataSet(handles.get(0), id, name, dstBuffer, dstOffset,
512 if (fileStatus != FST_READING && fileStatus != FST_WRITING && fileStatus != FST_MERGING)
513 throw DCException(getExceptionString(
"readMeta",
"this access is not permitted"));
516 return readDataSetMeta(handles.get(
id), id, name, dstBuffer, dstOffset,
521 const Selection select,
const char* name,
const void* data)
525 throw DCException(getExceptionString(
"write",
"parameter name is NULL"));
527 if (fileStatus == FST_CLOSED || fileStatus == FST_READING || fileStatus == FST_MERGING)
528 throw DCException(getExceptionString(
"write",
"this access is not permitted"));
530 if (ndims < 1 || ndims > DSP_DIM_MAX)
531 throw DCException(getExceptionString(
"write",
"maximum dimension is invalid"));
533 if (
id > this->maxID)
536 std::string group_path, dset_name;
537 DCDataSet::getFullDataPath(name, SDC_GROUP_DATA,
id, group_path, dset_name);
540 group.openCreate(handles.get(0), group_path);
545 writeDataSet(group.getHandle(), type, ndims, select, dset_name.c_str(), data);
553 size_t count,
const char* name,
const void* data)
556 append(
id, type, count, 0, 1, name, data);
560 size_t count,
size_t offset,
size_t stride,
const char* name,
const void* data)
564 throw DCException(getExceptionString(
"append",
"parameter name is NULL"));
566 if (fileStatus == FST_CLOSED || fileStatus == FST_READING || fileStatus == FST_MERGING)
567 throw DCException(getExceptionString(
"append",
"this access is not permitted"));
569 if (
id > this->maxID)
572 std::string group_path, dset_name;
573 DCDataSet::getFullDataPath(name, SDC_GROUP_DATA,
id, group_path, dset_name);
576 group.openCreate(handles.get(0), group_path);
581 appendDataSet(group.getHandle(), type, count, offset,
582 stride, dset_name.c_str(), data);
592 log_msg(1,
"removing group %d",
id);
594 if (fileStatus == FST_CLOSED || fileStatus == FST_READING || fileStatus == FST_MERGING)
595 throw DCException(getExceptionString(
"remove",
"this access is not permitted"));
597 std::stringstream group_id_name;
598 group_id_name << SDC_GROUP_DATA <<
"/" << id;
600 DCGroup::remove(handles.get(0), group_id_name.str());
604 size_t num_groups = 0;
607 int32_t *groups =
new int32_t[num_groups];
610 for (
size_t i = 0; i < num_groups; ++i)
611 if (groups[i] > maxID)
621 log_msg(1,
"removing dataset %s from group %d", name,
id);
623 if (fileStatus == FST_CLOSED || fileStatus == FST_READING || fileStatus == FST_MERGING)
624 throw DCException(getExceptionString(
"remove",
"this access is not permitted"));
627 throw DCException(getExceptionString(
"remove",
"parameter name is NULL"));
629 std::string group_path, dset_name;
630 DCDataSet::getFullDataPath(name, SDC_GROUP_DATA,
id, group_path, dset_name);
633 group.open(handles.get(0), group_path);
635 if (H5Ldelete(group.getHandle(), dset_name.c_str(), H5P_LINK_ACCESS_DEFAULT) < 0)
638 "failed to remove dataset", dset_name.c_str()));
648 if (srcName == NULL || dstName == NULL)
649 throw DCException(getExceptionString(
"createReference",
"a parameter was NULL"));
651 if (fileStatus == FST_CLOSED || fileStatus == FST_READING || fileStatus == FST_MERGING)
652 throw DCException(getExceptionString(
"createReference",
"this access is not permitted"));
654 if (srcID == dstID && srcName == dstName)
655 throw DCException(getExceptionString(
"createReference",
656 "a reference must not be identical to the referenced data", srcName));
659 std::string src_group_path, src_dset_name;
660 DCDataSet::getFullDataPath(srcName, SDC_GROUP_DATA, srcID, src_group_path, src_dset_name);
662 DCGroup src_group, dst_group;
663 src_group.open(handles.get(0), src_group_path);
666 std::string dst_group_path, dst_dset_name;
667 DCDataSet::getFullDataPath(dstName, SDC_GROUP_DATA, dstID, dst_group_path, dst_dset_name);
670 dst_group.openCreate(handles.get(0), dst_group_path);
675 DCDataSet src_dataset(src_dset_name.c_str());
676 src_dataset.open(src_group.getHandle());
678 DCDataSet dst_dataset(dst_dset_name.c_str());
680 dst_dataset.createReference(dst_group.getHandle(),
681 src_group.getHandle(), src_dataset);
701 if (srcName == NULL || dstName == NULL)
702 throw DCException(getExceptionString(
"createReference",
"a parameter was NULL"));
704 if (fileStatus == FST_CLOSED || fileStatus == FST_READING || fileStatus == FST_MERGING)
705 throw DCException(getExceptionString(
"createReference",
"this access is not permitted"));
707 if (srcID == dstID && srcName == dstName)
708 throw DCException(getExceptionString(
"createReference",
709 "a reference must not be identical to the referenced data", srcName));
712 std::string src_group_path, src_dset_name;
713 DCDataSet::getFullDataPath(srcName, SDC_GROUP_DATA, srcID, src_group_path, src_dset_name);
715 DCGroup src_group, dst_group;
716 src_group.open(handles.get(0), src_group_path);
719 std::string dst_group_path, dst_dset_name;
720 DCDataSet::getFullDataPath(dstName, SDC_GROUP_DATA, dstID, dst_group_path, dst_dset_name);
723 dst_group.openCreate(handles.get(0), dst_group_path);
728 DCDataSet src_dataset(src_dset_name.c_str());
729 src_dataset.open(src_group.getHandle());
731 DCDataSet dst_dataset(dst_dset_name.c_str());
733 dst_dataset.createReference(dst_group.getHandle(), src_group.getHandle(),
734 src_dataset, count, offset, stride);
752 mpiSize.
set(this->mpiTopology);
759 group.open(handles.get(0), SDC_GROUP_DATA);
761 hsize_t data_entries = 0;
762 if (H5Gget_num_objs(group.getHandle(), &data_entries) < 0)
764 throw DCException(getExceptionString(
"getEntryIDs",
765 "Failed to get entries in data group", SDC_GROUP_DATA));
769 *count = data_entries;
773 for (
size_t i = 0; i < data_entries; i++)
775 char *group_id_name = NULL;
776 ssize_t group_id_name_len = H5Gget_objname_by_idx(group.getHandle(), i, NULL, 0);
777 if (group_id_name_len < 0)
779 throw DCException(getExceptionString(
"getEntryIDs",
780 "Failed to get object name in group", group_id_name));
783 group_id_name =
new char[group_id_name_len + 1];
784 H5Gget_objname_by_idx(group.getHandle(), i, group_id_name, group_id_name_len + 1);
785 ids[i] = atoi(group_id_name);
786 delete[] group_id_name;
794 std::stringstream group_id_name;
795 group_id_name << SDC_GROUP_DATA <<
"/" << id;
799 group.open(handles.get(0), group_id_name.str());
801 DCGroup::VisitObjCBType param;
803 param.entries = entries;
805 DCGroup::getEntriesInternal(group.getHandle(), group_id_name.str(),
"", ¶m);
808 *count = param.count;
815 void SerialDataCollector::openCreate(
const char *filename,
819 this->fileStatus = FST_CREATING;
821 std::string full_filename = getFullFilename(attr.
mpiPosition, filename,
829 handles.open(full_filename, fileAccProperties, H5F_ACC_TRUNC);
835 SDCHelper::writeHeader(handles.get(0), attr.
mpiPosition, &(this->maxID),
836 &(this->enableCompression), &(this->mpiTopology),
false);
840 group.create(handles.get(0), SDC_GROUP_CUSTOM);
844 group.create(handles.get(0), SDC_GROUP_DATA);
848 void SerialDataCollector::openWrite(
const char* filename,
FileCreationAttr& attr)
851 fileStatus = FST_WRITING;
853 std::string full_filename = getFullFilename(attr.
mpiPosition, filename,
858 if (fileExists(full_filename))
861 SDCHelper::getReferenceData(full_filename.c_str(), &(this->maxID), &(this->mpiTopology));
863 handles.open(full_filename, fileAccProperties, H5F_ACC_RDWR);
866 openCreate(filename, attr);
870 void SerialDataCollector::openMerge(
const char* filename)
873 this->fileStatus = FST_MERGING;
876 std::string full_filename = getFullFilename(
Dimensions(0, 0, 0), filename,
true);
878 if (!fileExists(full_filename))
880 this->fileStatus = FST_CLOSED;
881 throw DCException(getExceptionString(
"openMerge",
"File not found.", full_filename.c_str()));
885 SDCHelper::getReferenceData(full_filename.c_str(), &(this->maxID), &(this->mpiTopology));
888 this->enableCompression =
false;
890 handles.setFileNameScheme(HandleMgr::FNS_MPI);
891 handles.open(mpiTopology, filename, fileAccProperties, H5F_ACC_RDONLY);
894 void SerialDataCollector::openRead(
const char* filename,
FileCreationAttr& attr)
897 this->fileStatus = FST_READING;
899 std::string full_filename = getFullFilename(attr.
mpiPosition, filename,
true);
901 if (!fileExists(full_filename))
903 this->fileStatus = FST_CLOSED;
904 throw DCException(getExceptionString(
"openRead",
"File not found", full_filename.c_str()));
908 SDCHelper::getReferenceData(full_filename.c_str(), &(this->maxID), &(this->mpiTopology));
910 handles.open(full_filename, fileAccProperties, H5F_ACC_RDONLY);
913 void SerialDataCollector::writeDataSet(hid_t group,
922 DCDataSet dataset(name);
925 dataset.create(datatype, group, select.count, ndims,
926 this->enableCompression,
false);
928 dataset.write(select,
Dimensions(0, 0, 0), data);
932 void SerialDataCollector::appendDataSet(hid_t group,
const CollectionType& datatype,
933 size_t count,
size_t offset,
size_t stride,
const char* name,
const void* data)
938 DCDataSet dataset(name);
940 if (!dataset.open(group))
944 dataset.create(datatype, group, data_size, 1, this->enableCompression,
true);
955 dataset.append(count, offset, stride, data);
960 size_t SerialDataCollector::getNDims(H5Handle h5File,
964 if (h5File < 0 || name == NULL)
965 throw DCException(getExceptionString(
"getNDims",
"invalid parameters"));
967 std::string group_path, dset_name;
968 DCDataSet::getFullDataPath(name, SDC_GROUP_DATA,
id, group_path, dset_name);
971 group.open(h5File, group_path);
977 DCDataSet dataset(dset_name.c_str());
978 dataset.open(group.getHandle());
980 ndims = dataset.getNDims();
991 void SerialDataCollector::readCompleteDataSet(H5Handle h5File,
1002 log_msg(2,
"readCompleteDataSet");
1004 std::string group_path, dset_name;
1005 DCDataSet::getFullDataPath(name, SDC_GROUP_DATA,
id, group_path, dset_name);
1008 group.open(h5File, group_path);
1010 DCDataSet dataset(dset_name.c_str());
1011 dataset.open(group.getHandle());
1012 Dimensions src_size(dataset.getSize() - srcOffset);
1013 dataset.read(dstBuffer, dstOffset, src_size, srcOffset, sizeRead, srcDims, dst);
1017 void SerialDataCollector::readDataSet(H5Handle h5File,
1031 std::string group_path, dset_name;
1032 DCDataSet::getFullDataPath(name, SDC_GROUP_DATA,
id, group_path, dset_name);
1035 group.open(h5File, group_path);
1037 DCDataSet dataset(dset_name.c_str());
1038 dataset.open(group.getHandle());
1039 dataset.read(dstBuffer, dstOffset, srcSize, srcOffset, sizeRead, srcDims, dst);
1043 CollectionType* SerialDataCollector::readDataSetMeta(H5Handle h5File,
1053 log_msg(2,
"readDataSetMeta");
1055 std::string group_path, dset_name;
1056 DCDataSet::getFullDataPath(name, SDC_GROUP_DATA,
id, group_path, dset_name);
1059 group.open(h5File, group_path);
1061 DCDataSet dataset(dset_name.c_str());
1062 dataset.open(group.getHandle());
1066 std::vector<DataCollector::DCEntry> entries(entrySize);
1071 int32_t entry_id = -1;
1072 for(
size_t i = 0; i < entrySize; ++i)
1073 if(std::string(name) == entries[i].name)
1075 entry_id = int32_t(i);
1080 throw DCException(getExceptionString(
"readDataSetMeta",
"Entry not found by name"));
1082 Dimensions src_size(dataset.getSize() - srcOffset);
1083 dataset.read(dstBuffer, dstOffset, src_size, srcOffset, sizeRead, srcDims, NULL);
1086 log_msg(3,
"Entry '%s' (%d) is of type: %s",
1087 entries[entry_id].name.c_str(),
1089 entries[entry_id].colType->toString().c_str());
1091 return entries[entry_id].colType;
1094 void SerialDataCollector::readSizeInternal(H5Handle h5File,
1100 log_msg(2,
"readSizeInternal");
1102 std::string group_path, dset_name;
1103 DCDataSet::getFullDataPath(name, SDC_GROUP_DATA,
id, group_path, dset_name);
1106 group.open(h5File, group_path);
1110 DCDataSet dataset(dset_name.c_str());
1111 dataset.open(group.getHandle());
1112 sizeRead.
set(dataset.getSize());
1120 hid_t SerialDataCollector::openDatasetHandle(int32_t
id,
1121 const char *dsetName,
1125 std::string group_path, dset_name;
1126 DCDataSet::getFullDataPath(dsetName, SDC_GROUP_DATA,
id, group_path, dset_name);
1129 if ((fileStatus == FST_MERGING) && (mpiPosition != NULL))
1131 mpi_pos.
set(*mpiPosition);
1135 group.open(handles.get(mpi_pos), group_path);
1137 hid_t dataset_handle = -1;
1138 if (H5Lexists(group.getHandle(), dset_name.c_str(), H5P_LINK_ACCESS_DEFAULT))
1140 dataset_handle = H5Dopen(group.getHandle(), dset_name.c_str(), H5P_DEFAULT);
1143 throw DCException(getExceptionString(
"openDatasetInternal",
1144 "dataset not found", dset_name.c_str()));
1147 return dataset_handle;
1150 void SerialDataCollector::closeDatasetHandle(hid_t handle)
CollectionType * readMeta(int32_t id, const char *name, const Dimensions dstBuffer, const Dimensions dstOffset, Dimensions &sizeRead)
void getEntriesForID(int32_t id, DCEntry *entries, size_t *count)
virtual ~SerialDataCollector()
void append(int32_t id, const CollectionType &type, size_t count, const char *name, const void *data)
void getEntryIDs(int32_t *ids, size_t *count)
void open(const char *filename, FileCreationAttr &attr)
void writeGlobalAttribute(const CollectionType &type, const char *name, const void *data)
void set(hsize_t x, hsize_t y, hsize_t z)
void getMPISize(Dimensions &mpiSize)
void readAttribute(int32_t id, const char *dataName, const char *attrName, void *data, Dimensions *mpiPosition=NULL)
size_t getScalarSize() const
void write(int32_t id, const CollectionType &type, uint32_t ndims, const Selection select, const char *name, const void *data)
void readGlobalAttribute(const char *name, void *data, Dimensions *mpiPosition=NULL)
void writeAttribute(int32_t id, const CollectionType &type, const char *dataName, const char *attrName, const void *data)
EXTERN void parseEnvVars(void)
EXTERN void log_msg(int level, const char *fmt,...)
SerialDataCollector(uint32_t maxFileHandles)
void read(int32_t id, const char *name, Dimensions &sizeRead, void *data)
void createReference(int32_t srcID, const char *srcName, int32_t dstID, const char *dstName)
AttributeInfo readGlobalAttributeInfo(int32_t id, const char *name, Dimensions *mpiPosition=NULL)
AttributeInfo readAttributeInfo(int32_t id, const char *dataName, const char *attrName, Dimensions *mpiPosition=NULL)