preprocessor now filters debug output

This commit is contained in:
2025-05-28 15:27:00 +02:00
parent e2167fb75b
commit f510d0a39a
39 changed files with 375 additions and 14 deletions
+6
View File
@@ -542,12 +542,16 @@ void Hdf5Writer::writeRNG(const std::string& data, std::string path_base) {
for(int i = 0; i < MpiCommunication::mpiSize(); ++i) {
std::string path = path_base + std::to_string(i);
#ifdef debug_level3
DEBUG_LEVEL_3(path);
#endif
hid_t dataset_string = H5Dcreate2(file, (path + "/string").c_str(), dtype, filespace, lcpl, H5P_DEFAULT, H5P_DEFAULT);
// this sadly seems to be the option that takes the least amount of effort.
// H5Lexits() would be an option but (!) each group would need to be checked for existance first, which sucks
if(dataset_string < 0) {
#ifdef debug_level3
DEBUG_LEVEL_3("Dataset could not be created");
#endif
dataset_string = H5Dopen2(file, (path + "/string").c_str(), H5P_DEFAULT);
if(dataset_string < 0) {
ERROR("Dataset for string can neither be created nor opened");
@@ -556,7 +560,9 @@ void Hdf5Writer::writeRNG(const std::string& data, std::string path_base) {
hid_t dataset_length = H5Dcreate2(file, (path + "/length").c_str(), H5T_NATIVE_HSIZE, filespace, lcpl, H5P_DEFAULT, H5P_DEFAULT);
if(dataset_length < 0) {
#ifdef debug_level3
DEBUG_LEVEL_3("Dataset could not be created");
#endif
dataset_length = H5Dopen2(file, (path + "/length").c_str(), H5P_DEFAULT);
if(dataset_length < 0) {
ERROR("Dataset for length can neither be created nor opened");