|
NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
|
An implementation of the MPI::Distrbutor abstraction that distribute lines of a text file via work packages. More...
#include <be_mpi_csvdistributor.h>
Inherits BiometricEvaluation::MPI::Distributor.
Public Member Functions | |
| CSVDistributor (const std::string &propertiesFileName, const std::string &delimiter="") | |
| Construct a CSVDistributor using named properties. More... | |
| ~CSVDistributor () | |
Public Member Functions inherited from BiometricEvaluation::MPI::Distributor | |
| Distributor (const std::string &propertiesFileName) | |
| Constructor with properties file name. More... | |
| virtual | ~Distributor () |
| void | start () |
| Start of MPI processing for the distributor. More... | |
Static Public Attributes | |
| static const std::string | CHECKPOINTLINECOUNT |
| The number of lines that were distributed, "Line Count". More... | |
| static const std::string | CHECKPOINTRANDOMSEED |
| The seed used to randomize the input CSV file lines, "Random Seed". More... | |
Static Public Attributes inherited from BiometricEvaluation::MPI::Distributor | |
| static const std::string | CHECKPOINTFILENAME |
| The name of the checkpoint properties file, "Distributor.chk". More... | |
| static const std::string | CHECKPOINTREASON |
| The reason string given for the checkpoint to be taken, "Reason". More... | |
| static const std::string | CHECKPOINTPID |
| The process ID of the checkpointing Distributor process, "PID". More... | |
Protected Member Functions | |
| void | createWorkPackage (MPI::WorkPackage &workPackage) |
| Create a work package for distribution. More... | |
| void | checkpointSave (const std::string &reason) |
| Create a checkpoint state. More... | |
| void | checkpointRestore () |
| Restore from a checkpoint state. More... | |
Protected Member Functions inherited from BiometricEvaluation::MPI::Distributor | |
| virtual void | createWorkPackage (MPI::WorkPackage &workPackage)=0 |
| Create a work package for distribution. More... | |
| virtual void | checkpointSave (const std::string &reason)=0 |
| Create a checkpoint state. More... | |
| virtual void | checkpointRestore ()=0 |
| Restore from a checkpoint state. More... | |
| std::shared_ptr< IO::Logsheet > | getLogsheet () const |
| Get access to the Logsheet object. More... | |
| std::shared_ptr< IO::PropertiesFile > | getCheckpointData () const |
| Get access to the checkpoint data object. More... | |
An implementation of the MPI::Distrbutor abstraction that distribute lines of a text file via work packages.
This class supports checkpointing when an early exit is requested, allowing all workers to complete their current work package. If the input data lines were randomized, the random number generator seed is saved as part of the checkpoint.
On checkpoint restart, if the input data lines are randomized, the seed in the checkpoint must match the current seed; else an exception is thrown. If the checkpoint contains a seed, and the input is not currently randomized, and exception is thrown. See MPI::CSVResources.
Definition at line 42 of file be_mpi_csvdistributor.h.
| BiometricEvaluation::MPI::CSVDistributor::CSVDistributor | ( | const std::string & | propertiesFileName, |
| const std::string & | delimiter = "" |
||
| ) |
Construct a CSVDistributor using named properties.
| [in] | propertiesFileName | The file containing the properties. |
| [in] | delimiter | Delimiter used to tokenize lines read from CSV. |
| BiometricEvaluation::MPI::CSVDistributor::~CSVDistributor | ( | ) |
|
protectedvirtual |
Create a work package for distribution.
Implementations of this class create a work package to encapsulate the specific data type that is to be distributed.
Implements BiometricEvaluation::MPI::Distributor.
|
protectedvirtual |
Create a checkpoint state.
Implementations of this class create a checkpoint state that captures enough information to allow the implementation to move the data sequence cursor to a point past data that has been previously distributed. The MPI Framework calls this method when a premature shutdown is requested.
| reason | A string giving the reason for the checkpoint to be saved. |
Implements BiometricEvaluation::MPI::Distributor.
|
protectedvirtual |
Restore from a checkpoint state.
Implementations of this class use a checkpoint state to move the data sequence cursor to a point past data that has been previously distributed. The MPI Framework calls this method prior to the start of distributing work packages.
Implements BiometricEvaluation::MPI::Distributor.
|
static |
The number of lines that were distributed, "Line Count".
Definition at line 49 of file be_mpi_csvdistributor.h.
|
static |
The seed used to randomize the input CSV file lines, "Random Seed".
Definition at line 55 of file be_mpi_csvdistributor.h.