1*70f55243SBarry Smith /* $Id: mpidense.h,v 1.10 1996/01/24 05:45:49 bsmith Exp bsmith $ */ 28965ea79SLois Curfman McInnes 3*70f55243SBarry 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 */ 378965ea79SLois Curfman McInnes int rstart, rend; /* starting and ending owned rows */ 38bad5519cSBarry Smith Mat A; /* local submatrix */ 398965ea79SLois Curfman McInnes int size; /* size of communicator */ 408965ea79SLois Curfman McInnes int rank; /* rank of proc in communicator */ 418965ea79SLois Curfman McInnes 428965ea79SLois Curfman McInnes /* The following variables are used for matrix assembly */ 438965ea79SLois Curfman McInnes 448965ea79SLois Curfman McInnes InsertMode insertmode; /* mode for MatSetValues */ 458965ea79SLois Curfman McInnes Stash stash; /* stash for non-local elements */ 468965ea79SLois Curfman McInnes MPI_Request *send_waits; /* array of send requests */ 478965ea79SLois Curfman McInnes MPI_Request *recv_waits; /* array of receive requests */ 488965ea79SLois Curfman McInnes int nsends, nrecvs; /* numbers of sends and receives */ 498965ea79SLois Curfman McInnes Scalar *svalues, *rvalues; /* sending and receiving data */ 508965ea79SLois Curfman McInnes int rmax; /* maximum message length */ 518965ea79SLois Curfman McInnes 528965ea79SLois Curfman McInnes /* The following variables are used for matrix-vector products */ 538965ea79SLois Curfman McInnes 548965ea79SLois Curfman McInnes Vec lvec; /* local vector */ 55bad5519cSBarry Smith VecScatter Mvctx; /* scatter context for vector */ 56052cd425SLois Curfman McInnes 575e0100a6SBarry Smith int roworiented; /* if true, row oriented input (default) */ 58622d7880SLois Curfman McInnes FactorCtx *factor; /* factorization context */ 598965ea79SLois Curfman McInnes } Mat_MPIDense; 60