Fenix @develop
 
Loading...
Searching...
No Matches
fenix.h
Go to the documentation of this file.
1/*
2//@HEADER
3// ************************************************************************
4//
5//
6// _|_|_|_| _|_|_|_| _| _| _|_|_| _| _|
7// _| _| _|_| _| _| _| _|
8// _|_|_| _|_|_| _| _| _| _| _|
9// _| _| _| _|_| _| _| _|
10// _| _|_|_|_| _| _| _|_|_| _| _|
11//
12//
13//
14//
15// Copyright (C) 2016 Rutgers University and Sandia Corporation
16//
17// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18// the U.S. Government retains certain rights in this software.
19//
20// Redistribution and use in source and binary forms, with or without
21// modification, are permitted provided that the following conditions are
22// met:
23//
24// 1. Redistributions of source code must retain the above copyright
25// notice, this list of conditions and the following disclaimer.
26//
27// 2. Redistributions in binary form must reproduce the above copyright
28// notice, this list of conditions and the following disclaimer in the
29// documentation and/or other materials provided with the distribution.
30//
31// 3. Neither the name of the Corporation nor the names of the
32// contributors may be used to endorse or promote products derived from
33// this software without specific prior written permission.
34//
35// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
36// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
38// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
39// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
40// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
41// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
42// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
43// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
44// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
45// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46//
47// Author Marc Gamell, Eric Valenzuela, Keita Teranishi, Manish Parashar,
48// Rob Van der Wijngaart, Michael Heroux, and Matthew Whitlock
49//
50// Questions? Contact Keita Teranishi (knteran@sandia.gov) and
51// Marc Gamell (mgamell@cac.rutgers.edu)
52//
53// ************************************************************************
54//@HEADER
55*/
56
57#ifndef __FENIX__
58#define __FENIX__
59
60#include <mpi.h>
61#include <setjmp.h>
62#include <stdio.h>
63
64#include "fenix_init.h"
65
66#if defined(MPIX_ERR_PROC_FAILED) && !defined(MPI_ERR_PROC_FAILED)
67#define MPI_ERR_PROC_FAILED MPIX_ERR_PROC_FAILED
68#endif
69
70#if defined(MPIX_ERR_PROC_FAILED_PENDING) && \
71 !defined(MPI_ERR_PROC_FAILED_PENDING)
72#define MPI_ERR_PROC_FAILED_PENDING MPIX_ERR_PROC_FAILED_PENDING
73#endif
74
75#if defined(MPIX_ERR_REVOKED) && !defined(MPI_ERR_REVOKED)
76#define MPI_ERR_REVOKED MPIX_ERR_REVOKED
77#endif
78
79#if defined(c_plusplus) || defined(__cplusplus)
80extern "C" {
81#endif
82
95typedef enum {
96 FENIX_SUCCESS = 0,
97
98 // Error values are negative
99 FENIX_ERROR_UNINITIALIZED = -100,
100 FENIX_ERROR_NOCATEGORY,
101 FENIX_ERROR_CALLBACK_NOT_REGISTERED,
102 FENIX_ERROR_GROUP_CREATE,
103 FENIX_ERROR_MEMBER_CREATE,
104 FENIX_ERROR_MEMBER_EXISTS,
105 FENIX_ERROR_MEMBER_STAGING,
106 FENIX_ERROR_MEMBER_LOADING,
107 FENIX_ERROR_MEMBER_UNSTORED,
108 FENIX_ERROR_COMMIT_BARRIER,
109 FENIX_ERROR_INVALID_GROUPID,
110 FENIX_ERROR_INVALID_MEMBERID,
111 FENIX_ERROR_INVALID_LOGIC_CALL,
112 FENIX_ERROR_INVALID_POLICY_NAME,
113 FENIX_ERROR_INVALID_POLICY_VALUE,
114 FENIX_ERROR_INVALID_TIMESTAMP,
115 FENIX_ERROR_INVALID_TIMESTART,
116 FENIX_ERROR_INVALID_DEPTH,
117 FENIX_ERROR_INVALID_ATTRIBUTE_NAME,
118 FENIX_ERROR_INVALID_ATTRIBUTE_VALUE,
119 FENIX_ERROR_INVALID_POSITION,
120 FENIX_ERROR_INVALID_SUBSET,
121 FENIX_ERROR_DATA_WAIT,
122 FENIX_ERROR_SUBSET_NUM_BLOCKS,
123 FENIX_ERROR_SUBSET_START_OFFSET,
124 FENIX_ERROR_SUBSET_END_OFFSET,
125 FENIX_ERROR_SUBSET_STRIDE,
126 FENIX_ERROR_NODATA_FOUND,
127 FENIX_ERROR_INTERN,
128 FENIX_ERROR_CANCELLED,
129 FENIX_ERROR_INVALID_SETTING_NAME,
130 FENIX_ERROR_INVALID_SETTING_OPTION,
131 FENIX_ERROR_INVALID_MLOGID,
132 FENIX_ERROR_MLOG_EXISTS,
133 FENIX_ERROR_MLOG_LIBRARY_UNAVAILABLE,
134 FENIX_ERROR_PROCESS_FAILURE,
135
136 //Warnings are positive
137 FENIX_WARNING_SPARE_RANKS_DEPLETED = 100,
138 FENIX_WARNING_PARTIAL_RESTORE,
139} Fenix_Return_codes;
143#define FENIX_ERRHANDLER_LOC 1
145#define FENIX_FINALIZE_LOC 2
147#define FENIX_DATA_COMMIT_BARRIER_LOC 4
148
178
201
222
270
285
301
314
328
392#define Fenix_Init(_role, _comm, _newcomm, _argc, _argv, _spare_ranks, _err) \
393 { \
394 static jmp_buf bufjmp; \
395 *(_role) = __fenix_preinit( \
396 _role, _comm, _newcomm, _argc, _argv, _spare_ranks, _err, &bufjmp \
397 ); \
398 setjmp(bufjmp); \
399 __fenix_postinit(); \
400 }
401
407int Fenix_Initialized(int* flag);
408
414int Fenix_Finalized(int* flag);
415
432int Fenix_set_option(Fenix_Setting_name setting, unsigned option);
433
443int Fenix_get_option(Fenix_Setting_name setting, unsigned* option);
444
469 void (*recover)(MPI_Comm, int, void*), void* callback_data
470);
471
477
483
509int Fenix_Process_detect_failures(int do_recovery);
510
513
515int Fenix_get_rank_role(MPI_Comm comm, int rank, int* role);
516
524
526int Fenix_get_error();
527
529int Fenix_get_nspare();
530
536int Fenix_Process_fail_list(int** fail_list);
537
545int Fenix_check_cancelled(MPI_Request* request, MPI_Status* status);
546
574int Fenix_Finalize();
575
585#define FENIX_DATA_GROUP_WORLD_ID 10
586#define FENIX_GROUP_ID_MAX 11
587#define FENIX_DATA_MEMBER_ALL -1
588#define FENIX_DATA_MEMBER_ATTRIBUTE_BUFFER 11
589#define FENIX_DATA_MEMBER_ATTRIBUTE_COUNT 12
590#define FENIX_DATA_MEMBER_ATTRIBUTE_DATATYPE 13
591#define FENIX_DATA_MEMBER_ATTRIBUTE_SIZE 14
592#define FENIX_DATA_SNAPSHOT_LATEST -1
593#define FENIX_DATA_SNAPSHOT_ALL -2
594#define FENIX_DATA_RESTORE_INPLACE NULL
595#define FENIX_DATA_RESTORE_FULL INT_MAX
596#define FENIX_RESIZEABLE 0
597#define FENIX_DATA_SUBSET_CREATED 2
598#define FENIX_STOREV_ALL -1
599#define FENIX_SERIALIZE -2
600#define FENIX_DESERIALIZE -3
601
602#define FENIX_DATA_POLICY_IN_MEMORY_RAID 13
603#define FENIX_DATA_POLICY_IMR FENIX_DATA_POLICY_IN_MEMORY_RAID
604#define FENIX_DATA_POLICY_LOCAL 14
605
606#define FENIX_TIME_STAMP_IGNORE NULL
607
611typedef struct {
612 MPI_Request mpi_send_req;
613 MPI_Request mpi_recv_req;
615
625typedef struct {
627 void* impl;
629
632
635
638
639extern Fenix_Data_subset* FENIX_DATA_SUBSET_IGNORE;
640
669typedef void (*Fenix_Serialize_file_fn)(FILE*, int, void*, int, int, void*);
670
704 int group_id, MPI_Comm comm, int start_time_stamp, int depth, int policy_name,
705 void* policy_value, int* flag
706);
707
715int Fenix_Data_group_created(int group_id);
716
743 int group_id, int member_id, void* buffer, int count, MPI_Datatype datatype
744);
745
750 int group_id, int member_id, void* buffer, int count, MPI_Datatype datatype,
751 Fenix_Serialize_file_fn serializer, void* ctx
752);
753
762 int group_id, int member_id, void* buffer, int count, MPI_Datatype datatype
763);
764
774 int group_id, int member_id, void* buffer, int count, MPI_Datatype datatype,
775 Fenix_Serialize_file_fn serializer, void* ctx
776);
777
786int Fenix_Data_member_created(int group_id, int member_id);
787
799 int group_id, int* policy_name, void* policy_value, int* flag
800);
801
804int Fenix_Data_wait(Fenix_Request request);
805
808int Fenix_Data_test(Fenix_Request request, int* flag);
809
829 int group_id, int member_id, const Fenix_Data_subset subset
830);
831
854 int group_id, int member_id, void* buf, const Fenix_Data_subset subset
855);
856
872int Fenix_Data_member_stage_begin(int group_id, int member_id, FILE** fpp);
873
891int Fenix_Data_member_stage_end(int group_id, int member_id);
892
912 int group_id, int member_id, const Fenix_Data_subset subset
913);
914
918 int group_id, int member_id, const Fenix_Data_subset subset
919);
920
923 int group_id, int member_id, const Fenix_Data_subset subset,
924 Fenix_Request* request
925);
926
929 int group_id, int member_id, const Fenix_Data_subset subset,
930 Fenix_Request* request
931);
932
951int Fenix_Data_commit(int group_id, int* time_stamp);
952
968int Fenix_Data_commit_barrier(int group_id, int* time_stamp);
969
995 int group_id, const Fenix_Data_subset subset, int num_storev, int* storev_ids,
996 int* time_stamp
997);
998
1023int Fenix_Data_member_repair(int group_id, int member_id);
1024
1052 int group_id, int member_id, int time_stamp, Fenix_Data_subset* found_data
1053);
1054
1074 int group_id, int member_id, void* target, int target_count, int time_stamp,
1075 Fenix_Data_subset* found_data
1076);
1077
1101 int group_id, int member_id, FILE** fpp, int time_stamp,
1102 Fenix_Data_subset* found_data
1103);
1104
1116int Fenix_Data_member_load_end(int group_id, int member_id);
1117
1141 int group_id, int member_id, void* target_buffer, int max_count,
1142 int time_stamp, Fenix_Data_subset* found_data
1143);
1144
1163 int group_id, int member_id, void* target_buffer, int max_count,
1164 int time_stamp, Fenix_Data_subset* found_data
1165);
1166
1170 int group_id, int member_id, void* data, int max_count, int time_stamp,
1171 Fenix_Data_subset* found_data, int source_rank
1172);
1173
1199 int num_blocks, int start_offset, int end_offset, int stride,
1200 Fenix_Data_subset* subset
1201);
1202
1222 int num_blocks, int* array_start_offsets, int* array_end_offsets,
1223 Fenix_Data_subset* subset
1224);
1225
1235
1243 int group_id, int* number_of_members
1244);
1245
1256 int group_id, int* member_id, int position
1257);
1258
1269 int group_id, int* number_of_snapshots
1270);
1271
1285 int group_id, int position, int* time_stamp
1286);
1287
1303int Fenix_Data_group_get_cohort(int group_id, MPI_Group* cohort);
1304
1307 int group_id, int member_id, int attributename, void* attributevalue,
1308 int* flag
1309);
1310
1329 int group_id, int member_id, int attribute_name, void* attribute_value,
1330 int* flag
1331);
1332
1341int Fenix_Data_snapshot_delete(int group_id, int time_stamp);
1342
1350int Fenix_Data_group_delete(int group_id);
1351
1360int Fenix_Data_member_delete(int group_id, int member_id);
1370#define FENIX_MLOG_NONE -1
1371#define FENIX_MLOG_CONTINUE -1
1372
1384int Fenix_Mlog_create(int mlog_id, MPI_Comm* comm, int depth);
1385
1404int Fenix_Mlog_activate(int mlog_id);
1405
1413int Fenix_Mlog_active(int* mlog_id);
1414
1425int Fenix_Mlog_begin_region(int mlog_id, int region_id);
1426
1440int Fenix_Mlog_activate_region(int mlog_id, int region_id);
1441
1456int Fenix_Mlog_sync(int mlog_id, int region_id);
1457
1467int Fenix_Mlog_create_data_member(int mlog_id, int group_id, int member_id);
1468
1479int Fenix_Mlog_define_data_member(int mlog_id, int group_id, int member_id);
1480
1488int Fenix_Mlog_delete(int mlog_id);
1489
1492#if defined(c_plusplus) || defined(__cplusplus)
1493} // extern "C"
1494
1495#include "fenix.hpp"
1496#endif
1497
1498#endif // __FENIX__
int Fenix_Data_member_attr_get(int group_id, int member_id, int attributename, void *attributevalue, int *flag)
<span class="mlabel"> UNIMPLEMENTED </span> Get the value of a member's attribute.
Definition recovery.cpp:536
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.
Definition fenix.cpp:358
int Fenix_Data_group_created(int group_id)
Query if a data group exists on this rank.
Definition fenix.cpp:291
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.
const Fenix_Data_subset FENIX_DATA_SUBSET_FULL
A standin for checkpointing/recovering the full member's data.
Definition fenix.cpp:71
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.
Definition fenix.cpp:305
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.
Definition fenix.cpp:406
int Fenix_Data_member_istorev(int group_id, int member_id, const Fenix_Data_subset subset, Fenix_Request *request)
<span class="mlabel"> UNIMPLEMENTED </span> As [istore](Fenix_Data_member_istore),...
Definition fenix.cpp:383
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.
Definition recovery.cpp:546
int Fenix_Data_group_delete(int group_id)
Delete a data group.
Definition fenix.cpp:493
const Fenix_Data_subset FENIX_DATA_SUBSET_EMPTY
A standin for checkpointing/recovering no data.
Definition fenix.cpp:72
void(* Fenix_Serialize_file_fn)(FILE *, int, void *, int, int, void *)
Serializer function type for file-serializable data members.
Definition fenix.h:669
int Fenix_Data_member_repair(int group_id, int member_id)
Repair the resilient storage of committed data for this member.
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.
Definition fenix.cpp:280
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_create(int group_id, int member_id, void *buffer, int count, MPI_Datatype datatype)
Create a data member for store/restore operations.
Definition fenix.cpp:297
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.
Definition fenix.cpp:423
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_subset_delete(Fenix_Data_subset *subset)
Delete a data subset.
Definition fenix.cpp:479
int Fenix_Data_snapshot_delete(int group_id, int time_stamp)
Delete a snapshot from a data group.
Definition fenix.cpp:487
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.
Definition fenix.cpp:441
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.
Definition recovery.cpp:508
const Fenix_Data_subset FENIX_DATA_SUBSET_PRESTAGED
A standin for checkpointing/recovering all of pre-staged data.
Definition fenix.cpp:73
int Fenix_Data_member_created(int group_id, int member_id)
Query if a data member exists on this rank.
Definition fenix.cpp:352
int Fenix_Data_group_get_number_of_members(int group_id, int *number_of_members)
Get the number of members in a data group.
Definition recovery.cpp:572
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.
Definition fenix.cpp:327
int Fenix_Data_group_get_member_at_position(int group_id, int *member_id, int position)
Get member ID based on member index.
Definition recovery.cpp:579
int Fenix_Data_group_get_cohort(int group_id, MPI_Group *cohort)
Get the cohort (redundancy partner group) for a data group.
Definition recovery.cpp:528
int Fenix_Data_wait(Fenix_Request request)
<span class="mlabel"> UNIMPLEMENTED </span> Block on completion of the store operation specified b...
Definition recovery.cpp:594
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.
Definition fenix.cpp:468
int Fenix_Data_test(Fenix_Request request, int *flag)
<span class="mlabel"> UNIMPLEMENTED </span> Query completion of the store operation specified by t...
Definition recovery.cpp:602
int Fenix_Data_member_istore(int group_id, int member_id, const Fenix_Data_subset subset, Fenix_Request *request)
<span class="mlabel"> UNIMPLEMENTED </span> As [store](Fenix_Data_member_store),...
Definition fenix.cpp:374
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_storev(int group_id, int member_id, const Fenix_Data_subset subset)
<span class="mlabel"> UNIMPLEMENTED </span> As [store](Fenix_Data_member_store),...
Definition fenix.cpp:366
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)
<span class="mlabel"> UNIMPLEMENTED </span> As Fenix_Data_member_restore, but restores from a spec...
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_delete(int group_id, int member_id)
Delete a data member.
Definition fenix.cpp:499
int Fenix_Data_commit_barrier(int group_id, int *time_stamp)
As commit, but ensures a globally consistent commit.
Definition fenix.cpp:400
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.
Definition fenix.cpp:344
int Fenix_Data_member_stage_end(int group_id, int member_id)
Concludes a Fenix_Data_member_stage_begin.
int Fenix_Data_commit(int group_id, int *time_stamp)
Commit stored data members to the group's next snapshot.
Definition fenix.cpp:394
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.
Definition recovery.cpp:516
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.
Definition fenix.cpp:319
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_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.
Definition fenix.cpp:458
int Fenix_Data_member_load_end(int group_id, int member_id)
Concludes a #Fenix_Data_member_load_begin.
int Fenix_Mlog_delete(int mlog_id)
Delete an mlog.
Definition fenix.cpp:554
int Fenix_Mlog_begin_region(int mlog_id, int region_id)
Set the region of the given message logger.
Definition fenix.cpp:524
int Fenix_Mlog_activate_region(int mlog_id, int region_id)
Activate the mlog and begin the region.
Definition fenix.cpp:530
int Fenix_Mlog_sync(int mlog_id, int region_id)
Synchronize messages across ranks each starting at their given region.
Definition fenix.cpp:536
int Fenix_Mlog_active(int *mlog_id)
Get the currently active message log.
Definition fenix.cpp:517
int Fenix_Mlog_create(int mlog_id, MPI_Comm *comm, int depth)
Create a new message logger.
Definition fenix.cpp:505
int Fenix_Mlog_create_data_member(int mlog_id, int group_id, int member_id)
Create a data member that can be used to stage/restore this mlog.
Definition fenix.cpp:542
int Fenix_Mlog_define_data_member(int mlog_id, int group_id, int member_id)
Define a data member that can be used to stage/restore this mlog, see Fenix_Data_member_define.
Definition fenix.cpp:548
int Fenix_Mlog_activate(int mlog_id)
Active a given mlog, deactivating any previously active mlog.
Definition fenix.cpp:511
Fenix_Unhandled_mode
Options for dealing with 'unhandled' errors, e.g. invalid rank IDs.
Definition fenix.h:274
Fenix_Spare_finalize_mode
Options for what spare ranks should do when Fenix_Finalize is called. Must be set before Fenix_Init t...
Definition fenix.h:319
int Fenix_get_option(Fenix_Setting_name setting, unsigned *option)
Get the current option for a Fenix setting.
Definition fenix.cpp:91
Fenix_Resume_mode
Options for passing control back to application after recovery.
Definition fenix.h:247
int Fenix_Finalized(int *flag)
Sets flag to true if Fenix_Finalize has been called, else false.
Definition fenix.cpp:126
int Fenix_get_error()
Returns the error value from Fenix_Init or the latest recovery.
Definition fenix.cpp:163
int Fenix_Callback_pop()
Pop the most recently registered callback from the callback stack.
Definition fenix.cpp:109
int Fenix_Callback_register(void(*recover)(MPI_Comm, int, void *), void *callback_data)
Register a callback to be invoked after failure process recovery.
Definition fenix.cpp:98
Fenix_Recovery_mode
Options for recovering after a failed rank is detected.
Definition fenix.h:205
Fenix_Spare_wait_mode
Options for how spare ranks wait to be needed. Must be set before Fenix_Init to take effect.
Definition fenix.h:290
int Fenix_Process_fail_list(int **fail_list)
Get the list of ranks that failed in the most recent failure.
Definition fenix.cpp:131
int Fenix_get_nspare()
Returns the number of spare ranks currently available to Fenix.
Definition fenix.cpp:168
int Fenix_get_number_of_ranks_with_role(int, int *)
<span class="mlabel"> UNIMPLEMENTED </span> Returns the number of ranks with a given Fenix_Rank_ro...
int Fenix_Initialized(int *flag)
Sets flag to true if Fenix_Init has been called, else false.
Definition fenix.cpp:121
int Fenix_check_cancelled(MPI_Request *request, MPI_Status *status)
Check a pre-recovery request without error.
Definition fenix.cpp:138
int Fenix_set_option(Fenix_Setting_name setting, unsigned option)
Configure a global Fenix setting.
Definition fenix.cpp:76
int Fenix_Finalize()
Clean up Fenix state. Each active rank must call Fenix_Finalize before exiting.
Definition fenix_process_recovery.cpp:856
int Fenix_Process_detect_failures(int do_recovery)
Check for any failed ranks.
Definition fenix.cpp:152
Fenix_Rank_role Fenix_get_role()
Returns this rank's Fenix_Rank_role.
Definition fenix.cpp:158
int Fenix_Callback_invoke_all()
Invoke all callbacks with information from the last recovered fault.
Definition fenix.cpp:115
Fenix_Callback_exception_mode
Options for dealing with CommExceptions generated in callbacks.
Definition fenix.h:305
Fenix_Setting_name
Global Fenix settings.
Definition fenix.h:182
Fenix_Mlog_recovery_mode
Definition fenix.h:223
Fenix_Rank_role
All possible roles returned by Fenix_Init.
Definition fenix.h:168
int Fenix_get_rank_role(MPI_Comm comm, int rank, int *role)
<span class="mlabel"> UNIMPLEMENTED </span> Returns the Fenix_Rank_role for a given rank
@ FENIX_UNHANDLED_PRINT
Print error and continue without handling.
Definition fenix.h:278
@ FENIX_UNHANDLED_SILENT
Ignore unhandled errors.
Definition fenix.h:276
@ FENIX_UNHANDLED_ABORT
Print error and abort Fenix's world (default)
Definition fenix.h:280
@ FENIX_UNHANDLED_MODE_MAXCODE
Not a valid option.
Definition fenix.h:283
@ FENIX_SPARE_FINALIZE_EXIT
Finalize MPI and exit (default),.
Definition fenix.h:323
@ FENIX_SPARE_FINALIZE_MODE_MAXCODE
Not a valid option.
Definition fenix.h:326
@ FENIX_SPARE_FINALIZE_RELEASE
Continue from Fenix_Init with Fenix_Rank_role FENIX_RANK_ROLE_SPARE.
Definition fenix.h:321
@ FENIX_RESUME_MODE_MAXCODE
Not a valid option.
Definition fenix.h:268
@ FENIX_RESUME_THROW
Throw a fenix::CommException.
Definition fenix.h:265
@ FENIX_RESUME_JUMP
Return to Fenix_Init via longjmp (default)
Definition fenix.h:261
@ FENIX_RESUME_RETURN
Return the error code inline.
Definition fenix.h:263
@ FENIX_RECOVERY_IGNORE
Do not repair communicator, immediately resume per FENIX_RESUME_MODE.
Definition fenix.h:207
@ FENIX_RECOVERY_REPAIR
Repair the communicator with spares or by shrinking.
Definition fenix.h:215
@ FENIX_RECOVERY_MODE_MAXCODE
Not a valid option.
Definition fenix.h:220
@ FENIX_RECOVERY_SPAWN
<span class="mlabel"> UNIMPLEMENTED </span> As REPAIR, but attempt to respawn failed processes
Definition fenix.h:217
@ FENIX_RECOVERY_NOOP
Do not repair communicator, otherwise behave normally.
Definition fenix.h:213
@ FENIX_SPARE_WAIT_YIELD
Tell MPI to yield this thread while waiting (if supported, else busy wait)
Definition fenix.h:294
@ FENIX_SPARE_WAIT_MODE_MAXCODE
Not a valid option.
Definition fenix.h:299
@ FENIX_SPARE_WAIT_SLEEP
Sleep 100ms between checks to see if this thread is needed for recovery.
Definition fenix.h:296
@ FENIX_SPARE_WAIT_BUSY
Busy wait, consuming CPU time in exchange for faster response.
Definition fenix.h:292
@ FENIX_CALLBACK_EXCEPTION_MODE_MAXCODE
Not a valid option.
Definition fenix.h:312
@ FENIX_CALLBACK_EXCEPTION_SQUASH
CommExceptions from callbacks are squashed.
Definition fenix.h:309
@ FENIX_CALLBACK_EXCEPTION_RETHROW
CommExceptions are allowed to propagate out of callbacks.
Definition fenix.h:307
@ FENIX_SETTING_NAME_MAXCODE
Not a valid option.
Definition fenix.h:199
@ FENIX_RESUME_MODE
See Fenix_Resume_mode.
Definition fenix.h:186
@ FENIX_MLOG_RECOVERY_MODE
See Fenix_Mlog_recovery_mode.
Definition fenix.h:192
@ FENIX_SPARE_FINALIZE_MODE
See Fenix_Spare_finalize_mode.
Definition fenix.h:196
@ FENIX_SPARE_WAIT_MODE
See Fenix_Spare_wait_mode.
Definition fenix.h:194
@ FENIX_CALLBACK_EXCEPTION_MODE
See Fenix_Callback_exception_mode.
Definition fenix.h:190
@ FENIX_RECOVERY_MODE
See Fenix_Recovery_mode.
Definition fenix.h:184
@ FENIX_UNHANDLED_MODE
See Fenix_Unhandled_mode.
Definition fenix.h:188
@ FENIX_MLOG_RECOVERY_MANUAL
All message logging recovery is manual.
Definition fenix.h:225
@ FENIX_MLOG_RECOVERY_INLINE_AUTOSYNC
As INLINE, but automatically sync logs with FENIX_MLOG_CONTINUE.
Definition fenix.h:239
@ FENIX_MLOG_RECOVERY_INLINE
Automatically repeats failed, logged MPI operations without disrupting normal application control flo...
Definition fenix.h:232
@ FENIX_MLOG_RECOVERY_MODE_MAXCODE
Not a valid option.
Definition fenix.h:242
@ FENIX_ROLE_SPARE_RANK
This rank was a spare when Fenix finalized.
Definition fenix.h:176
@ FENIX_ROLE_RECOVERED_RANK
This rank was a spare before the most recent failure, or was just spawned.
Definition fenix.h:172
@ FENIX_ROLE_INITIAL_RANK
No failures have occurred yet.
Definition fenix.h:170
@ FENIX_ROLE_SURVIVOR_RANK
This rank was not a spare before the most recent failure.
Definition fenix.h:174
Represents a data subset that can be stored/recovered.
Definition fenix.h:625
<span class="mlabel"> UNIMPLEMENTED </span> As MPI_Request, but for Fenix asynchronous data recove...
Definition fenix.h:611