1 /* $Id: mpidense.h,v 1.4 1995/11/03 02:49:37 bsmith 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 typedef struct { 9 int nlnr; /* number of local rows downstream */ 10 int nbr, pnbr; /* Down and upstream neighbors */ 11 int tag; 12 int k; /* Blocking factor (unused as yet) */ 13 int k2; /* Blocking factor for solves */ 14 int use_bcast; 15 double *temp; 16 } FactCtx; 17 18 #define PIPEPHASE (ctx->phase == 0) 19 /* This stucture is used in the pipe send/recv routines */ 20 typedef struct { 21 int nbr, pnbr; 22 int nlnr, nlptr, *nlrows; 23 int currow; 24 int up; /* Are we moving up or down in row number? */ 25 int tag; 26 int phase; 27 int use_bcast; 28 int nsend; 29 int nrecv; 30 } PSPPipe; 31 32 typedef struct { 33 int *rowners, *cowners; /* ranges owned by each processor */ 34 int m, n; /* local rows and columns */ 35 int M, N; /* global rows and columns */ 36 int rstart, rend; /* starting and ending owned rows */ 37 Mat A; /* local submatrix */ 38 int size; /* size of communicator */ 39 int rank; /* rank of proc in communicator */ 40 41 /* The following variables are used for matrix assembly */ 42 43 int assembled; /* MatAssemble has been called */ 44 InsertMode insertmode; /* mode for MatSetValues */ 45 Stash stash; /* stash for non-local elements */ 46 MPI_Request *send_waits; /* array of send requests */ 47 MPI_Request *recv_waits; /* array of receive requests */ 48 int nsends, nrecvs; /* numbers of sends and receives */ 49 Scalar *svalues, *rvalues; /* sending and receiving data */ 50 int rmax; /* maximum message length */ 51 52 /* The following variables are used for matrix-vector products */ 53 54 Vec lvec; /* local vector */ 55 VecScatter Mvctx; /* scatter context for vector */ 56 57 FactCtx *factor; /* factorization context */ 58 } Mat_MPIDense; 59