-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.h
More file actions
60 lines (45 loc) · 1.37 KB
/
init.h
File metadata and controls
60 lines (45 loc) · 1.37 KB
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
#ifndef INIT_FI_H
#define INIT_FI_H
#include <mpi.h>
#include <stdint.h>
#include <rdma/fabric.h>
#define TEST_OK 0
#define TEST_ERROR 1
#define TEST_ANY_SOURCE -1
enum {
TEST_EVENT_OK = 0,
TEST_EVENT_ERROR,
TEST_EVENT_NONE,
TEST_EVENT_NOTIMPL
};
#define TEST_FI_PUT_ALIGN 1
#define TEST_FI_GET_ALIGN 1
#define TEST_FLAG_NIL 0
#define TEST_FLAG_WITH_IMM 1
#define TEST_GET_CQ_IND(n, i) ((n > 1) ? (i % n) : 0)
#ifndef FT_FIVERSION
#define FT_FIVERSION FI_VERSION(FI_MAJOR_VERSION,FI_MINOR_VERSION)
#endif
// for RMA ops we want to be able to select fi_writedata, but there is no
// constant in libfabric for this
enum ft_rma_opcodes {
FT_RMA_READ = 1,
FT_RMA_WRITE,
FT_RMA_WRITEDATA,
};
#define MAX_CQ_POLL 8
extern int _test_myrank;
extern int _test_nproc;
int pfi_initialized(void);
void *pfi_init(int rank, int nproc);
int pfi_finalize(void);
int pfi_rdma_put(int proc, uintptr_t laddr, uintptr_t raddr, uint64_t size,
void *ldesc, uint64_t rkey, uint64_t id, uint64_t imm_data,
int flags);
int pfi_rdma_get(int proc, uintptr_t laddr, uintptr_t raddr, uint64_t size,
void *ldesc, uint64_t rkey, uint64_t id, int flags);
int pfi_tx_size_left(int proc);
int pfi_rx_size_left(int proc);
int pfi_get_event(int proc, int max, uint64_t *ids, int *n);
int pfi_get_revent(int proc, int max, uint64_t *ids, uint64_t *imms, int *n);
#endif