25 #define offset(Z,X,Y) (sizeof(var_t)*((Z)+(X)*(KA)+(Y)*(KA)*(IA))) 31 #define RDMA_TAG_NUM_MAX 15 33 #define RDMA_TAG_TAIL 1 47 #define LOCAL_RECV_READY 0 48 #define REMOTE_RECV_READY 1 49 #define LOCAL_PUT_DONE 2 50 #define REMOTE_PUT_DONE 3 51 #define LOCAL_RECV_DONE 3 53 #define sidx(DIR,FLAG) ((DIR)+(BEARING_CNT)*(FLAG)) 54 #define soffset(DIR,FLAG) (sizeof(sf_t)*sidx(DIR,FLAG)) 62 #define RDMA_PUT_ID_MAX 0xFFFFFFFF 65 #define FJMPI_RDMA_PUT_FLAGS_TO_NORTH (FJMPI_RDMA_LOCAL_NIC0 | FJMPI_RDMA_REMOTE_NIC2 | FJMPI_RDMA_PATH0 ) 66 #define FJMPI_RDMA_PUT_FLAGS_TO_SOUTH (FJMPI_RDMA_LOCAL_NIC2 | FJMPI_RDMA_REMOTE_NIC0 | FJMPI_RDMA_PATH0 ) 67 #define FJMPI_RDMA_PUT_FLAGS_TO_EAST (FJMPI_RDMA_LOCAL_NIC3 | FJMPI_RDMA_REMOTE_NIC1 | FJMPI_RDMA_PATH0 ) 68 #define FJMPI_RDMA_PUT_FLAGS_TO_WEST (FJMPI_RDMA_LOCAL_NIC1 | FJMPI_RDMA_REMOTE_NIC3 | FJMPI_RDMA_PATH0 ) 73 const int32_t *COMM_vsize_max_in,
77 const int32_t *IHALO_in,
78 const int32_t *JHALO_in,
83 const int32_t *RANK_W_in,
84 const int32_t *RANK_N_in,
85 const int32_t *RANK_E_in,
86 const int32_t *RANK_S_in)
118 sending = (int64_t *) calloc(BEARING_CNT,
sizeof(int64_t)) ;
128 MPI_Barrier(MPI_COMM_WORLD) ;
130 if(
RANK_W != MPI_PROC_NULL )
135 if(
RANK_N != MPI_PROC_NULL )
140 if(
RANK_E != MPI_PROC_NULL )
145 if(
RANK_S != MPI_PROC_NULL )
163 MPI_Barrier(MPI_COMM_WORLD) ;
175 struct FJMPI_Rdma_cq cq ;
186 if(
RANK_S != MPI_PROC_NULL )
193 if(
RANK_N != MPI_PROC_NULL )
200 if(
RANK_E != MPI_PROC_NULL )
207 if(
RANK_W != MPI_PROC_NULL )
230 for(v=0; v<*num; v++)
232 for(j=0; j<
JHALO; j++)
265 for(v=0; v<*num; v++)
267 for(j=0; j<
JHALO; j++)
300 for(v=0; v<*num; v++)
302 for(j=
JS-1; j<
JE; j++)
335 for(v=0; v<*num; v++)
337 for(j=
JS-1; j<
JE; j++)
363 if(
RANK_W != MPI_PROC_NULL ) {
364 while(FJMPI_Rdma_poll_cq(FJMPI_RDMA_NIC1, &cq) == FJMPI_RDMA_NOTICE ) {
369 if(
RANK_E != MPI_PROC_NULL ) {
370 while(FJMPI_Rdma_poll_cq(FJMPI_RDMA_NIC3, &cq) == FJMPI_RDMA_NOTICE ) {
375 if(
RANK_N != MPI_PROC_NULL ) {
376 while(FJMPI_Rdma_poll_cq(FJMPI_RDMA_NIC0, &cq) == FJMPI_RDMA_NOTICE ) {
381 if(
RANK_S != MPI_PROC_NULL ) {
382 while(FJMPI_Rdma_poll_cq(FJMPI_RDMA_NIC2, &cq) == FJMPI_RDMA_NOTICE ) {
398 struct FJMPI_Rdma_cq cq ;
409 if(
RANK_S != MPI_PROC_NULL )
416 if(
RANK_N != MPI_PROC_NULL )
423 if(
RANK_E != MPI_PROC_NULL )
430 if(
RANK_W != MPI_PROC_NULL )
452 for(v=0; v<*num; v++)
454 for(j=0; j<
JHALO; j++)
487 for(v=0; v<*num; v++)
489 for(j=0; j<
JHALO; j++)
521 for(v=0; v<*num; v++)
523 for(j=
JS-1; j<
JE; j++)
550 for(v=0; v<*num; v++)
552 for(j=
JS-1; j<
JE; j++)
579 for(v=0; v<*num; v++)
582 if(
RANK_N != MPI_PROC_NULL ) {
583 if(
RANK_W != MPI_PROC_NULL &&
RANK_E != MPI_PROC_NULL ) {
584 for(j=0; j<
JHALO; j++)
598 else if(
RANK_W != MPI_PROC_NULL ) {
599 for(j=0; j<
JHALO; j++)
608 else if(
RANK_E != MPI_PROC_NULL ) {
609 for(j=0; j<
JHALO; j++)
621 if(
RANK_S != MPI_PROC_NULL ) {
622 if(
RANK_W != MPI_PROC_NULL &&
RANK_E != MPI_PROC_NULL ) {
637 else if(
RANK_W != MPI_PROC_NULL ) {
647 else if(
RANK_E != MPI_PROC_NULL ) {
660 if(
RANK_W != MPI_PROC_NULL ) {
668 if(
RANK_E != MPI_PROC_NULL ) {
679 if(
RANK_W != MPI_PROC_NULL ) {
680 while(FJMPI_Rdma_poll_cq(FJMPI_RDMA_NIC1, &cq) == FJMPI_RDMA_NOTICE ) {
685 if(
RANK_E != MPI_PROC_NULL ) {
686 while(FJMPI_Rdma_poll_cq(FJMPI_RDMA_NIC3, &cq) == FJMPI_RDMA_NOTICE ) {
691 if(
RANK_N != MPI_PROC_NULL ) {
692 while(FJMPI_Rdma_poll_cq(FJMPI_RDMA_NIC0, &cq) == FJMPI_RDMA_NOTICE ) {
697 if(
RANK_S != MPI_PROC_NULL ) {
698 while(FJMPI_Rdma_poll_cq(FJMPI_RDMA_NIC2, &cq) == FJMPI_RDMA_NOTICE ) {
volatile sf_t * status_flag
#define REMOTE_RECV_READY
void set_rdma_variable_(const var_t *var, const int32_t *vid)
void rdma_put_(const int32_t *vid, const int32_t *num)
volatile sf_t rdma_put_id
#define soffset(DIR, FLAG)
void rdma_put8_(const int32_t *vid, const int32_t *num)
#define FJMPI_RDMA_PUT_FLAGS_TO_NORTH
real(rp), dimension(:,:,:), allocatable, public v
#define FJMPI_RDMA_PUT_FLAGS_TO_SOUTH
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)
#define FJMPI_RDMA_PUT_FLAGS_TO_WEST
#define FJMPI_RDMA_PUT_FLAGS_TO_EAST