Functions for storing and restoring data in Fenix. More...
Typedefs | |
| typedef void(* | Fenix_Serialize_file_fn) (FILE *, int, void *, int, int, void *) |
| Serializer function type for file-serializable data members. | |
Functions | |
| int | Fenix_Data_group_create (int group_id, MPI_Comm comm, int start_time_stamp, int depth, int policy_name, void *policy_value, int *flag) |
| Create a Data Group. | |
| int | Fenix_Data_group_created (int group_id) |
| Query if a data group exists on this rank. | |
| int | Fenix_Data_member_create (int group_id, int member_id, void *buffer, int count, MPI_Datatype datatype) |
| Create a data member for store/restore operations. | |
| int | Fenix_Data_member_fcreate (int group_id, int member_id, void *buffer, int count, MPI_Datatype datatype, Fenix_Serialize_file_fn serializer, void *ctx) |
| Create a data member to be (de)serialized with a file pointer. | |
| int | Fenix_Data_member_define (int group_id, int member_id, void *buffer, int count, MPI_Datatype datatype) |
| Idempotent version of Fenix_Data_member_create. | |
| int | Fenix_Data_member_fdefine (int group_id, int member_id, void *buffer, int count, MPI_Datatype datatype, Fenix_Serialize_file_fn serializer, void *ctx) |
| Idempotent version of Fenix_Data_member_fcreate. | |
| int | Fenix_Data_member_created (int group_id, int member_id) |
| Query if a data member exists on this rank. | |
| int | Fenix_Data_group_get_redundancy_policy (int group_id, int *policy_name, void *policy_value, int *flag) |
| Get the storage policy of a data group. | |
| int | Fenix_Data_wait (Fenix_Request request) |
| UNIMPLEMENTED Block on completion of the store operation specified by the request. | |
| int | Fenix_Data_test (Fenix_Request request, int *flag) |
| UNIMPLEMENTED Query completion of the store operation specified by the request. | |
| int | Fenix_Data_member_stage (int group_id, int member_id, const Fenix_Data_subset subset) |
| Serialize a group member's data into the member's local store. | |
| int | Fenix_Data_member_stage_inplace (int group_id, int member_id, void *buf, const Fenix_Data_subset subset) |
| As Fenix_Data_member_stage, but takes ownership of buf to possibly avoid a copy. | |
| int | Fenix_Data_member_stage_begin (int group_id, int member_id, FILE **fpp) |
| Open a file for manually staging a member into. | |
| int | Fenix_Data_member_stage_end (int group_id, int member_id) |
| Concludes a Fenix_Data_member_stage_begin. | |
| int | Fenix_Data_member_store (int group_id, int member_id, const Fenix_Data_subset subset) |
| Store a particular group member into the group's resilient storage space, in uncommitted storage. | |
| int | Fenix_Data_member_storev (int group_id, int member_id, const Fenix_Data_subset subset) |
| UNIMPLEMENTED As [store](Fenix_Data_member_store), but subsets may vary rank-to-rank. | |
| int | Fenix_Data_member_istore (int group_id, int member_id, const Fenix_Data_subset subset, Fenix_Request *request) |
| UNIMPLEMENTED As [store](Fenix_Data_member_store), but asynchronous. | |
| int | Fenix_Data_member_istorev (int group_id, int member_id, const Fenix_Data_subset subset, Fenix_Request *request) |
| UNIMPLEMENTED As [istore](Fenix_Data_member_istore), but asynchronous. | |
| int | Fenix_Data_commit (int group_id, int *time_stamp) |
| Commit stored data members to the group's next snapshot. | |
| int | Fenix_Data_commit_barrier (int group_id, int *time_stamp) |
| As commit, but ensures a globally consistent commit. | |
| int | Fenix_Data_checkpoint (int group_id, const Fenix_Data_subset subset, int num_storev, int *storev_ids, int *time_stamp) |
| Store all members of a group and then commit that group. | |
| int | Fenix_Data_member_repair (int group_id, int member_id) |
| Repair the resilient storage of committed data for this member. | |
| int | Fenix_Data_member_load (int group_id, int member_id, int time_stamp, Fenix_Data_subset *found_data) |
| Load this member's committed data into user's data. | |
| int | Fenix_Data_member_load_to (int group_id, int member_id, void *target, int target_count, int time_stamp, Fenix_Data_subset *found_data) |
| As Fenix_Data_member_load, but with a custom load destination. | |
| int | Fenix_data_member_load_begin (int group_id, int member_id, FILE **fpp, int time_stamp, Fenix_Data_subset *found_data) |
| Get a file to read this member's committed data from. | |
| int | Fenix_Data_member_load_end (int group_id, int member_id) |
| Concludes a #Fenix_Data_member_load_begin. | |
| int | Fenix_Data_member_restore (int group_id, int member_id, void *target_buffer, int max_count, int time_stamp, Fenix_Data_subset *found_data) |
| Repair and load a member. | |
| int | Fenix_Data_member_lrestore (int group_id, int member_id, void *target_buffer, int max_count, int time_stamp, Fenix_Data_subset *found_data) |
| Local-only version of Fenix_Data_member_restore. | |
| int | Fenix_Data_member_restore_from_rank (int group_id, int member_id, void *data, int max_count, int time_stamp, Fenix_Data_subset *found_data, int source_rank) |
| UNIMPLEMENTED As Fenix_Data_member_restore, but restores from a specific rank's data. | |
| int | Fenix_Data_subset_create (int num_blocks, int start_offset, int end_offset, int stride, Fenix_Data_subset *subset) |
| Create a data subset for use in store operations. | |
| int | Fenix_Data_subset_createv (int num_blocks, int *array_start_offsets, int *array_end_offsets, Fenix_Data_subset *subset) |
| As Fenix_Data_subset_create, but with varying start and end offsets. | |
| int | Fenix_Data_subset_delete (Fenix_Data_subset *subset) |
| Delete a data subset. | |
| int | Fenix_Data_group_get_number_of_members (int group_id, int *number_of_members) |
| Get the number of members in a data group. | |
| int | Fenix_Data_group_get_member_at_position (int group_id, int *member_id, int position) |
| Get member ID based on member index. | |
| int | Fenix_Data_group_get_number_of_snapshots (int group_id, int *number_of_snapshots) |
| Get the number of locally-available snapshots in a data group. | |
| int | Fenix_Data_group_get_snapshot_at_position (int group_id, int position, int *time_stamp) |
| Get the time stamp of a snapshot at a given index. | |
| int | Fenix_Data_group_get_cohort (int group_id, MPI_Group *cohort) |
| Get the cohort (redundancy partner group) for a data group. | |
| int | Fenix_Data_member_attr_get (int group_id, int member_id, int attributename, void *attributevalue, int *flag) |
| UNIMPLEMENTED Get the value of a member's attribute. | |
| int | Fenix_Data_member_attr_set (int group_id, int member_id, int attribute_name, void *attribute_value, int *flag) |
| Set the value of a member's attribute. | |
| int | Fenix_Data_snapshot_delete (int group_id, int time_stamp) |
| Delete a snapshot from a data group. | |
| int | Fenix_Data_group_delete (int group_id) |
| Delete a data group. | |
| int | Fenix_Data_member_delete (int group_id, int member_id) |
| Delete a data member. | |
Variables | |
| const Fenix_Data_subset | FENIX_DATA_SUBSET_FULL |
| A standin for checkpointing/recovering the full member's data. | |
| const Fenix_Data_subset | FENIX_DATA_SUBSET_EMPTY |
| A standin for checkpointing/recovering no data. | |
| const Fenix_Data_subset | FENIX_DATA_SUBSET_PRESTAGED |
| A standin for checkpointing/recovering all of pre-staged data. | |
| Fenix_Data_subset * | FENIX_DATA_SUBSET_IGNORE |
Functions for storing and restoring data in Fenix.
Fenix provides options for redundant storage of application data to facilitate application data recovery in a transparent manner. Fenix contains functions to control consistency of collections of such data, as well as their level of persistence. Functions with the prefix Fenix_Data_ perform store, versioning, restore, and other relevant operations and form the Fenix data recovery API. The user can select a specific set of application data, identified by its location in memory, label it using Fenix_Data_member_create, and copy it into Fenix's redundant storage space through Fenix_Data_member(i)store(v) at a point in time. Subsequently, Fenix_Data_commit finalizes all preceding Fenix store operations involving this data group and assigns a unique time stamp to the resulting data snapshot, marking the data as potentially recoverable after a loss of ranks. Individual pieces of data can then be restored whenever they are needed with Fenix_Data_member_restore, for example after a failure occurs. We note that Fenix's data storage and recovery facility aims primarily to support in-memory recovery.
Populating redundant data storage using Fenix may involve the dispersion of data created by one rank to other ranks within the system, making the store operation semantically a collective operation. However, Fenix does not require store operations to be globally synchronizing. For example, execution of Fenix_Data_member_store for a particular collection of data could potentially be finished in some ranks, but not yet in others. And if certain ranks nominally participating in the storage operations have no actual data movement responsibility, Fenix is allowerd to let them exit the operation immediately. Consequently, Fenix data storage functions should not be used for synchronization purposes.
Multiple distinct pieces (members) of data assigned to Fenix-managed redundant storage, can be associated with a specific instance of a Fenix data group to form a semantic unit. Committing such a group ensures that the data involved is available for recovery.
A Fenix data group provides dual functionality. First, it serves as a container for a set of data objects (members) that are committed together, and hence provides transaction semantics. Second, it recognizes that Fenix_Data_member_store is an operation carried out collectively by a group of ranks, but not necessarily by all active ranks in the MPI environment. Hence, it adopts the convenient MPI vehicle of communicators to indicate the subset of ranks involved. Data groups are composed of members that describe the actual application data and the redundancy policy to be used for securely storing the members.
Data groups can and should be recreated after each failure (i.e. do not conditionally skip the creation after initialization).
See Fenix_Data_group_create for creating a data group.
Fenix internally uses an extensible system for defining data policies to keep the door open to easily adding new data policies and configuring them on a per-data-group basis. We currently support a single, configurable, memory-based policy.
IMR is referenced with the FENIX_DATA_POLICY_IN_MEMORY_RAID definition, and takes as input an array of integers with the following usage:
The policy is designed to localize recovery as much as possible. Communication amongst group members is required (as failure during recovery operations can lead to inconsistent beliefs about which ranks have recovered data), but groups without recovering ranks may then all recover locally rather than communicating further. Groups need not wait for ranks outside of their group to enter or exit recovery.
Mode 1: Groups ranks into dyadically paired partners of Rank N and Rank (N+Separation). For odd-size communicators, a single group of size 3 will also form of the first, middle, and last ranks. Each rank stores a copy of its own data and a copy of its partner's. For groups of three, partner data storage is chained. Should both partners fail (or any two for groups of three) before recovery operations have completed, data will be unrecoverable.
Memory Usage: Each rank stores a copy of its own data and of its partner's data for each timestamp, where checkpoint depth D stores D+1 checkpoints. Therefore for data size M, (D+1)*M*2 bytes are used.
Computation: None.
Mode 5: Groups ranks into parity groups of size GroupSize. Groups are formed of Rank N, N+Separation, N+2*Separation. If any two ranks in a group fail before recovery operations have completed, data will be unrecoverable.
Memory Usage: Each rank stores a copy of its own data and M/(GroupSize-1) parity bytes per timestamp. Therefore, (D+1)*M*(GroupSize/(GroupSize-1)) bytes are used.
Computation: O(M) parity bit calculations.
These options enable users to trade reliability and computation for memory space, which may be necessary for applications with large memory usage.
| typedef void(* Fenix_Serialize_file_fn) (FILE *, int, void *, int, int, void *) |
Serializer function type for file-serializable data members.
Arguments are: FILE* fp: memory-backed file pointer to (de)serialize into int direction: one of FENIX_SERIALIZE or FENIX_DESERIALIZE void* buf: pointer to user buffer int offset: first index to be (de)serialized int count: number of entries to (de)serialize, or FENIX_RESIZEABLE void* context: pointer to user-defined context
Fenix will invoke this function to (de)serialize the data of a member. Will be invoked once per contiguous data region to be (de)serialized.
When direction=FENIX_SERIALIZE, fp is write-only and buf is the data member's buffer (as FENIX_DATA_MEMBER_ATTRIBUTE_BUFFER). Function should write data values [offset, offset+count) directly into fp. Will be invoked with offset=0 and count=FENIX_RESIZEABLE if staging FENIX_DATA_SUBSET_FULL of a member of size FENIX_RESIZEABLE, which indicates that all data should be serialized.
When direction=FENIX_DESERIALIZE, fp is read-only and buf is the target buffer of the restore or lrestore operation being completed. Function should read data values [offset, offset+count) directly from fp.
The user should not manipulate the file's position indicator in any way other than directly writing/reading to/from the file.
|
collective |
Store all members of a group and then commit that group.
Stores each member in order of their creation in the group. Equivalent to invoking Fenix_Data_member_store with the specified subset. If a member's id is listed in storev_ids, this is instead equivalent to invoking Fenix_Data_member_storev.
After storing, equivalent to invoking Fenix_Data_commit.
This function supports inline recovery when it is active (see Fenix_Mlog_activate).
| [in] | group_id | The group to checkpoint |
| [in] | subset | The subset of each member to store. |
| [in] | num_storev | The size of the storev_ids array, or FENIX_STOREV_ALL. |
| [in] | storev_ids | Array of member ids to store as storev. May be null if num_storev is zero or FENIX_STOREV_ALL. |
| [out] | time_stamp | Pointer to store the time stamp of the commit to, or FENIX_TIME_STAMP_IGNORE. |
|
collectivelocal |
Commit stored data members to the group's next snapshot.
This function is used to freeze the current state of a data group, together with all its application data that has been stored in Fenix’ redundant storage, and label it with a time stamp, thus creating a snapshot of the stored application data. Only data that has been committed is eligible for recovery through Fenix_Data_member_restore. An application needs to call Fenix_Data_wait for all pending asynchronous Fenix_Data_member_istore(v) operations in the group before committing.
| [in] | group_id | The group to commit |
| [out] | time_stamp | The time stamp of the new snapshot |
|
collective |
As commit, but ensures a globally consistent commit.
This function does not function as a traditional barrier. The commit will proceed if all non-failed ranks reach the barrier. This allows for commits to be made when a rank fails after storing all of its data into resilient storage.
| [in] | group_id | The group to commit |
| [out] | time_stamp | The time stamp of the new snapshot |
|
collective |
Create a Data Group.
If a group with this group_id was already created in the past and has not been deleted, the parameters of this call are ignored and this function simply serves to coordinate with any ranks that have not yet created this group (e.g. due to a failure).
All calling ranks must pass the same values for the parameters group_id, comm, start_time_stamp, policy_name, and policy_value.
| group_id | A unique identifier to this group. |
| comm | A resilient communicator on which the group is formed. |
| start_time_stamp | The time_stamp to be used for the first commit in this group. |
| depth | The number of successive snapshots of this group that are retained by Fenix, in addition to the most recent one, and that can be recovered by calling Fenix data member restore functions. For example, a depth of 0 means Fenix will keep only the necessary data to restore the most recent snapshot, freeing or overwriting older snapshots automatically. A depth of -1 is currently not supported, but would ordinarily indicate that no snapshots should be removed automatically. |
| policy_name | Currently, may only be FENIX_DATA_POLICY_IN_MEMORY_RAID |
| policy_value | Pointer to data passed along to the policy. See the specific policy for more information. |
| flag | pointer to store policy-specific status or errors |
|
local |
Query if a data group exists on this rank.
| group_id | Group identifier |
|
local |
Delete a data group.
| [in] | group_id | The group to delete |
| int Fenix_Data_group_get_cohort | ( | int | group_id, |
| MPI_Group * | cohort ) |
Get the cohort (redundancy partner group) for a data group.
The cohort is the set of ranks that participate in backing up each other's data for this group. It includes the calling rank and all partner ranks. For local-only policies with no redundancy, the cohort contains only the calling rank.
The returned group is a duplicate and must be freed by the caller with MPI_Group_free when no longer needed.
| [in] | group_id | The group to query |
| [out] | cohort | The cohort group (never MPI_GROUP_NULL) |
| int Fenix_Data_group_get_member_at_position | ( | int | group_id, |
| int * | member_id, | ||
| int | position ) |
Get member ID based on member index.
See Fenix_Data_group_get_number_of_members
| [in] | group_id | The group to query |
| [out] | member_id | The member id at this index in the group |
| [in] | position | The position to check, [0, number_of_members) |
| int Fenix_Data_group_get_number_of_members | ( | int | group_id, |
| int * | number_of_members ) |
Get the number of members in a data group.
| [in] | group_id | The group to query |
| [out] | number_of_members | Number of members in the group |
| int Fenix_Data_group_get_number_of_snapshots | ( | int | group_id, |
| int * | number_of_snapshots ) |
Get the number of locally-available snapshots in a data group.
May include snapshots that are inconsistent across the group.
| [in] | group_id | The group to query |
| [out] | number_of_snapshots | The number of snapshots in the group |
| int Fenix_Data_group_get_redundancy_policy | ( | int | group_id, |
| int * | policy_name, | ||
| void * | policy_value, | ||
| int * | flag ) |
Get the storage policy of a data group.
| group_id | Identified to the data group to query |
| policy_name | The identifier of the policy name of the data group. |
| policy_value | A location within which to store the policy_values this group's policy was configured with. |
| flag | A location set to true if a policy value was extracted, else false. |
| int Fenix_Data_group_get_snapshot_at_position | ( | int | group_id, |
| int | position, | ||
| int * | time_stamp ) |
Get the time stamp of a snapshot at a given index.
Snapshots are indexed in reverse order in which the user committed them (e.g. the most recent available snapshot has position=0).
| [in] | group_id | The group to query |
| [in] | position | The index of the snapshot, which must be [0, number_of_snapshots) |
| [out] | time_stamp | The time stamp of the snapshot |
| int Fenix_Data_member_attr_set | ( | int | group_id, |
| int | member_id, | ||
| int | attribute_name, | ||
| void * | attribute_value, | ||
| int * | flag ) |
Set the value of a member's attribute.
Valid names are FENIX_DATA_MEMBER_ATTRIBUTE_BUFFER, FENIX_DATA_MEMBER_ATTRIBUTE_COUNT, and FENIX_DATA_MEMBER_ATTRIBUTE_DATATYPE.
The COUNT and DATATYPE attributes may only be set before the first store operation. Contrary to the Fenix specification, returning to Fenix_Init after a failure does not allow the user to set these attributes again.
| [in] | group_id | The group to update |
| [in] | member_id | The member to update |
| [in] | attribute_name | The attribute to update |
| [in] | attribute_value | The new value of the attribute |
| [out] | flag | Set to true if the attribute was set, else false |
|
collectivelocal |
Create a data member for store/restore operations.
All calling ranks in the group's communicator must pass the same values for the parameters member_id, datatype, group_id, and count.
| group_id | Identifier to a data group within which to create the member. |
| member_id | An integer unique within the data group that identifies the data in source_buffer. Must be nonnegative and less than FENIX_MEMBER_ID_MAX, which is guaranteed to be at least 2^30. |
| buffer | Address of the data to be copied to redundant storage maintained by Fenix. Note that this parameter may also be specified using Fenix_Data_member_attr_set, which is critical for non-survivor ranks after a failure which will have an invalid address which was generated on the failed rank and must update. |
| count | The maximum number of contiguous elements of type datatype of the data to be stored. A value of FENIX_RESIZEABLE allows this member to have a varying data size. |
| datatype | The MPI_Datatype of the elements in source_buffer |
|
local |
Query if a data member exists on this rank.
| group_id | Group identifier |
| member_id | Member identifier |
| int Fenix_Data_member_define | ( | int | group_id, |
| int | member_id, | ||
| void * | buffer, | ||
| int | count, | ||
| MPI_Datatype | datatype ) |
Idempotent version of Fenix_Data_member_create.
If this member does not exist, behaves as Fenix_Data_member_create. If this member does exist, updates its attributes (with the same restrictions as Fenix_Data_member_attr_set).
|
local |
Delete a data member.
| [in] | group_id | The group to delete from |
| [in] | member_id | The member to delete |
| int Fenix_Data_member_fdefine | ( | int | group_id, |
| int | member_id, | ||
| void * | buffer, | ||
| int | count, | ||
| MPI_Datatype | datatype, | ||
| Fenix_Serialize_file_fn | serializer, | ||
| void * | ctx ) |
Idempotent version of Fenix_Data_member_fcreate.
If this member does not exist, behaves as Fenix_Data_member_fcreate. If this member does exist, updates its attributes (with the same restrictions as Fenix_Data_member_attr_set) and its serializer function. Note that providing a nullptr for serializer will remove any existing serializer.
|
local |
Load this member's committed data into user's data.
Attempts to load up to ATTRIBUTE_COUNT elements into ATTRIBUTE_BUFFER.
For members without a serializer, data is loaded by directly copying memory. Otherwise, data is loaded by calls to this member's serializer.
If time stamp is FENIX_DATA_SNAPSHOT_ALL, this function attempts to load elements [0, MEMBER_ATTRIBUTE_COUNT-1] by loading each element from the most recent available snapshot the individual element was committed in.
If a snapshot at the specified time stamp is not locally available, raises FENIX_ERROR_NODATA_FOUND. If any elements from [0, MEMBER_ATTRIBUTE_COUNT-1] were not loaded from the snapshot(s), returns FENIX_WARNING_PARTIAL_RESTORE.
User is responsible for freeing the subset returned in found_data, unless found_data is FENIX_DATA_SUBSET_IGNORE (in which case no subset is returned).
| [in] | group_id | The group of the member to load |
| [in] | member_id | The member to load |
| [in] | time_stamp | Time stamp of the snapshot to load |
| [in,out] | found_data | Subset of the elements successfully loaded |
|
local |
Get a file to read this member's committed data from.
As Fenix_Data_member_load, but opens a file to read data from instead of directly loading the data.
It is an error to call any staging, storing, loading, or restoring function involving this member before a corresponding call to Fenix_Data_member_load_end. Returned file is read-only and must not be closed by the user. The value of any data outside the found_data subset is undefined.
Note that time_stamp must not be FENIX_DATA_SNAPSHOT_ALL.
| [in] | group_id | The group of the member to load |
| [in] | member_id | The member to load |
| [out] | fpp | Output location for the file pointer to be written to |
| [in] | time_stamp | Time stamp of the snapshot to load |
| [in,out] | found_data | Subset of the elements successfully loaded |
|
local |
Concludes a #Fenix_Data_member_load_begin.
Throws (or returns) FENIX_ERROR_INVALID_LOGIC_CALL if there has not been a corresponding #Fenix_Data_member_load_begin.
| group_id | Group of the member to end loading for |
| member_id | Member to end loading for |
|
local |
As Fenix_Data_member_load, but with a custom load destination.
Attempts to load up to target_count elements into target. Otherwise behaves as Fenix_Data_member_load.
If target_count is FENIX_DATA_RESTORE_FULL, assumes buffer has space to load all available elements.
| [in] | group_id | The group of the member to load |
| [in] | member_id | The member to load |
| [in,out] | target | The custom load destination |
| [in] | target_count | The number of elements to attempt to load |
| [in] | time_stamp | Time stamp of the snapshot to load |
| [in,out] | found_data | Subset of the elements successfully loaded |
|
deprecated |
Local-only version of Fenix_Data_member_restore.
DEPRECATED: Use member_load functions instead.
This function restores the data of a group member from the local snapshot.
| [in] | group_id | The group to restore from |
| [in] | member_id | The member to restore |
| [out] | target_buffer | The buffer to store the restored data |
| [in] | max_count | The maximum number of elements to restore |
| [in] | time_stamp | The time stamp of the snapshot to restore from |
| [out] | found_data | The subset of the data that was found in the snapshot |
|
collective |
Repair the resilient storage of committed data for this member.
All ranks in this group must call with the same group_id and member_id. May also be matched by a call to Fenix_Data_member_restore.
Member does not have to exist locally. If member does not exist locally, this function is equivalent to calling Fenix_Data_member_create with a null buffer before this function's normal behavior. If the group's policy is unable to rebuild this member (i.e., in the case of an unrecoverable failure pattern), raises FENIX_ERROR_NODATA_FOUND.
Note that this may not raise any error if the member exists but its committed data is unable to be restored. This may present as if the member simply never committed any data.
Behavior is currently undefined if this group's comm has a different size than it had when it committed any of the group's snapshots.
| [in] | group_id | The group of the member to repair |
| [in] | member_id | The member to repair |
|
collective |
Repair and load a member.
Consolidating function to take the following steps:
This function is collective amongst the ranks of this member's group, but it may be matched remotely by Fenix_Data_member_repair.
| [in] | group_id | The group to restore from |
| [in] | member_id | The member to restore |
| [out] | target_buffer | The buffer to load to |
| [in] | max_count | The maximum number of elements to load |
| [in] | time_stamp | The time stamp of the snapshot to load |
| [in,out] | found_data | Subset of the elements successfully loaded |
|
local |
Serialize a group member's data into the member's local store.
A store operation can broken into two parts: locally staging the data within Fenix, then policy-specific operations to make the data resilient to faults. This function performs ONLY the first part. Applications should subsequently make a store of this member to the FENIX_DATA_SUBSET_PRESTAGED data subset.
It is undefined behaviour to commit staged-but-not-stored data.
| group_id | Group of the member to stage to |
| member_id | Member to stage to |
| subset | Which subset of the data to stage. FENIX_DATA_SUBSET_ALL is invalid if member size is FENIX_RESIZEABLE. FENIX_DATA_SUBSET_PRESTAGED is invalid. |
|
local |
Open a file for manually staging a member into.
It is an error to call any staging, storing, loading, or restoring function involving this member before a corresponding call to Fenix_Data_member_stage_end.
| group_id | Group of the member to stage to |
| member_id | Member to stage to |
| fpp | Output location for the file pointer to be written to. File must not be closed by the user. It is an error to use this file after the corresponding Fenix_Data_member_stage_end. |
|
local |
Concludes a Fenix_Data_member_stage_begin.
This function is equivalent to performing a Fenix_Data_member_stage_inplace with buf pointing to the written data and a subset of FENIX_DATA_SUBSET_FULL. For resizable members, the subset is instead of the range [0, staging_file_size/element_size] and it is an error if the staging file's size is not divisible by the element size.
Throws (or returns) FENIX_ERROR_INVALID_LOGIC_CALL if there has not been a corresponding Fenix_Data_member_stage_begin.
| group_id | Group of the member to end staging for |
| member_id | Member to end staging for |
|
local |
As Fenix_Data_member_stage, but takes ownership of buf to possibly avoid a copy.
Fenix takes this buf as the new location to stage all data to. Any prior staged but uncommitted data is lost. Even if subset is not contiguous or begins after 0, buf must contain all elements from 0 to the maximum of (member's count, subset's end). Elements not belonging to the subset may be written to with subsequent calls to Fenix_Data_member_stage.
There is no guarantee that the pointer to buf will remain valid after this call. Fenix may overwrite, reallocate, or free this buffer at any time, including before returning from this function.
| group_id | Group of the member to stage to |
| member_id | Member to stage to |
| buf | The data buffer which Fenix will take ownership of |
| subset | Which subset of the data to stage. See Fenix_Data_member_stage |
|
collective |
Store a particular group member into the group's resilient storage space, in uncommitted storage.
The user can safely modify the member's data buffer after this call, as the current state is copied immediately. Multiple calls may be used to incrementally store data (using subsets), or overwrite old data prior to a commit.
| group_id | All ranks must provide the same group_id |
| member_id | All ranks must provide the same member_id |
| subset | Which subset of the data to store. If this member was created with size FENIX_RESIZEABLE, FENIX_DATA_SUBSET_ALL is an invalid input. |
|
local |
Delete a snapshot from a data group.
| [in] | group_id | The group to delete from |
| [in] | time_stamp | The time stamp of the snapshot to delete |
| int Fenix_Data_subset_create | ( | int | num_blocks, |
| int | start_offset, | ||
| int | end_offset, | ||
| int | stride, | ||
| Fenix_Data_subset * | subset ) |
Create a data subset for use in store operations.
Creates a subset based on num_blocks pairs of {start_offset,end_offset}, {start_offset+stride,end_offset+stride}, {start_offset+2*stride,end_offset+2*stride}, etc.
The value of start_offset must be smaller than or equal to the value of end_offset to indicate non-negative block size. Otherwise, the function returns an error code.
Created subsets must be deleted with Fenix_Data_subset_delete to free memory.
| [in] | num_blocks | The number of contiguous data blocks. |
| [in] | start_offset | The index of the first element in the first data block. |
| [in] | end_offset | The index of the last element in the first data block. |
| [in] | stride | Regular shift between successive data blocks. |
| [out] | subset | The created subset. |
| int Fenix_Data_subset_createv | ( | int | num_blocks, |
| int * | array_start_offsets, | ||
| int * | array_end_offsets, | ||
| Fenix_Data_subset * | subset ) |
As Fenix_Data_subset_create, but with varying start and end offsets.
Creates a subset based on num_blocks pairs of {start_offset,end_offset}. The value of start_offset must be smaller than or equal to end_offset to indicate non-negative block size. Otherwise, the function returns an error code.
Created subsets must be deleted with Fenix_Data_subset_delete to free memory.
| [in] | num_blocks | The number of contiguous data blocks. |
| [in] | array_start_offsets | The index of the first element in each data block. |
| [in] | array_end_offsets | The index of the last element in each data block. |
| [out] | subset | The created subset. |
| int Fenix_Data_subset_delete | ( | Fenix_Data_subset * | subset | ) |
Delete a data subset.
Frees the memory associated with a data subset object.
| [in] | subset | The subset to delete. |