Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
0002 /*
0003  * Copyright (c) 2007-2008 Cisco Systems, Inc.  All rights reserved.
0004  *
0005  * Copyright (c) 2015-2018 Research Organization for Information Science
0006  *                         and Technology (RIST). All rights reserved.
0007  * Copyright (c) 2018-2020 Intel, Inc.  All rights reserved.
0008  * Copyright (c) 2021-2023 Nanook Consulting.  All rights reserved.
0009  * $COPYRIGHT$
0010  *
0011  * Additional copyrights may follow
0012  *
0013  * $HEADER$
0014  */
0015 
0016 /**
0017  * @file
0018  *
0019  * This interface is for use by PMIx servers to interpret/translate/interact
0020  * from/to/with their host environment
0021  *
0022  * Available plugins may be defined at runtime via the typical MCA parameter
0023  * syntax.
0024  */
0025 
0026 #ifndef PMIX_PRM_H
0027 #define PMIX_PRM_H
0028 
0029 #include "src/include/pmix_config.h"
0030 #include "pmix_common.h"
0031 
0032 #include "src/class/pmix_list.h"
0033 #include "src/include/pmix_globals.h"
0034 #include "src/mca/base/pmix_mca_base_framework.h"
0035 #include "src/mca/base/pmix_mca_base_var.h"
0036 #include "src/mca/mca.h"
0037 #include "src/server/pmix_server_ops.h"
0038 
0039 BEGIN_C_DECLS
0040 
0041 /******    MODULE DEFINITION    ******/
0042 
0043 /**
0044  * Initialize the module. Returns an error if the module cannot
0045  * run, success if it can and wants to be used.
0046  */
0047 typedef pmix_status_t (*pmix_prm_base_module_init_fn_t)(void);
0048 
0049 /**
0050  * Finalize the module. Tear down any allocated storage, disconnect
0051  * from any system support (e.g., LDAP server)
0052  */
0053 typedef void (*pmix_prm_base_module_fini_fn_t)(void);
0054 
0055 /**
0056  * Allocate, deallocate, modify allocation request
0057  */
0058 typedef pmix_status_t (*pmix_prm_base_module_alloc_fn_t)(pmix_alloc_directive_t directive,
0059                                                          pmix_info_t *info, size_t ninfo,
0060                                                          pmix_info_t **results, size_t *nresults);
0061 
0062 
0063 /**
0064  * Pass an event to the host system for transport. If the host system
0065  * has called PMIx_server_init and provided an entry for the event
0066  * notification upcall, then the default plugin will execute that
0067  * pathway. However, some systems have chosen to utilize a "backdoor"
0068  * channel for transporting the event - e.g., by calling some RM-provided
0069  * API to inject the event into their transport.
0070  */
0071 typedef pmix_status_t (*pmix_prm_base_module_notify_fn_t)(pmix_status_t status,
0072                                                           const pmix_proc_t *source,
0073                                                           pmix_data_range_t range,
0074                                                           const pmix_info_t info[], size_t ninfo,
0075                                                           pmix_op_cbfunc_t cbfunc, void *cbdata);
0076 
0077 /* request time remaining in this allocation */
0078 typedef pmix_status_t (*pmix_prm_base_module_get_rem_time_fn_t)(uint32_t *timeleft);
0079 
0080 /**
0081  * Base structure for a PRM module. Each component should malloc a
0082  * copy of the module structure for each fabric plane they support.
0083  */
0084 typedef struct {
0085     char *name;
0086     /* init/finalize */
0087     pmix_prm_base_module_init_fn_t                 init;
0088     pmix_prm_base_module_fini_fn_t                 finalize;
0089     pmix_prm_base_module_alloc_fn_t                allocate;
0090     pmix_prm_base_module_notify_fn_t               notify;
0091     pmix_prm_base_module_get_rem_time_fn_t         get_remaining_time;
0092 } pmix_prm_module_t;
0093 
0094 
0095 /* declare the global APIs */
0096 PMIX_EXPORT extern pmix_prm_module_t pmix_prm;
0097 
0098 /*
0099  * the standard component data structure
0100  */
0101 typedef pmix_mca_base_component_t pmix_prm_base_component_t;
0102 
0103 /*
0104  * Macro for use in components that are of type prm
0105  */
0106 #define PMIX_PRM_BASE_VERSION_1_0_0 PMIX_MCA_BASE_VERSION_1_0_0("prm", 1, 0, 0)
0107 
0108 END_C_DECLS
0109 
0110 #endif