SCALE-RM
|
#include <stdlib.h>
#include "rdma.h"
#include <mpi.h>
#include <mpi-ext.h>
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | WEST 0 |
#define | NORTH 1 |
#define | EAST 2 |
#define | SOUTH 3 |
#define | BEARING_CNT 4 |
#define | offset(Z, X, Y) (sizeof(var_t)*((Z)+(X)*(KA)+(Y)*(KA)*(IA))) |
#define | RDMA_TAG_NUM_MAX 15 |
#define | RDMA_TAG 0 |
#define | RDMA_TAG_TAIL 1 |
#define | LOCAL_RECV_READY 0 |
#define | REMOTE_RECV_READY 1 |
#define | LOCAL_PUT_DONE 2 |
#define | REMOTE_PUT_DONE 3 |
#define | LOCAL_RECV_DONE 3 |
#define | FLAG_CNT 4 |
#define | sidx(DIR, FLAG) ((DIR)+(BEARING_CNT)*(FLAG)) |
#define | soffset(DIR, FLAG) (sizeof(sf_t)*sidx(DIR,FLAG)) |
#define | FALSE 0 |
#define | TRUE 1 |
#define | RDMA_PUT_ID_MAX 0xFFFFFFFF |
#define | FJMPI_RDMA_PUT_FLAGS_TO_NORTH (FJMPI_RDMA_LOCAL_NIC0 | FJMPI_RDMA_REMOTE_NIC2 | FJMPI_RDMA_PATH0 ) |
#define | FJMPI_RDMA_PUT_FLAGS_TO_SOUTH (FJMPI_RDMA_LOCAL_NIC2 | FJMPI_RDMA_REMOTE_NIC0 | FJMPI_RDMA_PATH0 ) |
#define | FJMPI_RDMA_PUT_FLAGS_TO_EAST (FJMPI_RDMA_LOCAL_NIC3 | FJMPI_RDMA_REMOTE_NIC1 | FJMPI_RDMA_PATH0 ) |
#define | FJMPI_RDMA_PUT_FLAGS_TO_WEST (FJMPI_RDMA_LOCAL_NIC1 | FJMPI_RDMA_REMOTE_NIC3 | FJMPI_RDMA_PATH0 ) |
Typedefs | |
typedef uint64_t | sf_t |
Functions | |
void | rdma_setup_ (const int32_t *COMM_vsize_max_in, const int32_t *IA_in, const int32_t *JA_in, const int32_t *KA_in, const int32_t *IHALO_in, const int32_t *JHALO_in, const int32_t *IS_in, const int32_t *IE_in, const int32_t *JS_in, const int32_t *JE_in, const int32_t *RANK_W_in, const int32_t *RANK_N_in, const int32_t *RANK_E_in, const int32_t *RANK_S_in) |
void | set_rdma_variable_ (const var_t *var, const int32_t *vid) |
void | rdma_put_ (const int32_t *vid, const int32_t *num) |
void | rdma_put8_ (const int32_t *vid, const int32_t *num) |
Variables | |
int32_t | COMM_vsize_max |
int32_t | IA |
int32_t | JA |
int32_t | KA |
int32_t | IHALO |
int32_t | JHALO |
int32_t | IS |
int32_t | IE |
int32_t | JS |
int32_t | JE |
size_t | datasize_NS |
size_t | datasize_WE |
int32_t | RANK_W |
int32_t | RANK_N |
int32_t | RANK_E |
int32_t | RANK_S |
int32_t | memid_cnt |
int32_t * | memid |
uint64_t * | lvar |
uint64_t ** | rvar |
volatile sf_t * | status_flag |
int32_t | memid_sf |
uint64_t | local_sf |
uint64_t * | remote_sf |
int64_t * | sending |
volatile sf_t | rdma_put_id |
#define WEST 0 |
Private parameters & variables
Definition at line 14 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
#define NORTH 1 |
Definition at line 15 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
#define EAST 2 |
Definition at line 16 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
#define SOUTH 3 |
Definition at line 17 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
#define BEARING_CNT 4 |
Definition at line 18 of file scale_rdma.c.
Referenced by rdma_setup_().
Definition at line 25 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define RDMA_TAG_NUM_MAX 15 |
Definition at line 31 of file scale_rdma.c.
#define RDMA_TAG 0 |
Definition at line 32 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define RDMA_TAG_TAIL 1 |
Definition at line 33 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define LOCAL_RECV_READY 0 |
Definition at line 47 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define REMOTE_RECV_READY 1 |
Definition at line 48 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define LOCAL_PUT_DONE 2 |
Definition at line 49 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define REMOTE_PUT_DONE 3 |
Definition at line 50 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define LOCAL_RECV_DONE 3 |
Definition at line 51 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define FLAG_CNT 4 |
Definition at line 52 of file scale_rdma.c.
Referenced by rdma_setup_().
#define sidx | ( | DIR, | |
FLAG | |||
) | ((DIR)+(BEARING_CNT)*(FLAG)) |
Definition at line 53 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
Definition at line 54 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define FALSE 0 |
Definition at line 57 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define TRUE 1 |
Definition at line 58 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define RDMA_PUT_ID_MAX 0xFFFFFFFF |
Definition at line 62 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define FJMPI_RDMA_PUT_FLAGS_TO_NORTH (FJMPI_RDMA_LOCAL_NIC0 | FJMPI_RDMA_REMOTE_NIC2 | FJMPI_RDMA_PATH0 ) |
Definition at line 65 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define FJMPI_RDMA_PUT_FLAGS_TO_SOUTH (FJMPI_RDMA_LOCAL_NIC2 | FJMPI_RDMA_REMOTE_NIC0 | FJMPI_RDMA_PATH0 ) |
Definition at line 66 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define FJMPI_RDMA_PUT_FLAGS_TO_EAST (FJMPI_RDMA_LOCAL_NIC3 | FJMPI_RDMA_REMOTE_NIC1 | FJMPI_RDMA_PATH0 ) |
Definition at line 67 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
#define FJMPI_RDMA_PUT_FLAGS_TO_WEST (FJMPI_RDMA_LOCAL_NIC1 | FJMPI_RDMA_REMOTE_NIC3 | FJMPI_RDMA_PATH0 ) |
Definition at line 68 of file scale_rdma.c.
Referenced by rdma_put8_(), and rdma_put_().
typedef uint64_t sf_t |
Definition at line 42 of file scale_rdma.c.
void rdma_setup_ | ( | const int32_t * | COMM_vsize_max_in, |
const int32_t * | IA_in, | ||
const int32_t * | JA_in, | ||
const int32_t * | KA_in, | ||
const int32_t * | IHALO_in, | ||
const int32_t * | JHALO_in, | ||
const int32_t * | IS_in, | ||
const int32_t * | IE_in, | ||
const int32_t * | JS_in, | ||
const int32_t * | JE_in, | ||
const int32_t * | RANK_W_in, | ||
const int32_t * | RANK_N_in, | ||
const int32_t * | RANK_E_in, | ||
const int32_t * | RANK_S_in | ||
) |
Definition at line 72 of file scale_rdma.c.
References BEARING_CNT, COMM_vsize_max, datasize_NS, datasize_WE, EAST, FLAG_CNT, IA, IE, IHALO, IS, JA, JE, JHALO, JS, KA, local_sf, lvar, memid, memid_cnt, memid_sf, NORTH, RANK_E, RANK_N, RANK_S, RANK_W, rdma_put_id, remote_sf, rvar, sending, SOUTH, status_flag, mod_atmos_vars::v, and WEST.
void set_rdma_variable_ | ( | const var_t * | var, |
const int32_t * | vid | ||
) |
Definition at line 153 of file scale_rdma.c.
References EAST, IA, JA, KA, lvar, memid, memid_cnt, NORTH, RANK_E, RANK_N, RANK_S, RANK_W, rvar, SOUTH, and WEST.
void rdma_put_ | ( | const int32_t * | vid, |
const int32_t * | num | ||
) |
Definition at line 173 of file scale_rdma.c.
References datasize_NS, datasize_WE, EAST, FALSE, FJMPI_RDMA_PUT_FLAGS_TO_EAST, FJMPI_RDMA_PUT_FLAGS_TO_NORTH, FJMPI_RDMA_PUT_FLAGS_TO_SOUTH, FJMPI_RDMA_PUT_FLAGS_TO_WEST, IE, IHALO, IS, JE, JHALO, JS, LOCAL_PUT_DONE, LOCAL_RECV_DONE, LOCAL_RECV_READY, local_sf, lvar, NORTH, offset, RANK_E, RANK_N, RANK_S, RANK_W, rdma_put_id, RDMA_PUT_ID_MAX, RDMA_TAG, RDMA_TAG_TAIL, REMOTE_PUT_DONE, REMOTE_RECV_READY, remote_sf, rvar, sending, sidx, soffset, SOUTH, status_flag, TRUE, mod_atmos_vars::v, and WEST.
void rdma_put8_ | ( | const int32_t * | vid, |
const int32_t * | num | ||
) |
Definition at line 396 of file scale_rdma.c.
References datasize_NS, datasize_WE, EAST, FALSE, FJMPI_RDMA_PUT_FLAGS_TO_EAST, FJMPI_RDMA_PUT_FLAGS_TO_NORTH, FJMPI_RDMA_PUT_FLAGS_TO_SOUTH, FJMPI_RDMA_PUT_FLAGS_TO_WEST, IE, IHALO, IS, JE, JHALO, JS, LOCAL_PUT_DONE, LOCAL_RECV_DONE, LOCAL_RECV_READY, local_sf, lvar, NORTH, offset, RANK_E, RANK_N, RANK_S, RANK_W, rdma_put_id, RDMA_PUT_ID_MAX, RDMA_TAG, RDMA_TAG_TAIL, REMOTE_PUT_DONE, REMOTE_RECV_READY, remote_sf, rvar, sending, sidx, soffset, SOUTH, status_flag, TRUE, mod_atmos_vars::v, and WEST.
int32_t COMM_vsize_max |
Definition at line 20 of file scale_rdma.c.
Referenced by rdma_setup_().
int32_t IA |
Definition at line 22 of file scale_rdma.c.
Referenced by rdma_setup_(), and set_rdma_variable_().
int32_t JA |
Definition at line 22 of file scale_rdma.c.
Referenced by rdma_setup_(), and set_rdma_variable_().
int32_t KA |
Definition at line 22 of file scale_rdma.c.
Referenced by rdma_setup_(), and set_rdma_variable_().
int32_t IHALO |
Definition at line 23 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
int32_t JHALO |
Definition at line 23 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
int32_t IS |
Definition at line 24 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
int32_t IE |
Definition at line 24 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
int32_t JS |
Definition at line 24 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
int32_t JE |
Definition at line 24 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
size_t datasize_NS |
Definition at line 27 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
size_t datasize_WE |
Definition at line 27 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
int32_t RANK_W |
Definition at line 29 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
int32_t RANK_N |
Definition at line 29 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
int32_t RANK_E |
Definition at line 29 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
int32_t RANK_S |
Definition at line 29 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
int32_t memid_cnt |
Definition at line 35 of file scale_rdma.c.
Referenced by rdma_setup_(), and set_rdma_variable_().
int32_t* memid |
Definition at line 37 of file scale_rdma.c.
Referenced by rdma_setup_(), and set_rdma_variable_().
uint64_t* lvar |
Definition at line 38 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
uint64_t** rvar |
Definition at line 39 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), rdma_setup_(), and set_rdma_variable_().
volatile sf_t* status_flag |
Definition at line 43 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
int32_t memid_sf |
Definition at line 44 of file scale_rdma.c.
Referenced by rdma_setup_().
uint64_t local_sf |
Definition at line 45 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
uint64_t* remote_sf |
Definition at line 46 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
int64_t* sending |
Definition at line 56 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().
volatile sf_t rdma_put_id |
Definition at line 61 of file scale_rdma.c.
Referenced by rdma_put8_(), rdma_put_(), and rdma_setup_().