1 /*
2  * Copyright (C) by Argonne National Laboratory
3  *     See COPYRIGHT in top-level directory
4  */
5 
6 #include "mpl.h"
7 
8 MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
9 
10 #ifndef NETMOD_INLINE
11 #define NETMOD_DISABLE_INLINES
12 #include <mpidimpl.h>
13 #include "netmod_inline.h"
14 MPIDI_NM_funcs_t MPIDI_NM_ucx_funcs = {
15     .mpi_init = MPIDI_UCX_mpi_init_hook,
16     .mpi_finalize = MPIDI_UCX_mpi_finalize_hook,
17     .post_init = MPIDI_UCX_post_init,
18     .progress = MPIDI_UCX_progress,
19     .mpi_comm_connect = MPIDI_UCX_mpi_comm_connect,
20     .mpi_comm_disconnect = MPIDI_UCX_mpi_comm_disconnect,
21     .mpi_open_port = MPIDI_UCX_mpi_open_port,
22     .mpi_close_port = MPIDI_UCX_mpi_close_port,
23     .mpi_comm_accept = MPIDI_UCX_mpi_comm_accept,
24     /* Routines that handle addressing */
25     .comm_get_lpid = MPIDI_NM_comm_get_lpid,
26     .get_local_upids = MPIDI_UCX_get_local_upids,
27     .get_vci_attr = MPIDI_UCX_get_vci_attr,
28     .upids_to_lupids = MPIDI_UCX_upids_to_lupids,
29     .create_intercomm_from_lpids = MPIDI_UCX_create_intercomm_from_lpids,
30     .mpi_comm_commit_pre_hook = MPIDI_UCX_mpi_comm_commit_pre_hook,
31     .mpi_comm_commit_post_hook = MPIDI_UCX_mpi_comm_commit_post_hook,
32     .mpi_comm_free_hook = MPIDI_UCX_mpi_comm_free_hook,
33     /* Window initialization/cleanup routines */
34     .mpi_win_create_hook = MPIDI_UCX_mpi_win_create_hook,
35     .mpi_win_allocate_hook = MPIDI_UCX_mpi_win_allocate_hook,
36     .mpi_win_allocate_shared_hook = MPIDI_UCX_mpi_win_allocate_shared_hook,
37     .mpi_win_create_dynamic_hook = MPIDI_UCX_mpi_win_create_dynamic_hook,
38     .mpi_win_attach_hook = MPIDI_UCX_mpi_win_attach_hook,
39     .mpi_win_detach_hook = MPIDI_UCX_mpi_win_detach_hook,
40     .mpi_win_free_hook = MPIDI_UCX_mpi_win_free_hook,
41     /* RMA synchronization routines */
42     .rma_win_cmpl_hook = MPIDI_NM_rma_win_cmpl_hook,
43     .rma_win_local_cmpl_hook = MPIDI_NM_rma_win_local_cmpl_hook,
44     .rma_target_cmpl_hook = MPIDI_NM_rma_target_cmpl_hook,
45     .rma_target_local_cmpl_hook = MPIDI_NM_rma_target_local_cmpl_hook,
46     /* Request initialization/cleanup routines */
47     .am_request_init = MPIDI_NM_am_request_init,
48     .am_request_finalize = MPIDI_NM_am_request_finalize,
49     /* Active Message Routines */
50     .am_send_hdr = MPIDI_NM_am_send_hdr,
51     .am_isend = MPIDI_NM_am_isend,
52     .am_isendv = MPIDI_NM_am_isendv,
53     .am_send_hdr_reply = MPIDI_NM_am_send_hdr_reply,
54     .am_isend_reply = MPIDI_NM_am_isend_reply,
55     .am_hdr_max_sz = MPIDI_NM_am_hdr_max_sz,
56     .am_eager_limit = MPIDI_NM_am_eager_limit,
57     .am_eager_buf_limit = MPIDI_NM_am_eager_buf_limit
58 };
59 
60 MPIDI_NM_native_funcs_t MPIDI_NM_native_ucx_funcs = {
61     .mpi_send = MPIDI_NM_mpi_send,
62     .send_coll = MPIDI_NM_send_coll,
63     .mpi_ssend = MPIDI_NM_mpi_ssend,
64     .mpi_isend = MPIDI_NM_mpi_isend,
65     .isend_coll = MPIDI_NM_isend_coll,
66     .mpi_issend = MPIDI_NM_mpi_issend,
67     .mpi_cancel_send = MPIDI_NM_mpi_cancel_send,
68     .mpi_recv = MPIDI_NM_mpi_recv,
69     .mpi_irecv = MPIDI_NM_mpi_irecv,
70     .mpi_imrecv = MPIDI_NM_mpi_imrecv,
71     .mpi_cancel_recv = MPIDI_NM_mpi_cancel_recv,
72     .mpi_alloc_mem = MPIDI_UCX_mpi_alloc_mem,
73     .mpi_free_mem = MPIDI_UCX_mpi_free_mem,
74     .mpi_improbe = MPIDI_NM_mpi_improbe,
75     .mpi_iprobe = MPIDI_NM_mpi_iprobe,
76     .mpi_win_set_info = MPIDI_UCX_mpi_win_set_info,
77     .mpi_win_shared_query = MPIDI_NM_mpi_win_shared_query,
78     .mpi_put = MPIDI_NM_mpi_put,
79     .mpi_win_start = MPIDI_NM_mpi_win_start,
80     .mpi_win_complete = MPIDI_NM_mpi_win_complete,
81     .mpi_win_post = MPIDI_NM_mpi_win_post,
82     .mpi_win_wait = MPIDI_NM_mpi_win_wait,
83     .mpi_win_test = MPIDI_NM_mpi_win_test,
84     .mpi_win_lock = MPIDI_NM_mpi_win_lock,
85     .mpi_win_unlock = MPIDI_NM_mpi_win_unlock,
86     .mpi_win_get_info = MPIDI_UCX_mpi_win_get_info,
87     .mpi_get = MPIDI_NM_mpi_get,
88     .mpi_win_free = MPIDI_UCX_mpi_win_free,
89     .mpi_win_fence = MPIDI_NM_mpi_win_fence,
90     .mpi_win_create = MPIDI_UCX_mpi_win_create,
91     .mpi_accumulate = MPIDI_NM_mpi_accumulate,
92     .mpi_win_attach = MPIDI_UCX_mpi_win_attach,
93     .mpi_win_allocate_shared = MPIDI_UCX_mpi_win_allocate_shared,
94     .mpi_rput = MPIDI_NM_mpi_rput,
95     .mpi_win_flush_local = MPIDI_NM_mpi_win_flush_local,
96     .mpi_win_detach = MPIDI_UCX_mpi_win_detach,
97     .mpi_compare_and_swap = MPIDI_NM_mpi_compare_and_swap,
98     .mpi_raccumulate = MPIDI_NM_mpi_raccumulate,
99     .mpi_rget_accumulate = MPIDI_NM_mpi_rget_accumulate,
100     .mpi_fetch_and_op = MPIDI_NM_mpi_fetch_and_op,
101     .mpi_win_allocate = MPIDI_UCX_mpi_win_allocate,
102     .mpi_win_flush = MPIDI_NM_mpi_win_flush,
103     .mpi_win_flush_local_all = MPIDI_NM_mpi_win_flush_local_all,
104     .mpi_win_unlock_all = MPIDI_NM_mpi_win_unlock_all,
105     .mpi_win_create_dynamic = MPIDI_UCX_mpi_win_create_dynamic,
106     .mpi_rget = MPIDI_NM_mpi_rget,
107     .mpi_win_sync = MPIDI_NM_mpi_win_sync,
108     .mpi_win_flush_all = MPIDI_NM_mpi_win_flush_all,
109     .mpi_get_accumulate = MPIDI_NM_mpi_get_accumulate,
110     .mpi_win_lock_all = MPIDI_NM_mpi_win_lock_all,
111     .rank_is_local = MPIDI_NM_rank_is_local,
112     .av_is_local = MPIDI_NM_av_is_local,
113     /* Collectives */
114     .mpi_barrier = MPIDI_NM_mpi_barrier,
115     .mpi_bcast = MPIDI_NM_mpi_bcast,
116     .mpi_allreduce = MPIDI_NM_mpi_allreduce,
117     .mpi_allgather = MPIDI_NM_mpi_allgather,
118     .mpi_allgatherv = MPIDI_NM_mpi_allgatherv,
119     .mpi_scatter = MPIDI_NM_mpi_scatter,
120     .mpi_scatterv = MPIDI_NM_mpi_scatterv,
121     .mpi_gather = MPIDI_NM_mpi_gather,
122     .mpi_gatherv = MPIDI_NM_mpi_gatherv,
123     .mpi_alltoall = MPIDI_NM_mpi_alltoall,
124     .mpi_alltoallv = MPIDI_NM_mpi_alltoallv,
125     .mpi_alltoallw = MPIDI_NM_mpi_alltoallw,
126     .mpi_reduce = MPIDI_NM_mpi_reduce,
127     .mpi_reduce_scatter = MPIDI_NM_mpi_reduce_scatter,
128     .mpi_reduce_scatter_block = MPIDI_NM_mpi_reduce_scatter_block,
129     .mpi_scan = MPIDI_NM_mpi_scan,
130     .mpi_exscan = MPIDI_NM_mpi_exscan,
131     .mpi_neighbor_allgather = MPIDI_NM_mpi_neighbor_allgather,
132     .mpi_neighbor_allgatherv = MPIDI_NM_mpi_neighbor_allgatherv,
133     .mpi_neighbor_alltoall = MPIDI_NM_mpi_neighbor_alltoall,
134     .mpi_neighbor_alltoallv = MPIDI_NM_mpi_neighbor_alltoallv,
135     .mpi_neighbor_alltoallw = MPIDI_NM_mpi_neighbor_alltoallw,
136     .mpi_ineighbor_allgather = MPIDI_NM_mpi_ineighbor_allgather,
137     .mpi_ineighbor_allgatherv = MPIDI_NM_mpi_ineighbor_allgatherv,
138     .mpi_ineighbor_alltoall = MPIDI_NM_mpi_ineighbor_alltoall,
139     .mpi_ineighbor_alltoallv = MPIDI_NM_mpi_ineighbor_alltoallv,
140     .mpi_ineighbor_alltoallw = MPIDI_NM_mpi_ineighbor_alltoallw,
141     .mpi_ibarrier = MPIDI_NM_mpi_ibarrier,
142     .mpi_ibcast = MPIDI_NM_mpi_ibcast,
143     .mpi_iallgather = MPIDI_NM_mpi_iallgather,
144     .mpi_iallgatherv = MPIDI_NM_mpi_iallgatherv,
145     .mpi_iallreduce = MPIDI_NM_mpi_iallreduce,
146     .mpi_ialltoall = MPIDI_NM_mpi_ialltoall,
147     .mpi_ialltoallv = MPIDI_NM_mpi_ialltoallv,
148     .mpi_ialltoallw = MPIDI_NM_mpi_ialltoallw,
149     .mpi_iexscan = MPIDI_NM_mpi_iexscan,
150     .mpi_igather = MPIDI_NM_mpi_igather,
151     .mpi_igatherv = MPIDI_NM_mpi_igatherv,
152     .mpi_ireduce_scatter_block = MPIDI_NM_mpi_ireduce_scatter_block,
153     .mpi_ireduce_scatter = MPIDI_NM_mpi_ireduce_scatter,
154     .mpi_ireduce = MPIDI_NM_mpi_ireduce,
155     .mpi_iscan = MPIDI_NM_mpi_iscan,
156     .mpi_iscatter = MPIDI_NM_mpi_iscatter,
157     .mpi_iscatterv = MPIDI_NM_mpi_iscatterv,
158     /* Datatype hooks */
159     .mpi_type_commit_hook = MPIDI_UCX_mpi_type_commit_hook,
160     .mpi_type_free_hook = MPIDI_UCX_mpi_type_free_hook,
161     /* Op hooks */
162     .mpi_op_commit_hook = MPIDI_UCX_mpi_op_commit_hook,
163     .mpi_op_free_hook = MPIDI_UCX_mpi_op_free_hook,
164 };
165 #endif
166