SuperLU Distributed 9.0.0
gpu3d
oneside.h
Go to the documentation of this file.
1#ifdef HAVE_NVSHMEM
2#include "mpi.h"
3#include "cuda.h"
4#include "cuda_runtime.h"
5#endif
6
7
8/* ************************************************* */
9/* reuse L and U */
10/* *_nfrecv: totol number of received msg */
11/* d_*: device memory */
12/* h_*: host memory */
13/* d_mynum: number of msg I expected // each thread */
14/* d_mymaskstart: start index point at d_column */
15/* ************************************************ */
16
17extern uint64_t *flag_bc_q;
18extern uint64_t *flag_rd_q;
19extern int *my_flag_bc;
20extern int *my_flag_rd;
21extern int *mystatus;
22extern int *mystatusmod;
23extern int *mystatus_u;
24extern int *mystatusmod_u;
25extern int *d_msgnum;
26extern int *d_status;
27extern int *d_statusmod;
28
29/* ************************************************* */
30/* for block column broadcast */
31/* *_nfrecv: totol number of received msg */
32/* d_*: device memory */
33/* h_*: host memory */
34/* d_mynum: number of msg I expected // each thread */
35/* d_mymaskstart: start index point at d_column */
36/* ************************************************ */
37extern int *d_nfrecv;
38extern int *h_nfrecv;
39extern int *d_colnum;
40extern int *d_mynum;
41extern int *d_mymaskstart;
42extern int *d_mymasklength;
43extern int *d_rownum;
44extern int *d_rowstart;
45
46
47/* ************************************************* */
48/* for block row reduction */
49/* *_nfrecv: totol number of received msg */
50/* d_*: device memory */
51/* h_*: host memory */
52/* d_mynum: number of msg I expected // each thread */
53/* d_mymaskstart: start index point at d_column */
54/* ************************************************ */
55
56extern int *d_nfrecvmod;
57extern int *h_nfrecvmod;
58extern int *d_statusmod;
59extern int *d_colnummod;
60extern int *d_mynummod;
61extern int *d_mymaskstartmod;
62extern int *d_mymasklengthmod;
63extern int *d_recv_cnt;
64extern int *d_flag_mod;
65
66
67/* ************************************************* */
68/* U solve */
69/* ************************************************ */
70extern int *d_nfrecv_u;
71extern int *h_nfrecv_u;
72extern int *d_colnum_u;
73extern int *d_mynum_u;
74extern int *d_mymaskstart_u;
75extern int *d_mymasklength_u;
76extern int *d_rownum_u;
77extern int *d_rowstart_u;
78extern int *d_nfrecvmod_u;
79extern int *h_nfrecvmod_u;
80extern int *d_colnummod_u;
81extern int *d_mynummod_u;
82extern int *d_mymaskstartmod_u;
83extern int *d_mymasklengthmod_u;
84extern int *d_recv_cnt_u;
85extern int *d_msgnum_u;
86extern int *d_flag_mod_u;
87
88
89#define RDMA_FLAG_SIZE 2
90
91
92#ifdef HAVE_NVSHMEM
93#undef CUDA_CHECK
94#define CUDA_CHECK(stmt) \
95 do { \
96 cudaError_t result = (stmt); \
97 if (cudaSuccess != result) { \
98 fprintf(stderr, "[%s:%d] cuda failed with %s \n", __FILE__, __LINE__, \
99 cudaGetErrorString(result)); \
100 exit(-1); \
101 } \
102 assert(cudaSuccess == result); \
103 } while (0)
104
105#define MPI_CHECK(stmt) \
106do { \
107 int result = (stmt); \
108 if (MPI_SUCCESS != result) { \
109 fprintf(stderr, "[%s:%d] MPI failed with error %d \n",\
110 __FILE__, __LINE__, result); \
111 exit(-1); \
112 } \
113} while (0)
114#endif
115
116
117
int * d_nfrecv_u
Definition: supernodalForest.c:1713
int * d_mynum
Definition: supernodalForest.c:1710
int * my_flag_rd
Definition: supernodalForest.c:1709
int * d_colnum
Definition: supernodalForest.c:1712
int * d_mymasklength_u
Definition: supernodalForest.c:1711
int * mystatusmod_u
Definition: supernodalForest.c:1706
int * my_flag_bc
Definition: supernodalForest.c:1709
int * d_mymaskstart
Definition: supernodalForest.c:1710
int * d_nfrecvmod
Definition: supernodalForest.c:1714
int * h_nfrecv
Definition: supernodalForest.c:1712
int * d_colnummod
Definition: supernodalForest.c:1714
int * d_colnum_u
Definition: supernodalForest.c:1713
int * mystatus_u
Definition: supernodalForest.c:1706
int * d_nfrecvmod_u
Definition: supernodalForest.c:1715
int * d_statusmod
Definition: oneside.h:58
int * d_recv_cnt_u
Definition: supernodalForest.c:1719
int * d_mymaskstartmod
Definition: supernodalForest.c:1716
int * d_flag_mod
Definition: supernodalForest.c:1720
uint64_t * flag_bc_q
Definition: supernodalForest.c:1708
int * d_mynummod
Definition: supernodalForest.c:1716
int * d_mynum_u
Definition: supernodalForest.c:1711
int * d_msgnum_u
Definition: supernodalForest.c:1719
int * d_mymasklengthmod_u
Definition: supernodalForest.c:1717
int * h_nfrecv_u
Definition: supernodalForest.c:1713
uint64_t * flag_rd_q
Definition: supernodalForest.c:1708
int * d_colnummod_u
Definition: supernodalForest.c:1715
int * h_nfrecvmod_u
Definition: supernodalForest.c:1715
int * d_mynummod_u
Definition: supernodalForest.c:1717
int * mystatus
Definition: supernodalForest.c:1705
int * d_mymasklengthmod
Definition: supernodalForest.c:1716
int * mystatusmod
Definition: supernodalForest.c:1705
int * d_msgnum
Definition: supernodalForest.c:1718
int * d_status
Definition: supernodalForest.c:1707
int * d_mymaskstart_u
Definition: supernodalForest.c:1711
int * d_flag_mod_u
Definition: supernodalForest.c:1720
int * d_recv_cnt
Definition: supernodalForest.c:1718
int * d_rownum_u
int * d_mymaskstartmod_u
Definition: supernodalForest.c:1717
int * h_nfrecvmod
Definition: supernodalForest.c:1714
int * d_mymasklength
Definition: supernodalForest.c:1710
int * d_rowstart
Definition: supernodalForest.c:1705
int * d_rownum
Definition: supernodalForest.c:1705
int * d_rowstart_u
int * d_nfrecv
Definition: supernodalForest.c:1712