83 void BI_ArgCheck(
Int,
Int,
char *,
char,
char,
char,
Int,
Int,
Int,
Int,
110 Int i, j, N, dest, idist, length, tlda, tldia, trdest, ierr;
113 MPI_Datatype dtypes[2];
115 MPI_Datatype IntTyp, MyType;
120 MPI_Type_match_size(MPI_TYPECLASS_INTEGER,
sizeof(
Int), &IntTyp);
132 if (ttop ==
' ') ttop = DefCombTop;
134 if (
Mpval(cdest) == -1) trdest = -1;
135 else trdest =
Mpval(rdest);
136#if (BlacsDebugLvl > 0)
141 if (
Mpval(ldia) != -1)
143 "LDIA too small (LDIA=%d, but M=%d)",
Mpval(ldia),
148 else tlda =
Mpval(m);
150 else tldia =
Mpval(ldia);
155 if (trdest == -1) dest = -1;
156 else dest =
Mpval(cdest);
164 if (trdest == -1) dest = -1;
184 if (
Mpval(ldia) != -1)
198 if (i) length += j - i;
208 if (dest == -1) mydist = ctxt->
scp->
Iam;
211 for (i=0; i < N; i++) dist[i] = mydist;
219 dtypes[0] = MPI_COMPLEX;
221#ifdef ZeroByteTypeBug
226 ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
227 ierr=MPI_Type_commit(&MyType);
230#ifdef ZeroByteTypeBug
249 bp->
Buff = (
char *) A;
267 if (
Mpval(ldia) == -1)
279 ierr=MPI_Reduce(bp->
Buff, bp2->
Buff, bp->
N, bp->
dtype, BlacComb, dest,
281 if (ctxt->
scp->
Iam == dest)
284 if (
Mpval(ldia) != -1)
287 trdest,
Mpval(cdest));
292 ierr=MPI_Allreduce(bp->
Buff, bp2->
Buff, bp->
N, bp->
dtype, BlacComb,
295 if (
Mpval(ldia) != -1)
298 trdest,
Mpval(cdest));
300 ierr=MPI_Op_free(&BlacComb);
301 if (
Mpval(ldia) != -1)
302#ifdef ZeroByteTypeBug
330 BI_TreeComb(ctxt, bp, bp2, N, vvop, dest, ttop-47);
352 if (
Mpval(ldia) != -1)
353#ifdef ZeroByteTypeBug
360 if ( (ctxt->
scp->
Iam == dest) || (dest == -1) )
367 if (
Mpval(ldia) != -1)
369 dist, trdest,
Mpval(cdest));
void BI_ArgCheck(Int ConTxt, Int RoutType, char *routine, char scope, char uplo, char diag, Int m, Int n, Int lda, Int nprocs, Int *prows, Int *pcols)
void BI_BeComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2, Int N, VVFUNPTR Xvvop)
Int BI_BuffIsFree(BLACBUFF *bp, Int Wait)
BLACBUFF * BI_GetBuff(Int length)
MPI_Datatype BI_GetMpiGeType(BLACSCONTEXT *ctxt, Int m, Int n, Int lda, MPI_Datatype Dtype, Int *N)
void BI_MringComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2, Int N, VVFUNPTR Xvvop, Int dest, Int nrings)
BLACBUFF * BI_Pack(BLACSCONTEXT *ctxt, BVOID *A, BLACBUFF *bp, MPI_Datatype Dtype)
void BI_TransDist(BLACSCONTEXT *ctxt, char scope, Int m, Int n, Int *rA, Int *cA, Int ldrc, BI_DistType *dist, Int rdest, Int cdest)
void BI_TreeComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2, Int N, VVFUNPTR Xvvop, Int dest, Int nbranches)
void BI_Unpack(BLACSCONTEXT *ctxt, BVOID *A, BLACBUFF *bp, MPI_Datatype Dtype)
void BI_UpdateBuffs(BLACBUFF *Newbp)
void BI_cMPI_amn2(void *in, void *inout, MpiInt *N, MPI_Datatype *dtype)
void BI_cMPI_amn(void *in, void *inout, MpiInt *N, MPI_Datatype *dtype)
void BI_cvvamn2(Int N, char *vec1, char *vec2)
void BI_cvvamn(Int N, char *vec1, char *vec2)
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form,...)
#define BI_cvmcopy(m, n, A, lda, buff)
#define BI_MPI_TYPE_FREE(t)
#define Mvkpnum(ctxt, prow, pcol)
#define MGetConTxt(Context, ctxtptr)
void(* VVFUNPTR)(Int, char *, char *)
#define BI_cmvcopy(m, n, A, lda, buff)
void BI_BlacsWarn(Int ConTxt, Int line, char *file, char *form,...)
F_VOID_FUNC cgamn2d_(Int *ConTxt, F_CHAR scope, F_CHAR top, Int *m, Int *n, float *A, Int *lda, Int *rA, Int *cA, Int *ldia, Int *rdest, Int *cdest)