-
Notifications
You must be signed in to change notification settings - Fork 2
VelocMemoryBackend
Checkpoint/restart backend for VeloC (Memory).
Header File: VelocBackend.hpp
class VeloCMemoryBackend
{
public:
VeloCMemoryBackend( ContextBase &ctx, MPI_Comm mpi_comm );
~VeloCMemoryBackend();
VeloCMemoryBackend( const VeloCMemoryBackend & ) = delete;
VeloCMemoryBackend( VeloCMemoryBackend && ) noexcept = default;
VeloCMemoryBackend &operator=( const VeloCMemoryBackend & ) = delete;
VeloCMemoryBackend &operator=( VeloCMemoryBackend && ) = default;
void checkpoint( const std::string &label, int version,
const std::vector< std::unique_ptr< Kokkos::ViewHolderBase > > &views );
bool restart_available( const std::string &label, int version );
int latest_version (const std::string &label) const noexcept;
void restart( const std::string &label, int version,
const std::vector< std::unique_ptr< Kokkos::ViewHolderBase > > &views );
void clear_checkpoints();
void register_hashes( const std::vector< std::unique_ptr< Kokkos::ViewHolderBase > > &views,
const std::vector< Detail::CrefImpl > &crefs );
void reset();
void register_alias( const std::string &original, const std::string &alias );
};
-
explicit VeloCMemoryBackend(ContextBase &ctx, MPI_Comm mpi_comm);
Construct a
VeloCMemoryBackend
with the supplied communicator and context. -
VeloCMemoryBackend(const VeloCMemoryBackend &) = delete;
Copy constructor is deleted.
-
VeloCMemoryBackend(VeloCMemoryBackend &&) noexcept = default;
Move constructor.
-
VeloCMemoryBackend &operator=(const VeloCMemoryBackend &) = delete;
Copy constructor is deleted.
-
VeloCMemoryBackend &operator=(VeloCMemoryBackend &&) = default;
Move constructor.
-
void register_hashes( const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views, const std::vector<Detail::CrefImpl> &crefs);
Register Views.
-
bool restart_available(const std::string &label, int version);
Check if an existing restart is available. Searches based on the supplied label.
version
determines the most recent version to search for. For example, settingversion
to 5 will search for any restart up to version 5. Settingversion
to 0 will search for the most recent restart. -
void restart(const std::string &label, int version, const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views);
Restart the specified Views from the checkpoint determined by the
label
andversion
. -
void checkpoint(const std::string &label, int version, const std::vector<std::unique_ptr<Kokkos::ViewHolderBase>> &views)
Create a checkpoint of the specified Views.
-
int latest_version(const std::string &label) const noexcept;
Get the latest version of the checkpoint with the name
label
. -
void register_alias( const std::string &original, const std::string &alias );
Register a new alias.
-
void reset();
Reset the context.
-
voic clear_checkpoints();
Clear existing checkpoints. Currently does nothing.