Class representing a benchmark.
More...
#include <MPIBenchmark.hpp>
|
using | extentT = Extent::value_type |
|
|
| MPIBenchmark (std::string basePath, Extent tExtent, std::shared_ptr< BlockSlicer > blockSlicer, DatasetFillerProvider dfp, MPI_Comm comm=MPI_COMM_WORLD) |
| Construct an MPI benchmark manually. More...
|
|
void | addConfiguration (std::string compression, uint8_t compressionLevel, std::string backend, Datatype dt, typename decltype(Series::iterations)::key_type iterations, int threadSize) |
|
void | addConfiguration (std::string compression, uint8_t compressionLevel, std::string backend, Datatype dt, typename decltype(Series::iterations)::key_type iterations) |
| Version of addConfiguration() that automatically sets the number of used threads to the MPI size. More...
|
|
void | resetConfigurations () |
|
template<typename Clock > |
MPIBenchmarkReport< typename Clock::duration > | runBenchmark (int rootThread=0) |
| Main function for running a benchmark. More...
|
|
|
MPI_Comm | communicator = MPI_COMM_WORLD |
|
Extent | totalExtent |
| Total extent of the hypercuboid used in the benchmark.
|
|
std::shared_ptr< BlockSlicer > | m_blockSlicer |
|
DatasetFillerProvider | m_dfp |
|
template<typename DatasetFillerProvider>
class openPMD::MPIBenchmark< DatasetFillerProvider >
Class representing a benchmark.
Allows to configure a benchmark and execute it.
- Template Parameters
-
DatasetFillerProvider | Functor type to create a DatasetFiller with the requested type. Should have a templated operator()() returning a value that can be dynamically casted to a std::shared_ptr<openPMD::DatasetFiller<T>>. |
◆ MPIBenchmark()
template<typename DatasetFillerProvider >
Construct an MPI benchmark manually.
- Parameters
-
basePath | The path to write to. Will be extended with the backends' filename endings. May be overwritten if performing several benchmarks with the same backend, e.g. when using different compression schemes. |
tExtent | The total extent of the dataset. |
blockSlicer | An implementation of BlockSlicer class, associating each thread with a portion of the dataset to write to. |
dfp | DatasetFillerProvider, a templated functor returning a std::shared_ptr<openPMD::DatasetFiller<T>> or a value dynamically castable to one. |
comm | MPI communicator. |
◆ addConfiguration() [1/2]
template<typename DatasetFillerProvider >
void openPMD::MPIBenchmark< DatasetFillerProvider >::addConfiguration |
( |
std::string |
compression, |
|
|
uint8_t |
compressionLevel, |
|
|
std::string |
backend, |
|
|
Datatype |
dt, |
|
|
typename decltype(Series::iterations)::key_type |
iterations |
|
) |
| |
Version of addConfiguration() that automatically sets the number of used threads to the MPI size.
- Parameters
-
compression | Compression string, leave empty to disable commpression. |
compressionLevel | Compression level. |
backend | Backend to use, specified by filename extension (eg "bp" or "h5"). |
dt | Type of data to write and read. |
iterations | The number of iterations to write and read for each compression strategy. The DatasetFiller functor will be called for each iteration, so it should create sufficient data for one iteration. |
◆ addConfiguration() [2/2]
template<typename DatasetFillerProvider >
void openPMD::MPIBenchmark< DatasetFillerProvider >::addConfiguration |
( |
std::string |
compression, |
|
|
uint8_t |
compressionLevel, |
|
|
std::string |
backend, |
|
|
Datatype |
dt, |
|
|
typename decltype(Series::iterations)::key_type |
iterations, |
|
|
int |
threadSize |
|
) |
| |
- Parameters
-
compression | Compression string, leave empty to disable commpression. |
compressionLevel | Compression level. |
backend | Backend to use, specified by filename extension (eg "bp" or "h5"). |
dt | Type of data to write and read. |
iterations | The number of iterations to write and read for each compression strategy. The DatasetFiller functor will be called for each iteration, so it should create sufficient data for one iteration. |
threadSize | Number of threads to use. |
◆ runBenchmark()
template<typename DatasetFillerProvider >
template<typename Clock >
Main function for running a benchmark.
The benchmark is repeated for all previously requested compressions strategies, backends and thread sizes.
- Template Parameters
-
- Parameters
-
rootThread | Rank at which the report will be read. |
- Returns
- A report about the time needed for writing and reading under each compression strategy.
The documentation for this class was generated from the following file: