File: pml_yalla.h

package info (click to toggle)
openmpi 2.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 99,912 kB
  • ctags: 55,589
  • sloc: ansic: 525,999; f90: 18,307; makefile: 12,062; sh: 6,583; java: 6,278; asm: 3,515; cpp: 2,227; perl: 2,136; python: 1,350; lex: 734; fortran: 52; tcl: 12
file content (150 lines) | stat: -rw-r--r-- 5,608 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
 * Copyright (C) Mellanox Technologies Ltd. 2001-2011.  ALL RIGHTS RESERVED.
 * $COPYRIGHT$
 *
 * Additional copyrights may follow
 *
 * $HEADER$
 */

#ifndef PML_YALLA_H_
#define PML_YALLA_H_

#include "pml_yalla_freelist.h"

#include "ompi_config.h"
#include "ompi/request/request.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/mca/pml/base/base.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/communicator/communicator.h"
#include "ompi/request/request.h"

#include <mxm/api/mxm_api.h>

typedef struct mca_pml_yalla_module    mca_pml_yalla_module_t;
typedef struct pml_yalla_base_request  mca_pml_yalla_base_request_t;
typedef struct pml_yalla_send_request  mca_pml_yalla_send_request_t;
typedef struct pml_yalla_bsend_request mca_pml_yalla_bsend_request_t;
typedef struct pml_yalla_recv_request  mca_pml_yalla_recv_request_t;
typedef struct pml_yalla_convertor     mca_pml_yalla_convertor_t;

#if MXM_API < MXM_VERSION(2,0)
#  error "MXM 2.0 or above is required"
#endif

struct mca_pml_yalla_module {
    mca_pml_base_module_t    super;

    /* MXM global objects */
    mxm_context_opts_t       *ctx_opts;
    mxm_ep_opts_t            *ep_opts;
    mxm_h                    mxm_context;
    mxm_ep_h                 mxm_ep;

    /* MXM requests */
    mca_pml_yalla_freelist_t send_reqs;
    mca_pml_yalla_freelist_t bsend_reqs;
    mca_pml_yalla_freelist_t recv_reqs;

    /* Convertors pool */
    mca_pml_yalla_freelist_t convs;

    int                      using_mem_hooks;
    int                      priority;
    int                      verbose;
    int                      output;
};

extern mca_pml_base_component_2_0_0_t mca_pml_yalla_component;
extern mca_pml_yalla_module_t ompi_pml_yalla;


/* Debugging */
#define PML_YALLA_ENABLE_DEBUG OPAL_ENABLE_DEBUG
#if PML_YALLA_ENABLE_DEBUG
#  define PML_YALLA_MAX_VERBOSE  9
#  define PML_YALLA_ASSERT(_x)   assert(_x)
#else
#  define PML_YALLA_MAX_VERBOSE  2
#  define PML_YALLA_ASSERT(_x)
#endif


#define PML_YALLA_ERROR(format, ... ) \
    opal_output_verbose(0, ompi_pml_yalla.output, "Error: %s:%d - %s() " format, \
                        __FILE__, __LINE__, __FUNCTION__, ## __VA_ARGS__)

#define PML_YALLA_VERBOSE(_level, format, ... ) \
    if (((_level) <= PML_YALLA_MAX_VERBOSE) && ((_level) <= ompi_pml_yalla.verbose)) { \
        opal_output_verbose(_level, ompi_pml_yalla.output, "%s:%d - %s() " format, \
                            __FILE__, __LINE__, __FUNCTION__, ## __VA_ARGS__); \
    }

int mca_pml_yalla_open(void);
int mca_pml_yalla_close(void);
int mca_pml_yalla_init(void);
int mca_pml_yalla_cleanup(void);

int mca_pml_yalla_add_procs(struct ompi_proc_t **procs, size_t nprocs);
int mca_pml_yalla_del_procs(struct ompi_proc_t **procs, size_t nprocs);

int mca_pml_yalla_enable(bool enable);
int mca_pml_yalla_progress(void);

int mca_pml_yalla_add_comm(struct ompi_communicator_t* comm);
int mca_pml_yalla_del_comm(struct ompi_communicator_t* comm);

int mca_pml_yalla_irecv_init(void *buf, size_t count, ompi_datatype_t *datatype,
                             int src, int tag, struct ompi_communicator_t* comm,
                             struct ompi_request_t **request);

int mca_pml_yalla_irecv(void *buf, size_t count, ompi_datatype_t *datatype,
                        int src, int tag, struct ompi_communicator_t* comm,
                        struct ompi_request_t **request);

int mca_pml_yalla_recv(void *buf, size_t count, ompi_datatype_t *datatype, int src,
                       int tag, struct ompi_communicator_t* comm,
                       ompi_status_public_t* status);

int mca_pml_yalla_isend_init(const void *buf, size_t count, ompi_datatype_t *datatype,
                             int dst, int tag, mca_pml_base_send_mode_t mode,
                             struct ompi_communicator_t* comm,
                             struct ompi_request_t **request);

int mca_pml_yalla_isend(const void *buf, size_t count, ompi_datatype_t *datatype,
                        int dst, int tag, mca_pml_base_send_mode_t mode,
                        struct ompi_communicator_t* comm,
                        struct ompi_request_t **request);

int mca_pml_yalla_send(const void *buf, size_t count, ompi_datatype_t *datatype, int dst,
                       int tag, mca_pml_base_send_mode_t mode,
                       struct ompi_communicator_t* comm);

int mca_pml_yalla_iprobe(int src, int tag, struct ompi_communicator_t* comm,
                         int *matched, ompi_status_public_t* status);

int mca_pml_yalla_probe(int src, int tag, struct ompi_communicator_t* comm,
                        ompi_status_public_t* status);

int mca_pml_yalla_improbe(int src, int tag, struct ompi_communicator_t* comm,
                          int *matched, struct ompi_message_t **message,
                          ompi_status_public_t* status);

int mca_pml_yalla_mprobe(int src, int tag, struct ompi_communicator_t* comm,
                         struct ompi_message_t **message,
                         ompi_status_public_t* status);

int mca_pml_yalla_imrecv(void *buf, size_t count, ompi_datatype_t *datatype,
                         struct ompi_message_t **message,
                         struct ompi_request_t **request);

int mca_pml_yalla_mrecv(void *buf, size_t count, ompi_datatype_t *datatype,
                        struct ompi_message_t **message,
                        ompi_status_public_t* status);

int mca_pml_yalla_start(size_t count, ompi_request_t** requests);

int mca_pml_yalla_dump(struct ompi_communicator_t* comm, int verbose);

#endif /* PML_YALLA_H_ */