Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 10:12:53

0001 /* -*- C -*-
0002  *
0003  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
0004  *                         University Research and Technology
0005  *                         Corporation.  All rights reserved.
0006  * Copyright (c) 2004-2006 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) 2012      Los Alamos National Security, Inc.  All rights reserved.
0014  * Copyright (c) 2014-2020 Intel, Inc.  All rights reserved.
0015  * Copyright (c) 2015-2020 Research Organization for Information Science
0016  *                         and Technology (RIST).  All rights reserved.
0017  * Copyright (c) 2021      Nanook Consulting.  All rights reserved.
0018  * $COPYRIGHT$
0019  *
0020  * Additional copyrights may follow
0021  *
0022  * $HEADER$
0023  *
0024  */
0025 #ifndef PMIX_PNET_BASE_H_
0026 #define PMIX_PNET_BASE_H_
0027 
0028 #include "src/include/pmix_config.h"
0029 
0030 #ifdef HAVE_SYS_TIME_H
0031 #    include <sys/time.h> /* for struct timeval */
0032 #endif
0033 #ifdef HAVE_STRING_H
0034 #    include <string.h>
0035 #endif
0036 
0037 #include "src/class/pmix_list.h"
0038 #include "src/class/pmix_pointer_array.h"
0039 #include "src/mca/base/pmix_mca_base_framework.h"
0040 #include "src/mca/mca.h"
0041 
0042 #include "src/mca/pnet/pnet.h"
0043 
0044 BEGIN_C_DECLS
0045 
0046 /*
0047  * MCA Framework
0048  */
0049 PMIX_EXPORT extern pmix_mca_base_framework_t pmix_pnet_base_framework;
0050 /**
0051  * PNET select function
0052  *
0053  * Cycle across available components and construct the list
0054  * of active modules
0055  */
0056 PMIX_EXPORT pmix_status_t pmix_pnet_base_select(void);
0057 
0058 /**
0059  * Track an active component / module
0060  */
0061 struct pmix_pnet_base_active_module_t {
0062     pmix_list_item_t super;
0063     int pri;
0064     pmix_pnet_module_t *module;
0065     pmix_pnet_base_component_t *component;
0066 };
0067 typedef struct pmix_pnet_base_active_module_t pmix_pnet_base_active_module_t;
0068 PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_pnet_base_active_module_t);
0069 
0070 typedef struct {
0071     pmix_list_item_t super;
0072     char *name;
0073     size_t index;
0074     /* provide access to the component
0075      * APIs that are managing this
0076      * fabric plane */
0077     pmix_pnet_module_t *module;
0078     /* allow the component to add
0079      * whatever structures it needs */
0080     void *payload;
0081 } pmix_pnet_fabric_t;
0082 PMIX_EXPORT PMIX_CLASS_DECLARATION(pmix_pnet_fabric_t);
0083 
0084 /* framework globals */
0085 struct pmix_pnet_globals_t {
0086     pmix_list_t actives;
0087     pmix_list_t fabrics;
0088     pmix_list_t nspaces;
0089     bool selected;
0090 };
0091 typedef struct pmix_pnet_globals_t pmix_pnet_globals_t;
0092 
0093 PMIX_EXPORT extern pmix_pnet_globals_t pmix_pnet_globals;
0094 
0095 PMIX_EXPORT pmix_status_t pmix_pnet_base_allocate(char *nspace, pmix_info_t info[], size_t ninfo,
0096                                                   pmix_list_t *ilist);
0097 PMIX_EXPORT pmix_status_t pmix_pnet_base_setup_local_network(char *nspace, pmix_info_t info[],
0098                                                              size_t ninfo);
0099 PMIX_EXPORT pmix_status_t pmix_pnet_base_setup_fork(const pmix_proc_t *peer, char ***env);
0100 PMIX_EXPORT void pmix_pnet_base_child_finalized(pmix_proc_t *peer);
0101 PMIX_EXPORT void pmix_pnet_base_local_app_finalized(pmix_namespace_t *nptr);
0102 PMIX_EXPORT void pmix_pnet_base_deregister_nspace(char *nspace);
0103 PMIX_EXPORT pmix_status_t pmix_pnet_base_collect_inventory(pmix_info_t directives[], size_t ndirs,
0104                                                            pmix_list_t *inventory);
0105 PMIX_EXPORT pmix_status_t pmix_pnet_base_deliver_inventory(pmix_info_t info[], size_t ninfo,
0106                                                            pmix_info_t directives[], size_t ndirs);
0107 PMIX_EXPORT pmix_status_t pmix_pnet_base_harvest_envars(char **incvars, char **excvars,
0108                                                         pmix_list_t *ilist);
0109 
0110 PMIX_EXPORT pmix_status_t pmix_pnet_base_register_fabric(pmix_fabric_t *fabric,
0111                                                          const pmix_info_t directives[],
0112                                                          size_t ndirs, pmix_op_cbfunc_t cbfunc,
0113                                                          void *cbdata);
0114 PMIX_EXPORT pmix_status_t pmix_pnet_base_deregister_fabric(pmix_fabric_t *fabric);
0115 PMIX_EXPORT pmix_status_t pmix_pnet_base_update_fabric(pmix_fabric_t *fabric);
0116 
0117 END_C_DECLS
0118 
0119 #endif