|
TECA
The Toolkit for Extreme Climate Analysis
|
Defines the interface for mapping time steps to files. More...
#include <teca_cf_time_step_mapper.h>
Public Member Functions | |
| virtual bool | initialized () |
| returns true if the mapper has been successfully initialized More... | |
| virtual int | finalize () |
| virtual int | get_upstream_requests (teca_metadata base_req, std::vector< teca_metadata > &up_reqs) |
| construct requests for this rank More... | |
| virtual p_teca_cf_layout_manager | get_layout_manager (long time_step) |
| given a time step returns the associated layout manager More... | |
| virtual int | get_layout_manager (const unsigned long temporal_extent[2], std::vector< p_teca_cf_layout_manager > &managers) |
| virtual int | to_stream (std::ostream &os)=0 |
| print a summary to the stream More... | |
| template<typename op_t > | |
| int | file_table_apply (const op_t &op) |
Protected Types | |
| using | file_table_t = std::unordered_map< long, p_teca_cf_layout_manager > |
| the file table maps from a time step to a specific layout manager More... | |
Protected Member Functions | |
| teca_cf_time_step_mapper (const teca_cf_time_step_mapper &)=delete | |
| teca_cf_time_step_mapper (const teca_cf_time_step_mapper &&)=delete | |
| void | operator= (const teca_cf_time_step_mapper &)=delete |
| void | operator= (const teca_cf_time_step_mapper &&)=delete |
| int | alloc_file_comms () |
| create/free the per-file communicators More... | |
| int | free_file_comms () |
Protected Attributes | |
| MPI_Comm | comm |
| communicator to partition into per-file communicators More... | |
| std::string | index_initializer_key |
| pipeline control key names More... | |
| std::string | index_request_key |
| long | start_time_step |
| user provided overrides More... | |
| long | end_time_step |
| long | n_time_steps |
| time_steps to request by rank More... | |
| std::vector< long > | block_size |
| std::vector< long > | block_start |
| long | n_files |
| output files More... | |
| std::vector< std::set< int > > | file_ranks |
| std::vector< MPI_Comm > | file_comms |
| per file communicators More... | |
| file_table_t | file_table |
Defines the interface for mapping time steps to files.
|
protected |
the file table maps from a time step to a specific layout manager
|
protected |
create/free the per-file communicators
| int teca_cf_time_step_mapper::file_table_apply | ( | const op_t & | op | ) |
call the passed in functor once per file table entry, safe for MPI collective operations. The required functor signature is: int f(long file_id, teca_cf_layout_manager &manager)
a return of non-zero from the functor will immediately stop the apply and the value will be returned, but no error will be reported.
|
virtual |
close all files, destroy file managers, and release communicators this should be done once all I/O is complete.
|
inlinevirtual |
given an inclusive range of time steps, get the corresponding layout managers that can be used to create, define and write the data to disk. When more than one manager is returned, each should be passed the data, giving it a chance to write the subset it is responsible for to disk.
| [in] | temporal_extent | the first and last step that will be written |
| [out] | manager | a vector of teca_cf_layout_manager instances that need to be called to write the data. |
Reimplemented in teca_cf_spatial_time_step_mapper, and teca_cf_space_time_time_step_mapper.
|
inlinevirtual |
given a time step returns the associated layout manager
Reimplemented in teca_cf_spatial_time_step_mapper, teca_cf_space_time_time_step_mapper, teca_cf_interval_time_step_mapper, and teca_cf_block_time_step_mapper.
|
virtual |
construct requests for this rank
Reimplemented in teca_cf_spatial_time_step_mapper, and teca_cf_space_time_time_step_mapper.
|
inlinevirtual |
returns true if the mapper has been successfully initialized
|
pure virtual |
print a summary to the stream
Implemented in teca_cf_spatial_time_step_mapper, teca_cf_space_time_time_step_mapper, teca_cf_interval_time_step_mapper, and teca_cf_block_time_step_mapper.
|
protected |
communicator to partition into per-file communicators
|
protected |
per file communicators
|
protected |
pipeline control key names
|
protected |
output files
|
protected |
time_steps to request by rank
|
protected |
user provided overrides