1 /* $Id: mpidense.h,v 1.14 1999/03/25 21:33:16 balay Exp bsmith $ */ 2 3 #include "src/mat/impls/dense/seq/dense.h" 4 5 /* Data stuctures for basic parallel dense matrix */ 6 7 /* Structure to hold the information for factorization of a dense matrix */ 8 /* Most of this info is used in the pipe send/recv routines */ 9 typedef struct { 10 int nlnr; /* number of local rows downstream */ 11 int nrend; /* rend for downstream processor */ 12 int nbr, pnbr; /* Down and upstream neighbors */ 13 int *tag; /* message tags */ 14 int currow; /* current row number */ 15 int phase; /* phase (used to indicate tag) */ 16 int up; /* Are we moving up or down in row number? */ 17 int use_bcast; /* Are we broadcasting max length? */ 18 int nsend; /* number of sends */ 19 int nrecv; /* number of receives */ 20 21 /* data initially in matrix context */ 22 int k; /* Blocking factor (unused as yet) */ 23 int k2; /* Blocking factor for solves */ 24 Scalar *temp; 25 int nlptr; 26 int *lrows; 27 int *nlrows; 28 int *pivots; 29 } FactorCtx; 30 31 #define PIPEPHASE (ctx->phase == 0) 32 33 typedef struct { 34 int *rowners, *cowners; /* ranges owned by each processor */ 35 int m, n; /* local rows and columns */ 36 int M, N; /* global rows and columns */ 37 /* note n == N */ 38 int nvec; /* this is the n size for the vector one multiplies with */ 39 int rstart, rend; /* starting and ending owned rows */ 40 Mat A; /* local submatrix */ 41 int size; /* size of communicator */ 42 int rank; /* rank of proc in communicator */ 43 /* The following variables are used for matrix assembly */ 44 int donotstash; /* Flag indicationg if values should be stashed */ 45 MPI_Request *send_waits; /* array of send requests */ 46 MPI_Request *recv_waits; /* array of receive requests */ 47 int nsends, nrecvs; /* numbers of sends and receives */ 48 Scalar *svalues, *rvalues; /* sending and receiving data */ 49 int rmax; /* maximum message length */ 50 51 /* The following variables are used for matrix-vector products */ 52 53 Vec lvec; /* local vector */ 54 VecScatter Mvctx; /* scatter context for vector */ 55 56 int roworiented; /* if true, row oriented input (default) */ 57 FactorCtx *factor; /* factorization context */ 58 } Mat_MPIDense; 59