Unverified Commit 67918fa4 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon Committed by GitHub
Browse files

Merge pull request #371 from williamfgc/docs

Update doxygen and readme docs
parents e0b797bb b50a6bd2
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
[![Travis CI](https://travis-ci.org/ornladios/ADIOS2.svg)](https://travis-ci.org/ornladios/ADIOS2) [![Travis CI](https://travis-ci.org/ornladios/ADIOS2.svg)](https://travis-ci.org/ornladios/ADIOS2)
[![AppVeyor CI](https://ci.appveyor.com/api/projects/status/0s2a3qp57hgbvlhj?svg=true)](https://ci.appveyor.com/project/ornladios/adios2) [![AppVeyor CI](https://ci.appveyor.com/api/projects/status/0s2a3qp57hgbvlhj?svg=true)](https://ci.appveyor.com/project/ornladios/adios2)
# Adaptable Input / Output System (ADIOS) v2.0 # Adaptable Input / Output System (ADIOS) v2.1.0
This is v2.0 of the ADIOS I/O system, developed as part of the This is v2.1.0 of the ADIOS I/O system, developed as part of the
U.S. Department of Energy Exascale Computing Program. U.S. Department of Energy Exascale Computing Program.
## License ## License
...@@ -19,8 +19,10 @@ Copyright.txt for more details. ...@@ -19,8 +19,10 @@ Copyright.txt for more details.
* cmake - Project specific CMake modules * cmake - Project specific CMake modules
* examples - ADIOS2 Examples * examples - ADIOS2 Examples
* scripts - Project maintenance and development scripts * scripts - Project maintenance and development scripts
* source - Main ADIOS2 source * source - Main ADIOS2 source
* bindings - Additional language bindings (currently only Python is available) * adios2 - source directory for the ADIOS2 library to be installed under install-dir/lib/libadios2.
* utils - source directory for the binary utilities, to be installed under install-dir/bin
* bindings - Additional language bindings (C, Fortran and Python)
* testing - Tests * testing - Tests
## Documentation ## Documentation
...@@ -56,13 +58,13 @@ $ mkdir build ...@@ -56,13 +58,13 @@ $ mkdir build
```bash ```bash
$ cd build $ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/adios2/2.0.0/gnu/openmpi ../source $ cmake -DCMAKE_INSTALL_PREFIX=/opt/adios2/2.1.0/gnu/openmpi ../source
-- The C compiler identification is GNU 6.3.1 -- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1 -- The CXX compiler identification is GNU 6.3.1
... ...
ADIOS2 build configuration: ADIOS2 build configuration:
ADIOS Version: 2.0.0 ADIOS Version: 2.1.0
C++ Compiler : GNU 6.3.1 C++ Compiler : GNU 6.3.1
/usr/bin/c++ /usr/bin/c++
...@@ -101,9 +103,8 @@ The following options can be specified with CMake's `-DVAR=VALUE` syntax to cont ...@@ -101,9 +103,8 @@ The following options can be specified with CMake's `-DVAR=VALUE` syntax to cont
| `ADIOS2_USE_HDF5` | **`AUTO`**/``ON``/``OFF`` | Enable the [HDF5](https://www.hdfgroup.org) engine. | | `ADIOS2_USE_HDF5` | **`AUTO`**/``ON``/``OFF`` | Enable the [HDF5](https://www.hdfgroup.org) engine. |
| `ADIOS2_USE_ADIOS1` | **`AUTO`**/``ON``/``OFF`` | Enable the [ADIOS 1.x](https://www.olcf.ornl.gov/center-projects/adios/) engine. | | `ADIOS2_USE_ADIOS1` | **`AUTO`**/``ON``/``OFF`` | Enable the [ADIOS 1.x](https://www.olcf.ornl.gov/center-projects/adios/) engine. |
| `ADIOS2_USE_Python` | **`AUTO`**/``ON``/``OFF`` | Enable the Python >= 2.7 bindings. | | `ADIOS2_USE_Python` | **`AUTO`**/``ON``/``OFF`` | Enable the Python >= 2.7 bindings. |
| `ADIOS2_USE_C` | **`AUTO`**/``ON``/``OFF`` | Enable the C bindings library libadios2_c.so or libadios2_c.a |
Note: The `ADIOS2_USE_HDF5` and `ADIOS2_USE_ADIOS1` options require the use of a matching serial or parallel version depending on whether `ADIOS2_USE_MPI` is enabled. SImilary, enabling MPI and Python bindings requires the presence of `mpi4py`. Note: The `ADIOS2_USE_HDF5` and `ADIOS2_USE_ADIOS1` options require the use of a matching serial or parallel version depending on whether `ADIOS2_USE_MPI` is enabled. Similary, enabling MPI and Python bindings requires the presence of `mpi4py`.
In addition to the `ADIOS2_USE_Feature` options, the following options are also available to control how the library get's built: In addition to the `ADIOS2_USE_Feature` options, the following options are also available to control how the library get's built:
...@@ -168,15 +169,15 @@ $ make install ...@@ -168,15 +169,15 @@ $ make install
... ...
Install the project... Install the project...
-- Install configuration: "Debug" -- Install configuration: "Debug"
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/include/adios2/ADIOSConfig.h -- Installing: /opt/adios2/2.1.0/gnu/openmpi/include/adios2/ADIOSConfig.h
... ...
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/bin/adios2-config -- Installing: /opt/adios2/2.1.0/gnu/openmpi/bin/adios2-config
... ...
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/include/adios2.h -- Installing: /opt/adios2/2.1.0/gnu/openmpi/include/adios2.h
... ...
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/lib/libadios2.so.2.0.0 -- Installing: /opt/adios2/2.1.0/gnu/openmpi/lib/libadios2.so.2.0.0
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/lib/libadios2.so.2 -- Installing: /opt/adios2/2.1.0/gnu/openmpi/lib/libadios2.so.2
-- Installing: /opt/adios2/2.0.0/gnu/openmpi/lib/libadios2.so -- Installing: /opt/adios2/2.1.0/gnu/openmpi/lib/libadios2.so
... ...
$ $
``` ```
This diff is collapsed.
# Documentation for the Adaptable Input / Output System (ADIOS) v2.0 # Documentation for the Adaptable Input / Output System (ADIOS) v2.1.0
# Generate Doxygen API # Generate Doxygen API
......
...@@ -38,18 +38,24 @@ public: ...@@ -38,18 +38,24 @@ public:
/** /**
* @brief Constructor for MPI applications WITH a XML config file * @brief Constructor for MPI applications WITH a XML config file
* @param configFile XML format (maybe support different formats in the * @param configFile XML format (maybe support different formats in the
* future?) * future (json)?)
* @param mpiComm MPI communicator from application * @param mpiComm MPI communicator from application, make sure is valid
* @param debugMode true: extra exception checks (recommended) * through the scope of adios2 calls
* @param debugMode true (default): extra exception checks (recommended),
* false: optional feature to turn off checks on user input data,
* recommended in stable flows
*/ */
ADIOS(const std::string configFile, MPI_Comm mpiComm, ADIOS(const std::string configFile, MPI_Comm mpiComm,
const bool debugMode = true, const std::string hostLanguage = "C++"); const bool debugMode = true, const std::string hostLanguage = "C++");
/** /**
* @brief Constructor for non-MPI applications WITH a XML config file * @brief Constructor for non-MPI applications WITH a XML config file (it
* must end with extension .xml)
* @param configFile XML format (maybe support different formats in the * @param configFile XML format (maybe support different formats in the
* future?) * future (json)?)
* @param debugMode true: extra exception checks (recommended) * @param debugMode true (default): extra exception checks (recommended),
* false: optional feature to turn off checks on user input data,
* recommended in stable flows
*/ */
ADIOS(const std::string configFile, const bool debugMode = true, ADIOS(const std::string configFile, const bool debugMode = true,
const std::string hostLanguage = "C++"); const std::string hostLanguage = "C++");
...@@ -57,14 +63,18 @@ public: ...@@ -57,14 +63,18 @@ public:
/** /**
* @brief Constructor for MPI apps WITHOUT a XML config file * @brief Constructor for MPI apps WITHOUT a XML config file
* @param mpiComm MPI communicator from application * @param mpiComm MPI communicator from application
* @param debugMode true: extra exception checks (recommended) * @param debugMode true (default): extra exception checks (recommended),
* false: optional feature to turn off checks on user input data,
* recommended in stable flows
*/ */
ADIOS(MPI_Comm mpiComm, const bool debugMode = true, ADIOS(MPI_Comm mpiComm, const bool debugMode = true,
const std::string hostLanguage = "C++"); const std::string hostLanguage = "C++");
/** /**
* @brief ADIOS no-MPI default empty constructor * @brief ADIOS no-MPI default empty constructor
* @param debugMode true: extra exception checks (recommended) * @param debugMode true (default): extra exception checks (recommended),
* false: optional feature to turn off checks on user input data,
* recommended in stable flows
*/ */
ADIOS(const bool debugMode = true, const std::string hostLanguage = "C++"); ADIOS(const bool debugMode = true, const std::string hostLanguage = "C++");
...@@ -80,8 +90,9 @@ public: ...@@ -80,8 +90,9 @@ public:
/** /**
* Declares a new IO class object and returns a reference to that object. * Declares a new IO class object and returns a reference to that object.
* @param ioName must be unique * @param ioName must be unique
* @return reference to newly created IO object inside ADIOS, if IO is * @return reference to newly created IO object inside current ADIOS object
* declared it throws an exception * @exception std::invalid_argument if IO with unique name is already
* declared, in debug mode only
*/ */
IO &DeclareIO(const std::string name); IO &DeclareIO(const std::string name);
...@@ -90,7 +101,9 @@ public: ...@@ -90,7 +101,9 @@ public:
* Follow the C++11 STL containers at function. * Follow the C++11 STL containers at function.
* @param name of IO to look for * @param name of IO to look for
* @return if IO exists returns a reference to existing IO object inside * @return if IO exists returns a reference to existing IO object inside
* ADIOS, otherwise throws an exception * ADIOS
* @exception std::invalid_argument if IO was not created with DeclareIO, in
* debug mode only
*/ */
IO &AtIO(const std::string name); IO &AtIO(const std::string name);
...@@ -103,6 +116,8 @@ public: ...@@ -103,6 +116,8 @@ public:
* @param type from derived class * @param type from derived class
* @param parameters optional parameters * @param parameters optional parameters
* @return reference to Operator object * @return reference to Operator object
* @exception std::invalid_argument if Operator with unique name is already
* defined, in debug mode only
*/ */
Operator &DefineOperator(const std::string name, const std::string type, Operator &DefineOperator(const std::string name, const std::string type,
const Params &parameters = Params()); const Params &parameters = Params());
...@@ -111,8 +126,10 @@ public: ...@@ -111,8 +126,10 @@ public:
* Signature for passing Callback functions as operators * Signature for passing Callback functions as operators
* @param name unique operator name * @param name unique operator name
* @param function callable function * @param function callable function
* @param parameters * @param parameters optional key-value pairs parameters
* @return reference to Operator object * @return reference to Operator object
* @exception std::invalid_argument if Operator with unique name is already
* defined, in debug mode only
*/ */
template <class R, class... Args> template <class R, class... Args>
Operator &DefineOperator(const std::string name, Operator &DefineOperator(const std::string name,
......
...@@ -21,8 +21,8 @@ class Attribute : public AttributeBase ...@@ -21,8 +21,8 @@ class Attribute : public AttributeBase
{ {
public: public:
std::vector<T> m_DataArray; std::vector<T> m_DataArray; ///< holds data for array attributes
T m_DataSingleValue; T m_DataSingleValue; ///< holds data for single value attributes
/** /**
* Data array constructor * Data array constructor
......
...@@ -46,13 +46,14 @@ public: ...@@ -46,13 +46,14 @@ public:
public: public:
/** /**
* Unique Base class constructor * Unique Base class constructor
* @param engineType derived class identifier
* @param io object that generates this Engine * @param io object that generates this Engine
* @param name unique engine name within IO class object * @param name unique engine name within IO class object
* @param openMode open mode from ADIOSTypes.h OpenMode * @param mode open mode from ADIOSTypes.h Mode
* @param mpiComm new communicator passed at Open or from ADIOS class * @param mpiComm new communicator passed at Open or from ADIOS class
*/ */
Engine(const std::string engineType, IO &io, const std::string &name, Engine(const std::string engineType, IO &io, const std::string &name,
const Mode openMode, MPI_Comm mpiComm); const Mode mode, MPI_Comm mpiComm);
virtual ~Engine() = default; virtual ~Engine() = default;
...@@ -63,6 +64,14 @@ public: ...@@ -63,6 +64,14 @@ public:
IO &GetIO() noexcept; IO &GetIO() noexcept;
StepStatus BeginStep(); StepStatus BeginStep();
/**
* Indicates the beginning of a step. Typically used for streaming and
* inside step loops.
* @param mode stepping mode
* @param timeoutSeconds (not yet implemented)
* @return current step status
*/
virtual StepStatus BeginStep(StepMode mode, virtual StepStatus BeginStep(StepMode mode,
const float timeoutSeconds = 0.f); const float timeoutSeconds = 0.f);
...@@ -119,7 +128,7 @@ public: ...@@ -119,7 +128,7 @@ public:
* not reusable until PerformPuts * not reusable until PerformPuts
* </pre> * </pre>
* @param variable input object with metadata * @param variable input object with metadata
* @param value single value passed by value * @param value single value passed by value, allows rvalues
*/ */
template <class T> template <class T>
void PutSync(Variable<T> &variable, const T &value); void PutSync(Variable<T> &variable, const T &value);
...@@ -178,6 +187,7 @@ public: ...@@ -178,6 +187,7 @@ public:
/** Execute all Put<Deferred,T> starting from a previous PerformPuts */ /** Execute all Put<Deferred,T> starting from a previous PerformPuts */
virtual void PerformPuts(); virtual void PerformPuts();
/** Execute all Get<Deferred,T> starting from a previous PerformGets */ /** Execute all Get<Deferred,T> starting from a previous PerformGets */
virtual void PerformGets(); virtual void PerformGets();
...@@ -192,7 +202,8 @@ public: ...@@ -192,7 +202,8 @@ public:
void WriteStep(); void WriteStep();
/** /**
* Closes a particular transport, or all if -1 * Closes a particular transport, or all if -1. This is a purely virtual
* function that all engines must implement.
* @param transportIndex order from IO AddTransport * @param transportIndex order from IO AddTransport
*/ */
virtual void Close(const int transportIndex = -1) = 0; virtual void Close(const int transportIndex = -1) = 0;
......
...@@ -433,9 +433,9 @@ Engine &IO::Open(const std::string &name, const Mode mode, MPI_Comm mpiComm) ...@@ -433,9 +433,9 @@ Engine &IO::Open(const std::string &name, const Mode mode, MPI_Comm mpiComm)
return *itEngine.first->second.get(); return *itEngine.first->second.get();
} }
Engine &IO::Open(const std::string &name, const Mode openMode) Engine &IO::Open(const std::string &name, const Mode mode)
{ {
return Open(name, openMode, m_MPIComm); return Open(name, mode, m_MPIComm);
} }
// PRIVATE // PRIVATE
......
...@@ -69,14 +69,16 @@ public: ...@@ -69,14 +69,16 @@ public:
/** From AddTransport, parameters in map for each transport in vector */ /** From AddTransport, parameters in map for each transport in vector */
std::vector<Params> m_TransportsParameters; std::vector<Params> m_TransportsParameters;
/** From Add Operator */ /** From AddOperator, contains operators added to this IO */
std::vector<OperatorInfo> m_Operators; std::vector<OperatorInfo> m_Operators;
/** /**
* Constructor called from ADIOS factory class * @brief Constructor called from ADIOS factory class DeclareIO function.
* Not to be used direclty in applications.
* @param name unique identifier for this IO object * @param name unique identifier for this IO object
* @param mpiComm MPI communicator from ADIOS factory class * @param mpiComm MPI communicator from ADIOS factory class
* @param inConfigFile IO defined in config file (XML) * @param inConfigFile IO defined in config file (XML)
* @param hostLanguage current language using the adios2 library
* @param debugMode true: extra exception checks (recommended) * @param debugMode true: extra exception checks (recommended)
*/ */
IO(const std::string name, MPI_Comm mpiComm, const bool inConfigFile, IO(const std::string name, MPI_Comm mpiComm, const bool inConfigFile,
...@@ -85,34 +87,35 @@ public: ...@@ -85,34 +87,35 @@ public:
~IO() = default; ~IO() = default;
/** /**
* Sets the engine type for this IO class object * @brief Sets the engine type for this IO class object
* @param engine * @param engine predefined engine type, default is bpfile
*/ */
void SetEngine(const std::string engine) noexcept; void SetEngine(const std::string engine) noexcept;
/** Set the IO mode (collective or independent) /**
* @brief Set the IO mode (collective or independent), not yet implemented
* @param IO mode */ * @param IO mode */
void SetIOMode(const IOMode mode); void SetIOMode(const IOMode mode);
/** /**
* Version that passes a map to fill out parameters * @brief Version that passes a map to fill out parameters
* initializer list = { "param1", "value1" }, {"param2", "value2"}, * initializer list = { "param1", "value1" }, {"param2", "value2"},
* @param params adios::Params std::map<std::string, std::string> * @param params adios::Params std::map<std::string, std::string>
*/ */
void SetParameters(const Params &parameters = Params()) noexcept; void SetParameters(const Params &parameters = Params()) noexcept;
/** /**
* Sets a single parameter overwriting value if key exists; * @brief Sets a single parameter overwriting value if key exists;
* @param key parameter key * @param key parameter key
* @param value parameter value * @param value parameter value
*/ */
void SetParameter(const std::string key, const std::string value) noexcept; void SetParameter(const std::string key, const std::string value) noexcept;
/** Retrieve current parameters map */ /** @brief Retrieve current parameters map */
Params &GetParameters() noexcept; Params &GetParameters() noexcept;
/** /**
* Adds a transport and its parameters for the IO Engine * @brief Adds a transport and its parameters for the IO Engine
* @param type must be a supported transport type * @param type must be a supported transport type
* @param params acceptable parameters for a particular transport * @param params acceptable parameters for a particular transport
* @return transportIndex handler * @return transportIndex handler
...@@ -121,9 +124,10 @@ public: ...@@ -121,9 +124,10 @@ public:
const Params &parameters = Params()); const Params &parameters = Params());
/** /**
* Set a single parameter to an existing transport identified with a * @brief Sets a single parameter to an existing transport identified with a
* transportIndex handler from AddTransport. This function overwrites * transportIndex handler from AddTransport.
* existing parameter. * This function overwrites
* existing parameter with the same key.
* @param transportIndex index handler from AddTransport * @param transportIndex index handler from AddTransport
* @param key parameter key * @param key parameter key
* @param value parameter value * @param value parameter value
...@@ -132,7 +136,7 @@ public: ...@@ -132,7 +136,7 @@ public:
const std::string key, const std::string value); const std::string key, const std::string value);
/** /**
* Define a Variable of primitive data type for I/O. * @brief Define a Variable of primitive data type for current IO.
* Default (name only) is a local single value, * Default (name only) is a local single value,
* in order to be compatible with ADIOS1. * in order to be compatible with ADIOS1.
* @param name variable name, must be unique within Method * @param name variable name, must be unique within Method
...@@ -142,6 +146,8 @@ public: ...@@ -142,6 +146,8 @@ public:
* @param constantShape true if dimensions, offsets and local sizes don't * @param constantShape true if dimensions, offsets and local sizes don't
* change over time * change over time
* @return reference to Variable object * @return reference to Variable object
* @exception std::invalid_argument if Variable with unique name is already
* defined, in debug mode only
*/ */
template <class T> template <class T>
Variable<T> & Variable<T> &
...@@ -150,73 +156,90 @@ public: ...@@ -150,73 +156,90 @@ public:
const bool constantDims = false, T *data = nullptr); const bool constantDims = false, T *data = nullptr);
/** /**
* Define attribute from contiguous data array owned by an application * @brief Define attribute from contiguous data array owned by an
* application
* @param name must be unique for the IO object * @param name must be unique for the IO object
* @param array pointer to user data * @param array pointer to user data
* @param elements number of data elements * @param elements number of data elements
* @return reference to internal Attribute * @return reference to internal Attribute
* @exception std::invalid_argument if Attribute with unique name is already
* defined, in debug mode only
*/ */
template <class T> template <class T>
Attribute<T> &DefineAttribute(const std::string &name, const T *array, Attribute<T> &DefineAttribute(const std::string &name, const T *array,
const size_t elements); const size_t elements);
/** /**
* Define attribute from a single variable making a copy * @brief Define attribute from a single variable making a copy
* @param name must be unique for the IO object * @param name must be unique for the IO object
* @param value single data value * @param value single data value
* @return reference to internal Attribute * @return reference to internal Attribute
* @exception std::invalid_argument if Attribute with unique name is already
* defined, in debug mode only
*/ */
template <class T> template <class T>
Attribute<T> &DefineAttribute(const std::string &name, const T &value); Attribute<T> &DefineAttribute(const std::string &name, const T &value);
/** /**
* Removes an existing Variable * @brief Removes an existing Variable in current IO object.
* Dangerous function since references and
* pointers can be dangling after this call.
* @param name unique identifier input * @param name unique identifier input
* @return true: found and removed variable, false: not found, nothing to * @return true: found and removed variable, false: not found, nothing to
* remove * remove
*/ */
bool RemoveVariable(const std::string &name) noexcept; bool RemoveVariable(const std::string &name) noexcept;
/** Removes all existing variables in current IO object */ /**
* @brief Removes all existing variables in current IO object.
* Dangerous function since references and
* pointers can be dangling after this call.
*/
void RemoveAllVariables() noexcept; void RemoveAllVariables() noexcept;
/** /**
* Removes an existing Attribute. Dangerous function since references and * @brief Removes an existing Attribute in current IO object.
* Dangerous function since references and
* pointers can be dangling after this call. * pointers can be dangling after this call.
* @param name unique identifier input * @param name unique identifier input
* @return true: found and removed attribute, false: not found, nothing to * @return true: found and removed attribute, false: not found, nothing to
* remove * remove
*/ */
bool RemoveAttribute(const std::string &name) noexcept; bool RemoveAttribute(const std::string &name) noexcept;
/** Removes all existing attributes in current IO object. Dangerous function /**
* since references and pointers can be dangling after this call. */ * @brief Removes all existing attributes in current IO object.
* Dangerous function since references and
* pointers can be dangling after this call.
*/
void RemoveAllAttributes() noexcept; void RemoveAllAttributes() noexcept;
/** /**
* Map with variables info: key: name, value: type * @brief Retrieve map with variables info. Use when reading.
* @return populate map with current variables * @return map with current variables and info
* keys: Type, Min, Max, Value, AvailableStepsStart,
* AvailableStepsCount, Shape, Start, Count, SingleValue
*/ */
std::map<std::string, Params> GetAvailableVariables() noexcept; std::map<std::string, Params> GetAvailableVariables() noexcept;
/** /**
* Gets an existing variable of primitive type by name * @brief Gets an existing variable of primitive type by name
* @param name of variable to be retrieved * @param name of variable to be retrieved
* @return reference to an existing variable created with DefineVariable * @return pointer to an existing variable in current IO, nullptr if not
* throws an exception if Variable is not found * found
*/ */
template <class T> template <class T>
Variable<T> *InquireVariable(const std::string &name) noexcept; Variable<T> *InquireVariable(const std::string &name) noexcept;
/** /**
* Returns the type of an existing variable as an string * @brief Returns the type of an existing variable as an string
* @param name input variable name * @param name input variable name
* @return type