Loading...
Searching...
No Matches
Adios2StManImpl.h
Go to the documentation of this file.
//# Adios2StManImpl.h: Implementation class definition of the ADIOS2 Storage Manager
//
//# ICRAR - International Centre for Radio Astronomy Research
//# (c) UWA - The University of Western Australia, 2018
//# Copyright by UWA (in the framework of the ICRAR)
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusettes Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
#ifndef ADIOS2STMANIMPL_H
#define ADIOS2STMANIMPL_H
#include <adios2.h>
#include "Adios2StMan.h"
namespace casacore
{
class Adios2StManColumn;
class Adios2StMan::impl
{
public:
impl(Adios2StMan &parent,
void *mpiComm,
std::string engineType,
std::map<std::string, std::string> engineParams,
std::vector<std::map<std::string, std::string>> transportParams,
std::vector<std::map<std::string, std::string>> operatorParams,
std::string configFile);
~impl();
#ifdef HAVE_MPI
void checkMPI() const;
#endif
DataManager *clone() const;
String dataManagerType() const;
String dataManagerName() const;
void setDataManagerName(const String &aName);
void create64(rownr_t aNrRows);
rownr_t open64(rownr_t aRowNr, AipsIO &ios);
rownr_t resync64(rownr_t aRowNr);
Bool flush(AipsIO &ios, Bool doFsync);
DataManagerColumn *makeColumnCommon(const String &aName,
int aDataType,
const String &aDataTypeID);
DataManagerColumn *makeScalarColumn(const String &aName,
int aDataType,
const String &aDataTypeID);
DataManagerColumn *makeDirArrColumn(const String &aName,
int aDataType,
const String &aDataTypeID);
DataManagerColumn *makeIndArrColumn(const String &aName,
int aDataType,
const String &aDataTypeID);
void deleteManager();
void addRow64(rownr_t aNrRows);
static DataManager *makeObject(const String &aDataManType,
const Record &spec);
Record dataManagerSpec() const;
rownr_t getNrRows();
private:
Adios2StMan &parent;
String itsDataManName = "Adios2StMan";
rownr_t itsRows {0};
Block<Adios2StManColumn *> itsColumnPtrBlk;
std::shared_ptr<adios2::ADIOS> itsAdios;
std::shared_ptr<adios2::IO> itsAdiosIO;
std::shared_ptr<adios2::Engine> itsAdiosEngine;
#ifdef HAVE_MPI
// MPI communicator to be used by all instances of this storage manager
static MPI_Comm itsMpiComm;
#endif
// The ADIOS2 Engine type
std::string itsAdiosEngineType;
// Parameters for the ADIOS2 engine
adios2::Params itsAdiosEngineParams;
// Parameters for the ADIOS2 transports
std::vector<adios2::Params> itsAdiosTransportParamsVec;
// Parameters for the ADIOS2 operators (compressors)
std::vector<adios2::Params> itsAdiosOperatorParamsVec;
// The ADIOS2 XML configuration file
std::string itsAdiosConfigFile;
// The type of this storage manager
static constexpr const char *DATA_MANAGER_TYPE = "Adios2StMan";
// The name of the specification field for the ADIOS2 XML configuration file
static constexpr const char *SPEC_FIELD_XML_FILE = "XMLFILE";
// The name of the specification field for the ADIOS2 engine type
static constexpr const char *SPEC_FIELD_ENGINE_TYPE = "ENGINETYPE";
// The name of the specification field for the ADIOS2 engine parameters
static constexpr const char *SPEC_FIELD_ENGINE_PARAMS = "ENGINEPARAMS";
// The name of the specification field for the ADIOS2 transport parameters
static constexpr const char *SPEC_FIELD_TRANSPORT_PARAMS = "TRANSPORTPARAMS";
// The name of the specification field for the ADIOS2 operator parameters
static constexpr const char *SPEC_FIELD_OPERATOR_PARAMS = "OPERATORPARAMS";
void configureAdios();
uInt ncolumn() const { return parent.ncolumn(); }
String fileName() const { return parent.fileName(); }
};
} // namespace casacore
#endif // ADIOS2STMANIMPL_H
Adios2StMan.h
casacore::Adios2StManColumn
Definition Adios2StManColumn.h:41
casacore::Adios2StMan::impl
Definition Adios2StManImpl.h:42
casacore::Adios2StMan::impl::itsColumnPtrBlk
Block< Adios2StManColumn * > itsColumnPtrBlk
Definition Adios2StManImpl.h:89
casacore::Adios2StMan::impl::itsMpiComm
static MPI_Comm itsMpiComm
MPI communicator to be used by all instances of this storage manager.
Definition Adios2StManImpl.h:97
casacore::Adios2StMan::impl::itsAdiosIO
std::shared_ptr< adios2::IO > itsAdiosIO
Definition Adios2StManImpl.h:92
casacore::Adios2StMan::impl::~impl
~impl()
casacore::Adios2StMan::impl::makeObject
static DataManager * makeObject(const String &aDataManType, const Record &spec)
casacore::Adios2StMan::impl::itsDataManName
String itsDataManName
Definition Adios2StManImpl.h:87
casacore::Adios2StMan::impl::ncolumn
uInt ncolumn() const
Definition Adios2StManImpl.h:125
casacore::Adios2StMan::impl::impl
impl(Adios2StMan &parent, void *mpiComm, std::string engineType, std::map< std::string, std::string > engineParams, std::vector< std::map< std::string, std::string > > transportParams, std::vector< std::map< std::string, std::string > > operatorParams, std::string configFile)
casacore::Adios2StMan::impl::DATA_MANAGER_TYPE
static constexpr const char * DATA_MANAGER_TYPE
The type of this storage manager.
Definition Adios2StManImpl.h:112
casacore::Adios2StMan::impl::makeDirArrColumn
DataManagerColumn * makeDirArrColumn(const String &aName, int aDataType, const String &aDataTypeID)
casacore::Adios2StMan::impl::dataManagerType
String dataManagerType() const
casacore::Adios2StMan::impl::dataManagerName
String dataManagerName() const
casacore::Adios2StMan::impl::SPEC_FIELD_ENGINE_PARAMS
static constexpr const char * SPEC_FIELD_ENGINE_PARAMS
The name of the specification field for the ADIOS2 engine parameters.
Definition Adios2StManImpl.h:118
casacore::Adios2StMan::impl::SPEC_FIELD_XML_FILE
static constexpr const char * SPEC_FIELD_XML_FILE
The name of the specification field for the ADIOS2 XML configuration file.
Definition Adios2StManImpl.h:114
casacore::Adios2StMan::impl::parent
Adios2StMan & parent
Definition Adios2StManImpl.h:86
casacore::Adios2StMan::impl::deleteManager
void deleteManager()
casacore::Adios2StMan::impl::checkMPI
void checkMPI() const
casacore::Adios2StMan::impl::SPEC_FIELD_TRANSPORT_PARAMS
static constexpr const char * SPEC_FIELD_TRANSPORT_PARAMS
The name of the specification field for the ADIOS2 transport parameters.
Definition Adios2StManImpl.h:120
casacore::Adios2StMan::impl::makeIndArrColumn
DataManagerColumn * makeIndArrColumn(const String &aName, int aDataType, const String &aDataTypeID)
casacore::Adios2StMan::impl::itsAdiosOperatorParamsVec
std::vector< adios2::Params > itsAdiosOperatorParamsVec
Parameters for the ADIOS2 operators (compressors).
Definition Adios2StManImpl.h:107
casacore::Adios2StMan::impl::itsRows
rownr_t itsRows
Definition Adios2StManImpl.h:88
casacore::Adios2StMan::impl::flush
Bool flush(AipsIO &ios, Bool doFsync)
casacore::Adios2StMan::impl::addRow64
void addRow64(rownr_t aNrRows)
casacore::Adios2StMan::impl::itsAdiosEngine
std::shared_ptr< adios2::Engine > itsAdiosEngine
Definition Adios2StManImpl.h:93
casacore::Adios2StMan::impl::open64
rownr_t open64(rownr_t aRowNr, AipsIO &ios)
casacore::Adios2StMan::impl::SPEC_FIELD_OPERATOR_PARAMS
static constexpr const char * SPEC_FIELD_OPERATOR_PARAMS
The name of the specification field for the ADIOS2 operator parameters.
Definition Adios2StManImpl.h:122
casacore::Adios2StMan::impl::getNrRows
rownr_t getNrRows()
casacore::Adios2StMan::impl::clone
DataManager * clone() const
casacore::Adios2StMan::impl::fileName
String fileName() const
Definition Adios2StManImpl.h:126
casacore::Adios2StMan::impl::SPEC_FIELD_ENGINE_TYPE
static constexpr const char * SPEC_FIELD_ENGINE_TYPE
The name of the specification field for the ADIOS2 engine type.
Definition Adios2StManImpl.h:116
casacore::Adios2StMan::impl::dataManagerSpec
Record dataManagerSpec() const
casacore::Adios2StMan::impl::itsAdiosConfigFile
std::string itsAdiosConfigFile
The ADIOS2 XML configuration file.
Definition Adios2StManImpl.h:109
casacore::Adios2StMan::impl::makeScalarColumn
DataManagerColumn * makeScalarColumn(const String &aName, int aDataType, const String &aDataTypeID)
casacore::Adios2StMan::impl::itsAdiosEngineParams
adios2::Params itsAdiosEngineParams
Parameters for the ADIOS2 engine.
Definition Adios2StManImpl.h:103
casacore::Adios2StMan::impl::makeColumnCommon
DataManagerColumn * makeColumnCommon(const String &aName, int aDataType, const String &aDataTypeID)
casacore::Adios2StMan::impl::itsAdiosEngineType
std::string itsAdiosEngineType
The ADIOS2 Engine type.
Definition Adios2StManImpl.h:101
casacore::Adios2StMan::impl::resync64
rownr_t resync64(rownr_t aRowNr)
casacore::Adios2StMan::impl::create64
void create64(rownr_t aNrRows)
casacore::Adios2StMan::impl::configureAdios
void configureAdios()
casacore::Adios2StMan::impl::itsAdios
std::shared_ptr< adios2::ADIOS > itsAdios
Definition Adios2StManImpl.h:91
casacore::Adios2StMan::impl::setDataManagerName
void setDataManagerName(const String &aName)
casacore::Adios2StMan::impl::itsAdiosTransportParamsVec
std::vector< adios2::Params > itsAdiosTransportParamsVec
Parameters for the ADIOS2 transports.
Definition Adios2StManImpl.h:105
casacore::Adios2StMan::Adios2StMan
Adios2StMan(MPI_Comm mpiComm, std::string engineType={}, std::map< std::string, std::string > engineParams={}, std::vector< std::map< std::string, std::string > > transportParams={}, std::vector< std::map< std::string, std::string > > operatorParams={})
casacore::AipsIO
Definition AipsIO.h:167
casacore::Block
Definition Block.h:140
casacore::DataManagerColumn
Definition DataManagerColumn.h:149
casacore::DataManager::DataManager
DataManager()
Default constructor.
casacore::String
String: the storage and methods of handling collections of characters.
Definition String.h:223
casacore::Record
Record()
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::uInt
unsigned int uInt
Definition aipstype.h:49
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
casacore::rownr_t
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44