81 void BI_ArgCheck(
Int,
Int,
char *,
char,
char,
char,
Int,
Int,
Int,
Int,
108 Int i, j, N, dest, idist, length, tlda, tldia, trdest, ierr;
111 MPI_Datatype dtypes[2];
113 MPI_Datatype IntTyp, MyType;
118 MPI_Type_match_size(MPI_TYPECLASS_INTEGER,
sizeof(
Int), &IntTyp);
130 if (ttop ==
' ') ttop = DefCombTop;
132 if (
Mpval(cdest) == -1) trdest = -1;
133 else trdest =
Mpval(rdest);
134#if (BlacsDebugLvl > 0)
139 if (
Mpval(ldia) != -1)
141 "LDIA too small (LDIA=%d, but M=%d)",
Mpval(ldia),
146 else tlda =
Mpval(m);
148 else tldia =
Mpval(ldia);
153 if (trdest == -1) dest = -1;
154 else dest =
Mpval(cdest);
162 if (trdest == -1) dest = -1;
175 if (ttop ==
' ')
if ( (
Mpval(m) < 1) || (
Mpval(n) < 1) ) ttop =
'1';
181 if (
Mpval(ldia) != -1)
184 length = N *
sizeof(
Int);
193 if (
sizeof(
Int) > j) j =
sizeof(
Int);
195 if (i) length += j - i;
205 if (dest == -1) mydist = ctxt->
scp->
Iam;
208 for (i=0; i < N; i++) dist[i] = mydist;
218#ifdef ZeroByteTypeBug
223 ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
224 ierr=MPI_Type_commit(&MyType);
227#ifdef ZeroByteTypeBug
239 length = N *
sizeof(
Int);
246 bp->
Buff = (
char *) A;
264 if (
Mpval(ldia) == -1)
276 ierr=MPI_Reduce(bp->
Buff, bp2->
Buff, bp->
N, bp->
dtype, BlacComb, dest,
278 if (ctxt->
scp->
Iam == dest)
281 if (
Mpval(ldia) != -1)
284 trdest,
Mpval(cdest));
289 ierr=MPI_Allreduce(bp->
Buff, bp2->
Buff, bp->
N, bp->
dtype, BlacComb,
292 if (
Mpval(ldia) != -1)
295 trdest,
Mpval(cdest));
297 ierr=MPI_Op_free(&BlacComb);
298 if (
Mpval(ldia) != -1)
299#ifdef ZeroByteTypeBug
327 BI_TreeComb(ctxt, bp, bp2, N, vvop, dest, ttop-47);
349 if (
Mpval(ldia) != -1)
350#ifdef ZeroByteTypeBug
357 if ( (ctxt->
scp->
Iam == dest) || (dest == -1) )
364 if (
Mpval(ldia) != -1)
366 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_iMPI_amn2(void *in, void *inout, MpiInt *N, MPI_Datatype *dtype)
void BI_iMPI_amn(void *in, void *inout, MpiInt *N, MPI_Datatype *dtype)
void BI_imvcopy(Int m, Int n, Int *A, Int lda, Int *buff)
void BI_ivmcopy(Int m, Int n, Int *A, Int lda, Int *buff)
void BI_ivvamn2(Int N, char *vec1, char *vec2)
void BI_ivvamn(Int N, char *vec1, char *vec2)
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form,...)
#define BI_MPI_TYPE_FREE(t)
#define Mvkpnum(ctxt, prow, pcol)
#define MGetConTxt(Context, ctxtptr)
void(* VVFUNPTR)(Int, char *, char *)
void BI_BlacsWarn(Int ConTxt, Int line, char *file, char *form,...)
F_VOID_FUNC igamn2d_(Int *ConTxt, F_CHAR scope, F_CHAR top, Int *m, Int *n, Int *A, Int *lda, Int *rA, Int *cA, Int *ldia, Int *rdest, Int *cdest)