1*26b0ef5dSLois Curfman McInnes /* $Id: mpidense.h,v 1.5 1995/12/10 18:58:08 curfman Exp curfman $ */ 28965ea79SLois Curfman McInnes 38965ea79SLois Curfman McInnes #include "dense.h" 48965ea79SLois Curfman McInnes 5052cd425SLois Curfman McInnes /* Data stuctures for basic parallel dense matrix */ 6052cd425SLois Curfman McInnes 7052cd425SLois Curfman McInnes /* Structure to hold the information for factorization of a dense matrix */ 8*26b0ef5dSLois Curfman McInnes /* Most of this info is used in the pipe send/recv routines */ 9052cd425SLois Curfman McInnes typedef struct { 10052cd425SLois Curfman McInnes int nlnr; /* number of local rows downstream */ 11*26b0ef5dSLois Curfman McInnes int nrend; /* rend for downstream processor */ 12052cd425SLois Curfman McInnes int nbr, pnbr; /* Down and upstream neighbors */ 13*26b0ef5dSLois Curfman McInnes int tag0, tag1; /* message tags */ 14*26b0ef5dSLois Curfman McInnes int currow; /* current row number */ 15*26b0ef5dSLois Curfman McInnes int phase; /* phase (used to set tag) */ 16*26b0ef5dSLois Curfman McInnes int up; /* Are we moving up or down in row number? */ 17*26b0ef5dSLois Curfman McInnes int use_bcast; /* Are we broadcasting max length? */ 18*26b0ef5dSLois Curfman McInnes int nsend; /* number of sends */ 19*26b0ef5dSLois Curfman McInnes int nrecv; /* number of receives */ 20*26b0ef5dSLois Curfman McInnes 21*26b0ef5dSLois Curfman McInnes /* data initially in matrix context */ 22052cd425SLois Curfman McInnes int k; /* Blocking factor (unused as yet) */ 23052cd425SLois Curfman McInnes int k2; /* Blocking factor for solves */ 24*26b0ef5dSLois Curfman McInnes Scalar *temp; 25*26b0ef5dSLois Curfman McInnes int nlptr; 26*26b0ef5dSLois Curfman McInnes int *lrows; 27*26b0ef5dSLois Curfman McInnes } FactorCtx; 28052cd425SLois Curfman McInnes 29052cd425SLois Curfman McInnes #define PIPEPHASE (ctx->phase == 0) 3067e560aaSBarry Smith 318965ea79SLois Curfman McInnes typedef struct { 328965ea79SLois Curfman McInnes int *rowners, *cowners; /* ranges owned by each processor */ 338965ea79SLois Curfman McInnes int m, n; /* local rows and columns */ 348965ea79SLois Curfman McInnes int M, N; /* global rows and columns */ 358965ea79SLois Curfman McInnes int rstart, rend; /* starting and ending owned rows */ 36bad5519cSBarry Smith Mat A; /* local submatrix */ 378965ea79SLois Curfman McInnes int size; /* size of communicator */ 388965ea79SLois Curfman McInnes int rank; /* rank of proc in communicator */ 398965ea79SLois Curfman McInnes 408965ea79SLois Curfman McInnes /* The following variables are used for matrix assembly */ 418965ea79SLois Curfman McInnes 428965ea79SLois Curfman McInnes int assembled; /* MatAssemble has been called */ 438965ea79SLois Curfman McInnes InsertMode insertmode; /* mode for MatSetValues */ 448965ea79SLois Curfman McInnes Stash stash; /* stash for non-local elements */ 458965ea79SLois Curfman McInnes MPI_Request *send_waits; /* array of send requests */ 468965ea79SLois Curfman McInnes MPI_Request *recv_waits; /* array of receive requests */ 478965ea79SLois Curfman McInnes int nsends, nrecvs; /* numbers of sends and receives */ 488965ea79SLois Curfman McInnes Scalar *svalues, *rvalues; /* sending and receiving data */ 498965ea79SLois Curfman McInnes int rmax; /* maximum message length */ 508965ea79SLois Curfman McInnes 518965ea79SLois Curfman McInnes /* The following variables are used for matrix-vector products */ 528965ea79SLois Curfman McInnes 538965ea79SLois Curfman McInnes Vec lvec; /* local vector */ 54bad5519cSBarry Smith VecScatter Mvctx; /* scatter context for vector */ 55052cd425SLois Curfman McInnes 56*26b0ef5dSLois Curfman McInnes FactorCtx *factor; /* factorization context */ 578965ea79SLois Curfman McInnes } Mat_MPIDense; 58