TECA
The Toolkit for Extreme Climate Analysis
teca_space_time_executive Class Reference

#include <teca_space_time_executive.h>

Inheritance diagram for teca_space_time_executive:
[legend]
Collaboration diagram for teca_space_time_executive:
[legend]

Public Member Functions

std::shared_ptr< teca_space_time_executiveshared_from_this ()
 
std::shared_ptr< teca_space_time_executive const > shared_from_this () const
 
int initialize (MPI_Comm comm, const teca_metadata &md) override
 
teca_metadata get_next_request () override
 
void set_number_of_spatial_partitions (long n_partitions)
 
void set_number_of_temporal_partitions (long n_partitions)
 
void set_temporal_partition_size (long n_steps)
 
void set_time_step (long s)
 Set the time step to process. More...
 
void set_first_step (long s)
 Set the first index in the series to process.The default is 0. More...
 
void set_last_step (long s)
 
void set_extent (unsigned long *ext)
 
void set_extent (const std::vector< unsigned long > &ext)
 
void set_bounds (double *bounds)
 
void set_bounds (const std::vector< double > &bounds)
 
void set_arrays (const std::vector< std::string > &arrays)
 
void enable_index_executive_compatibility ()
 
void set_partition_x (int val)
 A flag that enables/disables partitioning in the x-direction. More...
 
void set_partition_y (int val)
 A flag that enables/disables partitioning in the y-direction. More...
 
void set_partition_z (int val)
 A flag that enables/disables partitioning in the z-direction. More...
 
void set_minimum_block_size_x (unsigned long val)
 Sets the minimum block size in the x-direction. More...
 
void set_minimum_block_size_y (unsigned long val)
 Sets the minimum block size in the y-direction. More...
 
void set_minimum_block_size_z (unsigned long val)
 Sets the minimum block size in the z-direction. More...
 
- Public Member Functions inherited from teca_algorithm_executive
void set_verbose (int a_verbose)
 
int get_verbose () const
 

Static Public Member Functions

static p_teca_space_time_executive New ()
 
- Static Public Member Functions inherited from teca_algorithm_executive
static p_teca_algorithm_executive New ()
 

Additional Inherited Members

- Protected Member Functions inherited from teca_algorithm_executive
 teca_algorithm_executive (const teca_algorithm_executive &)=default
 
 teca_algorithm_executive (teca_algorithm_executive &&)=default
 
teca_algorithm_executiveoperator= (const teca_algorithm_executive &)=default
 
teca_algorithm_executiveoperator= (teca_algorithm_executive &&)=default
 

Detailed Description

An executive that generates requests such that the upstream or user defined index space is partitoned using a fixed partition size and spatially across MPI ranks. Set the partition size to 0 to use only the spatial partitioning.

This executive uses the following meta data keys:

| Key  | Description |
| ---- | ----------- |
| whole_extent | The spatial extent to partiton. Partitionaing is |
| ^            | applied such that each MPI rank has a unique subset to |
| ^            | process |
| index_initializer_key -| holds the name of the key that tells how |
| ^                      | many indices are available. the named key |
| ^                      | must also be present and should conatin the |
| ^                      | number of indices available |
| index_request_key | holds the name of the key used to request |
| ^                 | a specific inclusive range of indices [i0, i1]. |
| ^                 | Requests are generated with this name set to |
| ^                 | a specific inclusive range of indices to be |
| ^                 | processed. Some upstream algorithm is |
| ^                 | expected to produce the data associated |
| ^                 | with the requested index extent. |

Member Function Documentation

◆ enable_index_executive_compatibility()

void teca_space_time_executive::enable_index_executive_compatibility ( )
inline

Condigures the executive to make one request per time step using the index_request_key as the teca_index_executive would. This could be used parallelize exsiting algorithms over space and time.

◆ New()

static p_teca_space_time_executive teca_space_time_executive::New ( )
inlinestatic

Allocate a new teca_space_time_executive

◆ set_arrays()

void teca_space_time_executive::set_arrays ( const std::vector< std::string > &  arrays)

Set a list of arrays to include in upstream requests. This provides a means of pulling data through the pipeline when the upstream algorithms do not do this automatically or to pull additional arrays.

◆ set_bounds()

void teca_space_time_executive::set_bounds ( double *  bounds)

Set the spatial bounds to partition and process. The default is to partition and process the entire domain.

◆ set_extent()

void teca_space_time_executive::set_extent ( unsigned long *  ext)

Set the extent to partition and process. The default is to partition and process the whole_extent.

◆ set_first_step()

void teca_space_time_executive::set_first_step ( long  s)

Set the first index in the series to process.The default is 0.

◆ set_last_step()

void teca_space_time_executive::set_last_step ( long  s)

set the last index in the series to process. default is -1. negative number results in the last available time step being used.

◆ set_minimum_block_size_x()

void teca_space_time_executive::set_minimum_block_size_x ( unsigned long  val)
inline

Sets the minimum block size in the x-direction.

◆ set_minimum_block_size_y()

void teca_space_time_executive::set_minimum_block_size_y ( unsigned long  val)
inline

Sets the minimum block size in the y-direction.

◆ set_minimum_block_size_z()

void teca_space_time_executive::set_minimum_block_size_z ( unsigned long  val)
inline

Sets the minimum block size in the z-direction.

◆ set_number_of_spatial_partitions()

void teca_space_time_executive::set_number_of_spatial_partitions ( long  n_partitions)

Set the number of partitions to partition the spatial extent into. If set to a value less than one, the number of MPI ranks is used. If set to a number greater or equal to one and less than the number of MPI ranks, a warning is issued but processing will continue. The default is zero, resulting in one partition per MPI rank.

◆ set_number_of_temporal_partitions()

void teca_space_time_executive::set_number_of_temporal_partitions ( long  n_partitions)

Set the number of partitions to partition the temporal extent into. Use set_time_partition_size to control the partition size rather then the number.

◆ set_partition_x()

void teca_space_time_executive::set_partition_x ( int  val)
inline

A flag that enables/disables partitioning in the x-direction.

◆ set_partition_y()

void teca_space_time_executive::set_partition_y ( int  val)
inline

A flag that enables/disables partitioning in the y-direction.

◆ set_partition_z()

void teca_space_time_executive::set_partition_z ( int  val)
inline

A flag that enables/disables partitioning in the z-direction.

◆ set_temporal_partition_size()

void teca_space_time_executive::set_temporal_partition_size ( long  n_steps)

Set the partition size to use when partitioning the temporal extent. Setting to less than one results in a spatial only partitioning. When greater or equal to one the value will be used to determine the number of temporal partitions.

When the total number of time steps is not evenly devided by the temporal partition size, the final request will specify the remainder of steps.

Parameters
[in]n_stepsthe number of indices to request per request.

◆ set_time_step()

void teca_space_time_executive::set_time_step ( long  s)

Set the time step to process.


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