Class to manage reading/writing restart data.
More...
#include <RestartManager.h>
Class to manage reading/writing restart data.
Definition at line 15 of file RestartManager.h.
◆ DataStorePtr
◆ RestartManager() [1/4]
| AMP::IO::RestartManager::RestartManager |
( |
| ) |
|
Create a writer for restart data.
◆ RestartManager() [2/4]
| AMP::IO::RestartManager::RestartManager |
( |
const std::string & |
filename | ) |
|
Create a reader for restart data.
◆ RestartManager() [3/4]
◆ RestartManager() [4/4]
◆ ~RestartManager()
| AMP::IO::RestartManager::~RestartManager |
( |
| ) |
|
◆ create()
◆ getComm()
| AMP_MPI AMP::IO::RestartManager::getComm |
( |
uint64_t |
hash | ) |
|
Get the communicator from the restart manager.
This function will get a registered/loaded object from the restart manager
- Parameters
-
◆ getData() [1/2]
template<class TYPE >
| std::shared_ptr< TYPE > AMP::IO::RestartManager::getData |
( |
const std::string & |
name | ) |
|
Get data from the restart manager.
This function will get a registered/loaded object from the restart manager
- Parameters
-
| [in] | name | Name to use for object |
◆ getData() [2/2]
template<class TYPE >
| std::shared_ptr< TYPE > AMP::IO::RestartManager::getData |
( |
uint64_t |
hash | ) |
|
Get data from the restart manager.
This function will get a registered/loaded object from the restart manager
- Parameters
-
◆ getSAMRAIData()
template<class TYPE >
| std::shared_ptr< TYPE > AMP::IO::RestartManager::getSAMRAIData |
( |
uint64_t |
hash | ) |
|
Get SAMRAI data from the restart manager.
This function will get a registered/loaded SAMRAI object from the restart manager
- Parameters
-
◆ hash2String()
| static std::string AMP::IO::RestartManager::hash2String |
( |
uint64_t |
| ) |
|
|
staticprivate |
◆ isRegistered()
| bool AMP::IO::RestartManager::isRegistered |
( |
uint64_t |
hash | ) |
|
Check if an object is registered.
This function will check if data with the give id has already been registered
- Parameters
-
◆ load()
| void AMP::IO::RestartManager::load |
( |
const std::string & |
filename | ) |
|
Read a restart file.
This will open a restart file for reading. Note: this will delete all internal data (see reset()) before opening the file. Note: the restart file will remain open (and locked) until reset() is called or this object goes out of scope.
- Parameters
-
| [in] | filename | Filename to use |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ readCommData()
| void AMP::IO::RestartManager::readCommData |
( |
const std::string & |
file | ) |
|
|
private |
◆ registerComm()
| uint64_t AMP::IO::RestartManager::registerComm |
( |
const AMP::AMP_MPI & |
comm | ) |
|
Register a communicator with the restart manager.
This function registers a communicator (based on ranks) with the restart manager
- Parameters
-
| [in] | comm | Communicator to register |
◆ registerData()
template<class TYPE >
| void AMP::IO::RestartManager::registerData |
( |
const TYPE & |
data, |
|
|
const std::string & |
name |
|
) |
| |
Register data with the restart manager.
This function registers an object with the restart manager
- Parameters
-
| [in] | name | Name to use for object |
| [in] | data | Data to register |
◆ registerObject()
template<class TYPE >
| uint64_t AMP::IO::RestartManager::registerObject |
( |
const TYPE & |
data | ) |
|
Register data with the restart manager.
This function registers an object with the restart manager
- Parameters
-
◆ registerSAMRAIData()
template<class TYPE >
| uint64_t AMP::IO::RestartManager::registerSAMRAIData |
( |
std::shared_ptr< const TYPE & > |
data | ) |
|
Register SAMRAI data with the restart manager.
This function registers a SAMRAI object with the restart manager
- Parameters
-
◆ reset()
| void AMP::IO::RestartManager::reset |
( |
| ) |
|
◆ write()
Write the data.
Write all of the data currently registered with the manager to the disk and close file
- Parameters
-
| [in] | filename | Filename to use |
| [in] | compress | Compression method to use |
◆ writeCommData()
| void AMP::IO::RestartManager::writeCommData |
( |
const std::string & |
file, |
|
|
Compression |
compress |
|
) |
| |
|
private |
◆ d_comms
| std::map<uint64_t, AMP_MPI> AMP::IO::RestartManager::d_comms |
|
private |
◆ d_data
| std::map<uint64_t, DataStorePtr> AMP::IO::RestartManager::d_data |
|
private |
◆ d_fid
| hid_t AMP::IO::RestartManager::d_fid |
|
private |
◆ d_names
| std::map<std::string, uint64_t> AMP::IO::RestartManager::d_names |
|
private |
The documentation for this class was generated from the following file: