1 /* $Id: mpidense.h,v 1.5 1995/12/10 18:58:08 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 tag0, tag1; /* message tags */ 14 int currow; /* current row number */ 15 int phase; /* phase (used to set 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 } FactorCtx; 28 29 #define PIPEPHASE (ctx->phase == 0) 30 31 typedef struct { 32 int *rowners, *cowners; /* ranges owned by each processor */ 33 int m, n; /* local rows and columns */ 34 int M, N; /* global rows and columns */ 35 int rstart, rend; /* starting and ending owned rows */ 36 Mat A; /* local submatrix */ 37 int size; /* size of communicator */ 38 int rank; /* rank of proc in communicator */ 39 40 /* The following variables are used for matrix assembly */ 41 42 int assembled; /* MatAssemble has been called */ 43 InsertMode insertmode; /* mode for MatSetValues */ 44 Stash stash; /* stash for non-local elements */ 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 FactorCtx *factor; /* factorization context */ 57 } Mat_MPIDense; 58