Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-01-02 10:02:06

0001 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
0002 /*
0003  * Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
0004  *                         University Research and Technology
0005  *                         Corporation.  All rights reserved.
0006  * Copyright (c) 2004-2005 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) 2011-2016 Los Alamos National Security, LLC. All rights
0014  *                         reserved.
0015  * Copyright (c) 2016-2019 Research Organization for Information Science
0016  *                         and Technology (RIST).  All rights reserved.
0017  * Copyright (c) 2017-2020 Intel, Inc.  All rights reserved.
0018  * Copyright (c) 2020      Cisco Systems, Inc.  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 Group Communications
0029  *
0030  * The PRTE Group Comm framework provides communication services that
0031  * span entire jobs or collections of processes. It is not intended to be
0032  * used for point-to-point communications (the RML does that), nor should
0033  * it be viewed as a high-performance communication channel for large-scale
0034  * data transfers.
0035  */
0036 
0037 #ifndef MCA_GRPCOMM_H
0038 #define MCA_GRPCOMM_H
0039 
0040 /*
0041  * includes
0042  */
0043 
0044 #include "prte_config.h"
0045 #include "constants.h"
0046 #include "types.h"
0047 
0048 #include "src/class/pmix_bitmap.h"
0049 #include "src/class/pmix_list.h"
0050 #include "src/pmix/pmix-internal.h"
0051 #include "src/mca/mca.h"
0052 #include "src/rml/rml_types.h"
0053 
0054 BEGIN_C_DECLS
0055 
0056 typedef struct {
0057     pmix_object_t super;
0058     prte_event_t ev;
0059     pmix_lock_t lock;
0060     pmix_group_operation_t op;
0061     char *grpid;
0062     const pmix_proc_t *procs;
0063     size_t nprocs;
0064     const pmix_info_t *directives;
0065     size_t ndirs;
0066     pmix_info_t *info;
0067     size_t ninfo;
0068     pmix_info_cbfunc_t cbfunc;
0069     void *cbdata;
0070 } prte_pmix_grp_caddy_t;
0071 PMIX_CLASS_DECLARATION(prte_pmix_grp_caddy_t);
0072 
0073 /* define a callback function to be invoked upon
0074  * collective completion */
0075 typedef void (*prte_grpcomm_cbfunc_t)(int status, pmix_data_buffer_t *buf, void *cbdata);
0076 
0077 /*
0078  * Component functions - all MUST be provided!
0079  */
0080 
0081 /* initialize the selected module */
0082 typedef int (*prte_grpcomm_base_module_init_fn_t)(void);
0083 
0084 /* finalize the selected module */
0085 typedef void (*prte_grpcomm_base_module_finalize_fn_t)(void);
0086 
0087 
0088 /* Scalably send a message. */
0089 typedef int (*prte_grpcomm_base_module_xcast_fn_t)(prte_rml_tag_t tag,
0090                                                    pmix_data_buffer_t *msg);
0091 
0092 
0093 /* fence - gather data from all specified procs. Barrier operations
0094  * will provide NULL data.
0095  *
0096  * NOTE: this is a non-blocking call. The callback function
0097  * will be invoked upon completion. */
0098 typedef int (*prte_grpcomm_base_module_fence_fn_t)(const pmix_proc_t procs[], size_t nprocs,
0099                                                    const pmix_info_t info[], size_t ninfo, char *data,
0100                                                    size_t ndata, pmix_modex_cbfunc_t cbfunc, void *cbdata);
0101 
0102 
0103 /* support group operations - this is basically a fence
0104  * operation, but there are enough differences to warrant keeping it
0105  * separate to avoid over-complicating the fence code */
0106 typedef int (*prte_grpcomm_base_module_grp_fn_t)(pmix_group_operation_t op, char *grpid,
0107                                                  const pmix_proc_t procs[], size_t nprocs,
0108                                                  const pmix_info_t directives[], size_t ndirs,
0109                                                  pmix_info_cbfunc_t cbfunc, void *cbdata);
0110 /*
0111  * Ver 4.0
0112  */
0113 typedef struct {
0114     prte_grpcomm_base_module_init_fn_t          init;
0115     prte_grpcomm_base_module_finalize_fn_t      finalize;
0116     /* collective operations */
0117     prte_grpcomm_base_module_xcast_fn_t         xcast;
0118     prte_grpcomm_base_module_fence_fn_t         fence;
0119     prte_grpcomm_base_module_grp_fn_t           group;
0120 } prte_grpcomm_base_module_t;
0121 
0122 /*
0123  * the standard component data structure
0124  */
0125 typedef pmix_mca_base_component_t prte_grpcomm_base_component_t;
0126 
0127 /*
0128  * Macro for use in components that are of type grpcomm v3.0.0
0129  */
0130 #define PRTE_GRPCOMM_BASE_VERSION_4_0_0       \
0131     /* grpcomm v4.0 is chained to MCA v2.0 */ \
0132     PRTE_MCA_BASE_VERSION_3_0_0("grpcomm", 4, 0, 0)
0133 
0134 /* Global structure for accessing grpcomm functions */
0135 PRTE_EXPORT extern prte_grpcomm_base_module_t prte_grpcomm;
0136 
0137 END_C_DECLS
0138 
0139 #endif