1*c6aed980SBarry Smith /* $Id: mpidense.h,v 1.14 1999/03/25 21:33:16 balay Exp bsmith $ */ 28965ea79SLois Curfman McInnes 370f55243SBarry Smith #include "src/mat/impls/dense/seq/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 */ 826b0ef5dSLois 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 */ 1126b0ef5dSLois Curfman McInnes int nrend; /* rend for downstream processor */ 12052cd425SLois Curfman McInnes int nbr, pnbr; /* Down and upstream neighbors */ 138aaee692SLois Curfman McInnes int *tag; /* message tags */ 1426b0ef5dSLois Curfman McInnes int currow; /* current row number */ 158aaee692SLois Curfman McInnes int phase; /* phase (used to indicate tag) */ 1626b0ef5dSLois Curfman McInnes int up; /* Are we moving up or down in row number? */ 1726b0ef5dSLois Curfman McInnes int use_bcast; /* Are we broadcasting max length? */ 1826b0ef5dSLois Curfman McInnes int nsend; /* number of sends */ 1926b0ef5dSLois Curfman McInnes int nrecv; /* number of receives */ 2026b0ef5dSLois Curfman McInnes 2126b0ef5dSLois 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 */ 2426b0ef5dSLois Curfman McInnes Scalar *temp; 2526b0ef5dSLois Curfman McInnes int nlptr; 2626b0ef5dSLois Curfman McInnes int *lrows; 278aaee692SLois Curfman McInnes int *nlrows; 28622d7880SLois Curfman McInnes int *pivots; 2926b0ef5dSLois Curfman McInnes } FactorCtx; 30052cd425SLois Curfman McInnes 31052cd425SLois Curfman McInnes #define PIPEPHASE (ctx->phase == 0) 3267e560aaSBarry Smith 338965ea79SLois Curfman McInnes typedef struct { 348965ea79SLois Curfman McInnes int *rowners, *cowners; /* ranges owned by each processor */ 358965ea79SLois Curfman McInnes int m, n; /* local rows and columns */ 368965ea79SLois Curfman McInnes int M, N; /* global rows and columns */ 37*c6aed980SBarry Smith /* note n == N */ 38*c6aed980SBarry Smith int nvec; /* this is the n size for the vector one multiplies with */ 398965ea79SLois Curfman McInnes int rstart, rend; /* starting and ending owned rows */ 40bad5519cSBarry Smith Mat A; /* local submatrix */ 418965ea79SLois Curfman McInnes int size; /* size of communicator */ 428965ea79SLois Curfman McInnes int rank; /* rank of proc in communicator */ 438965ea79SLois Curfman McInnes /* The following variables are used for matrix assembly */ 44e314f107SSatish Balay int donotstash; /* Flag indicationg if values should be stashed */ 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 565e0100a6SBarry Smith int roworiented; /* if true, row oriented input (default) */ 57622d7880SLois Curfman McInnes FactorCtx *factor; /* factorization context */ 588965ea79SLois Curfman McInnes } Mat_MPIDense; 59