Skip to main content
#include <dvs_query_interface.h>

Public Member Functions

Detailed Description

An instance of this object can be initially created by calling DVS::CREATE_QUERY_INSTANCE(). A URI must then be added via DVS::IQuery::add_uri(). Then you can either start querying the dataset or you can add filters by chaining queries via DVS::IQuery::filter(). When finished to clean up memory call DVS::IQuery::release(). IMPORTANT: Calling DVS::IQuery::release() destroys all chained queries as well and any object references retrieved from the query from calls such as DVS::IQuery::get_part() The overall intended usage would be something like:
See Cache URIs and Query Stanzas for more information on cache URIs and queries. Definition at line 79 of file dvs_query_interface.h.

Member Function Documentation

add_uri()

pure virtual Add a URI for the reader API to iterate over. This method will only “set” the current URI. In the future we will support multiple URIs queried at once. IMPORTANT: Calling this will invalidate any objects returned from the query and any chained queries. Errors:
  • DVS_NONE: Success
  • DVS_PARAM_NULL: uri passed in was nullptr
  • DVS_QUERY_HAS_CHILDREN: Cannot add a uri to a query which already has children
  • DVS_QUERY_INVALID_URI: URI passed in did not parse, invalid uri
  • DVS_QUERY_INVALID_FILTER: Filter in URI did not parse, invalid filter
Parameters Returns dvs_ret DVS_NONE on success, otherwise see method description

filter()

pure virtual The filter method will allocate a new chained query with the passed in filter appended to it. The filter method allocates a new chained query with the passed in filter appended to it. The current query is not modified. This query however is a chained child of the current query meaning that any changes to the parent will invalidate the objects of the child. IQuery::release() will release any child chained queries created from the it. This lets a user create a top level query, say for a specific dataset name. Then have multiple chained queries that filter for specific parts etc which can be iterated over in parallel. IMPORTANT: Chained queries will have all of their objects destroyed when a parent query changes. Parameters Returns DVS::IQuery* a pointer to a newly allocated chained child query

get_chunks_per_rank()

pure virtual Get an array of the number of chunks for every rank for this query. This method will return an array of max number of chunks for every rank. The size of the buffer needed can be retrieved from IQuery::get_num_chunks_per_rank(). These values correspond to the ranks returned from IQuery::get_ranks(). Since there might be multiple datasets in the query this will return the max for each rank across the datasets and parts. This call will return all of the chunk information for every rank returned from IQuery::get_ranks(). Errors:
  • DVS_NONE: Success
  • DVS_PARAM_NULL: chunks passed in is nullptr
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
Parameters Returns dvs_ret DVS_NONE if success, otherwise see method description

get_dataset()

pure virtual Get the dataset object. IMPORTANT: This object will be destroyed if this query or parent queries’ filters are modified. Parameters Returns DVS::IDataset* dataset for the index, or nullptr if not found

get_hash_available()

pure virtual Get if the hash is available in the blobstore. Checks the blobstore to see if the hash is available or not. This is mainly used for validation purposes. Errors:
  • DVS_NONE: Success
  • DVS_PARAM_NULL: hash passed in nullptr
  • DVS_INVALID_CACHE: Invalid cache, bad data
  • DVS_INVALID_HASH: Hash passed in invalid
Parameters Returns dvs_ret DVS_NONE on success, else see method description

get_mesh_chunk()

pure virtual Get the mesh chunk based on the index. IMPORTANT: This object will be destroyed if this query or parent queries’ filters are modified. Parameters Returns DVS::IMeshChunk* the mesh chunk for the index, or nullptr if not found

get_num_chunks_per_rank()

pure virtual Get the number of chunks for each rank. This method returns the size of the buffer needed to pass in for get_chunks_per_rank. This will be of the same size as IQuery::get_num_ranks(). This call will return all of the chunk information for every rank returned from IQuery::get_ranks(). Errors:
  • DVS_NONE: Success
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
Parameters Returns dvs_ret DVS_NONE on success, otherwise see method description

get_num_datasets()

pure virtual Get the number of datasets objects. IMPORTANT: The number of datasets will be invalid if this query or any parent queries’ filters are modified. Errors:
  • DVS_NONE: Success
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
Parameters Returns DVS_NONE on success, else see method description

get_num_mesh_chunks()

pure virtual Get the number of mesh chunks for this query. NOT YET IMPLEMENTED IMPORTANT: The number of mesh chunks will be invalid if this query or any parent queries’ filters are modified. Errors:
  • DVS_NONE: Success
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
  • DVS_QUERY_INVALID_FILTER: Invalid filter for query
  • DVS_METADATA_ERROR: Error loading metadata
Parameters Returns dvs_ret dvs_ret DVS_NONE on success, else see method description

get_num_parts()

pure virtual Get the number of parts for this query. IMPORTANT: The number of parts will be invalid if this query or any parent queries’ filters are modifed. Errors:
  • DVS_NONE: Success
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
Parameters Returns dvs_ret DVS_NONE on success, else see method description

get_num_plot_chunks()

pure virtual Get the number of plot chunks for this query. NOT YET IMPLEMENTED IMPORTANT: The number of plot chunks will be invalid if this query or any parent queries’ filters are modified. Errors:
  • DVS_NONE: Success
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
  • DVS_QUERY_INVALID_FILTER: Invalid filter for query
  • DVS_METADATA_ERROR: Error loading metadata
Parameters Returns dvs_ret dvs_ret DVS_NONE on success, else see method description

get_num_plots()

pure virtual Get the number of plots for this query. IMPORTANT: The number of plots will be invalid if this query or any parent queries’ filters are modifed. Errors:
  • DVS_NONE: Success
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
Parameters Returns dvs_ret dvs_ret DVS_NONE on success, else see method description

get_num_ranks()

pure virtual Get the number of ranks for this filtered query. This call will return all of the unique ranks across all datasets. I.E. if you are loading 2 datasets one with ranks: 0, 1, 2 and one with 0, 1, 2, 3, 4, this will return 5 representing 0,1,2,3,4. Errors:
  • DVS_NONE: Success
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
Parameters Returns dvs_ret DVS_NONE on success, otherwise see method description

get_num_servers()

pure virtual Get the num servers object. Get the number of servers the cache in the uri was written with. Errors:
  • DVS_NONE: Success
  • DVS_PARAM_NULL: uri passed in was nullptr
  • DVS_INVALID_CACHE: uri passed in was invalid or cache isn’t accessible
  • DVS_CACHE_MISSING_SERVERS: Cache has a gap in the number of servers, bad cache?
  • DVS_CACHE_EMPTY: No server folders in cache
  • DVS_UNKNOWN: Internal unhandled case
Parameters Returns dvs_ret DVS_NONE on success, otherwise see method description

get_num_timesteps()

pure virtual Get the number of timesteps. NOT YET IMPLEMENTED IMPORTANT: The number of timesteps will be invalid if this query or any parent queries’ filters are modified. Errors:
  • DVS_NONE: Success
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
  • DVS_QUERY_INVALID_FILTER: Invalid filter for query
  • DVS_METADATA_ERROR: Error loading metadata
Parameters Returns dvs_ret dvs_ret DVS_NONE on success, else see method description

get_num_variables()

pure virtual Get the number of variables for this query. IMPORTANT: The number of variables will be invalid if this query or any parent queries’ filters are modifed. Errors:
  • DVS_NONE: Success
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
Parameters Returns dvs_ret dvs_ret DVS_NONE on success, else see method description

get_part()

pure virtual Get the part based on the index. IMPORTANT: This object will be destroyed if this query or parent queries’ filters are modified. Parameters Returns DVS::IObject* part based on the index, or nullptr if not found

get_plot()

pure virtual Get the plot object based on the index. IMPORTANT: This object will be destroyed if this query or parent queries’ filters are modified. Parameters Returns DVS::IObject* plot based on the index, or nullptr if not found

get_plot_chunk()

pure virtual Get the plot chunk based on the index. IMPORTANT: This object will be destroyed if this query or parent queries’ filters are modified. Parameters Returns DVS::IPlotChunk* the plot chunk based on the index, or nullptr if not found

get_ranks()

pure virtual Get the unique ranks for this filtered query. This call will return all of the unique ranks across all datasets. I.E. if you are loading 2 datasets one with ranks: 0, 1, 2 and one with 0, 1, 2, 3, 4, this will return 5 representing 0,1,2,3,4. Errors:
  • DVS_NONE: Success
  • DVS_PARAM_NULL: ranks passed in is nullptr
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
Parameters Returns dvs_ret DVS_NONE on success, otherwise see method description

get_timesteps()

pure virtual Get the timesteps object. NOT YET IMPLEMENTED IMPORTANT: The timesteps will be invalid if this query or any parent queries’ filters are modified. Errors:
  • DVS_NONE: Success
  • DVS_PARAM_NULL: timesteps param is nullptr
  • DVS_INVALID_CACHE: Problem accessing cache
  • DVS_DATA_FAILED_LOAD: Problem reading cache, data bad/corrupt
  • DVS_QUERY_INVALID_FILTER: Invalid filter for query
  • DVS_METADATA_ERROR: Error loading metadata
Parameters Returns dvs_ret DVS_NONE on success, else see method description

get_variable()

pure virtual Get the variable object based on the index. IMPORTANT: This object will be destroyed if this query or parent queries’ filters are modified. Parameters Returns DVS::IVar* variable based on the index, or nullptr if not found

get_variable_data()

pure virtual Get variable values for dataset and part objects. Dataset (Case) or part objects can have variable values per timestep. This method retrieves those values or returns if they do not exist. There does not need to be a value set for every part variable on every part. DVS_NO_DATA will be returned in this case. Error Codes:
  • DVS_NONE: No error
  • DVS_PARAM_NULL: Null param passed in
  • DVS_PARAM_INVALID_VAR: Invalid variable passed in, should not be possible
  • DVS_PARAM_INVALID_VAR_LOC: Variable passed in not a case or part variable
  • DVS_PARAM_INVALID_OBJECT_TYPE: Object passed in not a case or part object
  • DVS_PARAM_INVALID_OBJECT: Invalid object passed in, should not be possible
  • DVS_PARAM_INVALID_TIME: Timestep does not exist for the dataset the object belongs to
  • DVS_PARAM_OBJECT_DATASET_MISMATCH: Object and variable are from different datasets
Parameters Returns dvs_ret DVS_NONE if no errors, DVS_NO_DATA if no data found, otherwise see method description

release()

pure virtual Release the memory of the query. This will release the memory of the query, any objects returned from it (i.e. parts/plots/variables) and release the memory of any chained queries.

set_logger()

pure virtual Set the logger object. Set a logger interface for the client to use. This object will have DVS::ILogger::release() invoked on it. If release() is not implemented the memory should be destroyed by the caller after the query is released. Parameters

set_server_mod()

pure virtual Set a filter based on the server number and a modulus. Data in DVS is normally splitup between multiple servers. This method lets you setup the parallelism paradigm for reading in the server data. I.E. if the data was written with 4 servers but you want to read it back in with 2 servers you should have one reader use set_server_mod(0, 2) and the other use set_server_mod(1, 2). This will round robin the data so reader “0” will reader the data from 0 and 2 and server “1” will read the data from 1 and 3. To set it so that a server will read only its data set server_mod=0. Use get_num_servers() to determine the number of servers to use Parameters The documentation for this class was generated from the following file: