NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
BiometricEvaluation::MPI::Resources Class Reference

A class to represent a set of resources needed by an MPI program. More...

#include <be_mpi_resources.h>

Inherited by BiometricEvaluation::MPI::CSVResources, and BiometricEvaluation::MPI::RecordStoreResources.

Public Member Functions

 Resources (const std::string &propertiesFileName)
 Constructor taking the name of the properties file describing the resources. More...
 
std::string getPropertiesFileName () const
 Obtain the name of the file used to construct this object. More...
 
std::string getLogsheetURL () const
 Obtain the Uniform Resource Locator for the IO:Logsheet object. More...
 
std::string getCheckpointPath () const
 Obtain the Checkpoint Path name. More...
 
 ~Resources ()
 
int getRank () const
 
int getNumTasks () const
 
int getWorkersPerNode () const
 

Static Public Member Functions

static std::vector< std::string > getRequiredProperties ()
 Obtain the list of required properties. More...
 
static std::vector< std::string > getOptionalProperties ()
 Obtain the list of optional properties. More...
 

Static Public Attributes

static const std::string WORKERSPERNODEPROPERTY
 The property string "Workers Per Node"; required. More...
 
static const std::string NUMCPUS
 The "Workers Per Node" setting "NUMCPUS". More...
 
static const std::string NUMCORES
 The "Workers Per Node" setting "NUMCORES". More...
 
static const std::string NUMSOCKETS
 The "Workers Per Node" setting "NUMSOCKETS". More...
 
static const std::string LOGSHEETURLPROPERTY
 The property string "Logsheet URL"; optional. More...
 
static const std::string CHECKPOINTPATHPROPERTY
 The property string "Checkpoint Path"; required when checkpointing is enabled, optional otherwise. More...
 

Detailed Description

A class to represent a set of resources needed by an MPI program.

The resources are based on a properties file as well as some dynamic information, such as MPI rank and process ID.

Definition at line 25 of file be_mpi_resources.h.

Constructor & Destructor Documentation

◆ Resources()

BiometricEvaluation::MPI::Resources::Resources ( const std::string &  propertiesFileName)

Constructor taking the name of the properties file describing the resources.

Parameters
[in]propertiesFileNameThe name of the file containing the Properties.
Exceptions
Error::FileErrorThe resources file could not be read.
Error::ObjectDoesNotExistA required property does not exist.
Error::ExceptionSome other error occurred.

◆ ~Resources()

BiometricEvaluation::MPI::Resources::~Resources ( )

Member Function Documentation

◆ getRequiredProperties()

static std::vector< std::string > BiometricEvaluation::MPI::Resources::getRequiredProperties ( )
static

Obtain the list of required properties.

Returns
A set of required property strings.

◆ getOptionalProperties()

static std::vector< std::string > BiometricEvaluation::MPI::Resources::getOptionalProperties ( )
static

Obtain the list of optional properties.

Returns
A set of optional property strings.

◆ getPropertiesFileName()

std::string BiometricEvaluation::MPI::Resources::getPropertiesFileName ( ) const

Obtain the name of the file used to construct this object.

Returns
The name of the properties file.

◆ getLogsheetURL()

std::string BiometricEvaluation::MPI::Resources::getLogsheetURL ( ) const

Obtain the Uniform Resource Locator for the IO:Logsheet object.

This string my be empty, indicating that there is no Logsheet URL in the Properties file.

Returns
The Logsheet URL.

◆ getCheckpointPath()

std::string BiometricEvaluation::MPI::Resources::getCheckpointPath ( ) const

Obtain the Checkpoint Path name.

This string my be empty, indicating that there is no checkpoint path in the Properties file.

Returns
The Checkpoint Path.

◆ getRank()

int BiometricEvaluation::MPI::Resources::getRank ( ) const

◆ getNumTasks()

int BiometricEvaluation::MPI::Resources::getNumTasks ( ) const

◆ getWorkersPerNode()

int BiometricEvaluation::MPI::Resources::getWorkersPerNode ( ) const

Member Data Documentation

◆ WORKERSPERNODEPROPERTY

const std::string BiometricEvaluation::MPI::Resources::WORKERSPERNODEPROPERTY
static

The property string "Workers Per Node"; required.

This value shall be either an integer or one of the strings "NUMCPUS", "NUMCORES", "NUMSOCKETS".

Definition at line 34 of file be_mpi_resources.h.

◆ NUMCPUS

const std::string BiometricEvaluation::MPI::Resources::NUMCPUS
static

The "Workers Per Node" setting "NUMCPUS".

This setting indicates the MPI Framework is to create one worker for each logical CPU.

Definition at line 43 of file be_mpi_resources.h.

◆ NUMCORES

const std::string BiometricEvaluation::MPI::Resources::NUMCORES
static

The "Workers Per Node" setting "NUMCORES".

This setting indicates the MPI Framework is to create one worker for each physical CPU core.

Definition at line 52 of file be_mpi_resources.h.

◆ NUMSOCKETS

const std::string BiometricEvaluation::MPI::Resources::NUMSOCKETS
static

The "Workers Per Node" setting "NUMSOCKETS".

This setting indicates the MPI Framework is to create one worker for each physical CPU socket.

Definition at line 61 of file be_mpi_resources.h.

◆ LOGSHEETURLPROPERTY

const std::string BiometricEvaluation::MPI::Resources::LOGSHEETURLPROPERTY
static

The property string "Logsheet URL"; optional.

Definition at line 67 of file be_mpi_resources.h.

◆ CHECKPOINTPATHPROPERTY

const std::string BiometricEvaluation::MPI::Resources::CHECKPOINTPATHPROPERTY
static

The property string "Checkpoint Path"; required when checkpointing is enabled, optional otherwise.

Definition at line 74 of file be_mpi_resources.h.


The documentation for this class was generated from the following file: