1 /* $Id: mpidense.h,v 1.8 1995/12/29 23:19:24 curfman Exp curfman $ */ 2 3 #include "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 int rstart, rend; /* starting and ending owned rows */ 38 Mat A; /* local submatrix */ 39 int size; /* size of communicator */ 40 int rank; /* rank of proc in communicator */ 41 42 /* The following variables are used for matrix assembly */ 43 44 int assembled; /* MatAssemble has been called */ 45 InsertMode insertmode; /* mode for MatSetValues */ 46 Stash stash; /* stash for non-local elements */ 47 MPI_Request *send_waits; /* array of send requests */ 48 MPI_Request *recv_waits; /* array of receive requests */ 49 int nsends, nrecvs; /* numbers of sends and receives */ 50 Scalar *svalues, *rvalues; /* sending and receiving data */ 51 int rmax; /* maximum message length */ 52 53 /* The following variables are used for matrix-vector products */ 54 55 Vec lvec; /* local vector */ 56 VecScatter Mvctx; /* scatter context for vector */ 57 58 int roworiented; /* if true, row oriented input (default) */ 59 FactorCtx *factor; /* factorization context */ 60 } Mat_MPIDense; 61