Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:47:29

0001 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
0002 /*
0003  * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
0004  *                         University Research and Technology
0005  *                         Corporation.  All rights reserved.
0006  * Copyright (c) 2004-2011 The University of Tennessee and The University
0007  *                         of Tennessee Research Foundation.  All rights
0008  *                         reserved.
0009  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
0010  *                         University of Stuttgart.  All rights reserved.
0011  * Copyright (c) 2004-2005 The Regents of the University of California.
0012  *                         All rights reserved.
0013  * Copyright (c) 2009-2020 Cisco Systems, Inc.  All rights reserved
0014  * Copyright (c) 2010-2011 Oak Ridge National Labs.  All rights reserved.
0015  * Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
0016  *                         reserved.
0017  * Copyright (c) 2013-2020 Intel, Inc.  All rights reserved.
0018  * Copyright (c) 2014      NVIDIA Corporation.  All rights reserved.
0019  * Copyright (c) 2021-2024 Nanook Consulting.  All rights reserved.
0020  * $COPYRIGHT$
0021  *
0022  * Additional copyrights may follow
0023  *
0024  * $HEADER$
0025  */
0026 /** @file:
0027  *
0028  * The PRTE Error and Recovery Manager (ErrMgr)
0029  *
0030  * This framework is the logically central clearing house for process/daemon
0031  * state updates. In particular when a process fails and another process detects
0032  * it, then that information is reported through this framework. This framework
0033  * then (depending on the active component) decides how to handle the failure.
0034  *
0035  * For example, if a process fails this may activate an automatic recovery
0036  * of the process from a previous checkpoint, or initial state. Conversely,
0037  * the active component could decide not to continue the job, and request that
0038  * it be terminated. The error and recovery policy is determined by individual
0039  * components within this framework.
0040  *
0041  */
0042 
0043 #ifndef PRTE_MCA_ERRMGR_H
0044 #define PRTE_MCA_ERRMGR_H
0045 
0046 /*
0047  * includes
0048  */
0049 
0050 #include "prte_config.h"
0051 #include "constants.h"
0052 #include "types.h"
0053 
0054 #include "src/pmix/pmix-internal.h"
0055 #include "src/mca/base/pmix_base.h"
0056 #include "src/mca/mca.h"
0057 
0058 #include "src/class/pmix_object.h"
0059 #include "src/class/pmix_pointer_array.h"
0060 #include "src/util/error.h"
0061 #include "src/util/pmix_output.h"
0062 
0063 #include "src/mca/plm/plm_types.h"
0064 #include "src/runtime/prte_globals.h"
0065 
0066 BEGIN_C_DECLS
0067 
0068 /*
0069  * Macro definitions
0070  */
0071 /*
0072  * Thess macros and associated error name array are used to output intelligible error
0073  * messages.
0074  */
0075 
0076 #define PRTE_ERROR_NAME(n) prte_strerror(n)
0077 
0078 /*
0079  * Framework Interfaces
0080  */
0081 /**
0082  * Module initialization function.
0083  *
0084  * @retval PRTE_SUCCESS The operation completed successfully
0085  * @retval PRTE_ERROR   An unspecifed error occurred
0086  */
0087 typedef int (*prte_errmgr_base_module_init_fn_t)(void);
0088 
0089 /**
0090  * Module finalization function.
0091  *
0092  * @retval PRTE_SUCCESS The operation completed successfully
0093  * @retval PRTE_ERROR   An unspecifed error occurred
0094  */
0095 typedef int (*prte_errmgr_base_module_finalize_fn_t)(void);
0096 
0097 /**
0098  * This is not part of any module so it can be used at any time!
0099  */
0100 typedef void (*prte_errmgr_base_module_log_fn_t)(int error_code, char *filename, int line);
0101 
0102 /*
0103  * Module Structure
0104  */
0105 struct prte_errmgr_base_module_2_3_0_t {
0106     /** Initialization Function */
0107     prte_errmgr_base_module_init_fn_t init;
0108     /** Finalization Function */
0109     prte_errmgr_base_module_finalize_fn_t finalize;
0110 
0111     prte_errmgr_base_module_log_fn_t logfn;
0112 };
0113 typedef struct prte_errmgr_base_module_2_3_0_t prte_errmgr_base_module_2_3_0_t;
0114 typedef prte_errmgr_base_module_2_3_0_t prte_errmgr_base_module_t;
0115 PRTE_EXPORT extern prte_errmgr_base_module_t prte_errmgr;
0116 
0117 /*
0118  * ErrMgr Component
0119  */
0120 struct prte_errmgr_base_component_3_0_0_t {
0121     /** MCA base component */
0122     pmix_mca_base_component_t base_version;
0123 
0124     /** Verbosity Level */
0125     int verbose;
0126     /** Output Handle for pmix_output */
0127     int output_handle;
0128     /** Default Priority */
0129     int priority;
0130 };
0131 typedef struct prte_errmgr_base_component_3_0_0_t prte_errmgr_base_component_3_0_0_t;
0132 typedef prte_errmgr_base_component_3_0_0_t prte_errmgr_base_component_t;
0133 
0134 /*
0135  * Macro for use in components that are of type errmgr
0136  */
0137 #define PRTE_ERRMGR_BASE_VERSION_3_0_0 PRTE_MCA_BASE_VERSION_3_0_0("errmgr", 3, 0, 0)
0138 
0139 END_C_DECLS
0140 
0141 #endif