Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Apr 4, 2022
1 parent 46747db commit 83ef5f4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/openPMD/backend/Writable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ OPENPMD_private
*/
std::shared_ptr<AbstractFilePosition> abstractFilePosition;
std::shared_ptr<AbstractIOHandler> IOHandler;
internal::AttributableData *attributable;
Writable *parent;
bool dirty;
internal::AttributableData *attributable = nullptr;
Writable *parent = nullptr;
bool dirty = false;
/**
* If parent is not null, then this is a vector of keys such that:
* &(*parent)[key_1]...[key_n] == this
Expand All @@ -146,6 +146,6 @@ OPENPMD_private
* Writable and its meaning within the current dataset.
*
*/
bool written;
bool written = false;
};
} // namespace openPMD
24 changes: 21 additions & 3 deletions src/Iteration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,15 @@ void Iteration::flushFileBased(
s.openIteration(i, *this);
}

if (flushParams.flushLevel != FlushLevel::CreateOrOpenFiles)
switch (flushParams.flushLevel)
{
case FlushLevel::CreateOrOpenFiles:
break;
case FlushLevel::SkeletonOnly:
case FlushLevel::InternalFlush:
case FlushLevel::UserFlush:
flush(flushParams);
break;
}
}

Expand All @@ -254,9 +260,15 @@ void Iteration::flushGroupBased(
IOHandler()->enqueue(IOTask(this, pCreate));
}

if (flushParams.flushLevel != FlushLevel::CreateOrOpenFiles)
switch (flushParams.flushLevel)
{
case FlushLevel::CreateOrOpenFiles:
break;
case FlushLevel::SkeletonOnly:
case FlushLevel::InternalFlush:
case FlushLevel::UserFlush:
flush(flushParams);
break;
}
}

Expand All @@ -272,9 +284,15 @@ void Iteration::flushVariableBased(
this->setAttribute("snapshot", i);
}

if (flushParams.flushLevel != FlushLevel::CreateOrOpenFiles)
switch (flushParams.flushLevel)
{
case FlushLevel::CreateOrOpenFiles:
break;
case FlushLevel::SkeletonOnly:
case FlushLevel::InternalFlush:
case FlushLevel::UserFlush:
flush(flushParams);
break;
}
}

Expand Down
8 changes: 7 additions & 1 deletion src/backend/Attributable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,15 @@ void Attributable::seriesFlush(internal::FlushParams flushParams)

void Attributable::flushAttributes(internal::FlushParams const &flushParams)
{
if (flushParams.flushLevel == FlushLevel::SkeletonOnly)
switch (flushParams.flushLevel)
{
case FlushLevel::SkeletonOnly:
case FlushLevel::CreateOrOpenFiles:
return;
case FlushLevel::InternalFlush:
case FlushLevel::UserFlush:
// pass
break;
}
if (dirty())
{
Expand Down

0 comments on commit 83ef5f4

Please sign in to comment.