|
ScaLAPACK 2.1
2.1
ScaLAPACK: Scalable Linear Algebra PACKage
|
Go to the documentation of this file.
3 #if (INTFACE == C_CALL)
4 void Cigamx2d(
int ConTxt,
char *scope,
char *top,
int m,
int n,
int *A,
5 int lda,
int *rA,
int *cA,
int ldia,
int rdest,
int cdest)
8 int *A,
int *lda,
int *rA,
int *cA,
int *ldia,
9 int *rdest,
int *cdest)
81 void BI_ArgCheck(
int,
int,
char *,
char,
char,
char,
int,
int,
int,
int,
99 void BI_iMPI_amx(
void *,
void *,
int *, MPI_Datatype *);
100 void BI_iMPI_amx2(
void *,
void *,
int *, MPI_Datatype *);
108 int i, j, N, dest, idist, length, tlda, tldia, trdest, ierr;
111 MPI_Datatype dtypes[2];
128 if (ttop ==
' ') ttop = DefCombTop;
130 if (
Mpval(cdest) == -1) trdest = -1;
131 else trdest =
Mpval(rdest);
132 #if (BlacsDebugLvl > 0)
137 if (
Mpval(ldia) != -1)
139 "LDIA too small (LDIA=%d, but M=%d)",
Mpval(ldia),
144 else tlda =
Mpval(m);
146 else tldia =
Mpval(ldia);
151 if (trdest == -1) dest = -1;
152 else dest =
Mpval(cdest);
160 if (trdest == -1) dest = -1;
173 if (ttop ==
' ')
if ( (
Mpval(m) < 1) || (
Mpval(n) < 1) ) ttop =
'1';
179 if (
Mpval(ldia) != -1)
182 length = N *
sizeof(int);
191 if (
sizeof(
int) > j) j =
sizeof(
int);
193 if (i) length += j - i;
203 if (dest == -1) mydist = ctxt->
scp->
Iam;
206 for (i=0; i < N; i++) dist[i] = mydist;
216 #ifdef ZeroByteTypeBug
221 ierr=MPI_Type_create_struct(i, len, disp, dtypes, &MyType);
222 ierr=MPI_Type_commit(&MyType);
225 #ifdef ZeroByteTypeBug
237 length = N *
sizeof(int);
244 bp->
Buff = (
char *) A;
262 if (
Mpval(ldia) == -1)
274 ierr=MPI_Reduce(bp->
Buff, bp2->
Buff, bp->
N, bp->
dtype, BlacComb, dest,
276 if (ctxt->
scp->
Iam == dest)
279 if (
Mpval(ldia) != -1)
282 trdest,
Mpval(cdest));
287 ierr=MPI_Allreduce(bp->
Buff, bp2->
Buff, bp->
N, bp->
dtype, BlacComb,
290 if (
Mpval(ldia) != -1)
293 trdest,
Mpval(cdest));
295 ierr=MPI_Op_free(&BlacComb);
296 if (
Mpval(ldia) != -1)
297 #ifdef ZeroByteTypeBug
325 BI_TreeComb(ctxt, bp, bp2, N, vvop, dest, ttop-47);
347 if (
Mpval(ldia) != -1)
348 #ifdef ZeroByteTypeBug
355 if ( (ctxt->
scp->
Iam == dest) || (dest == -1) )
362 if (
Mpval(ldia) != -1)
364 dist, trdest,
Mpval(cdest));
void BI_TransDist(BLACSCONTEXT *ctxt, char scope, int m, int n, int *rA, int *cA, int ldrc, BI_DistType *dist, int rdest, int cdest)
BLACBUFF * BI_Pack(BLACSCONTEXT *ctxt, BVOID *A, BLACBUFF *bp, MPI_Datatype Dtype)
void BI_BeComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2, int N, VVFUNPTR Xvvop)
BLACBUFF * BI_GetBuff(int length)
void BI_ivvamx2(int N, char *vec1, char *vec2)
void BI_Unpack(BLACSCONTEXT *ctxt, BVOID *A, BLACBUFF *bp, MPI_Datatype Dtype)
void BI_ivmcopy(int m, int n, int *A, int lda, int *buff)
void BI_iMPI_amx2(void *in, void *inout, int *N, MPI_Datatype *dtype)
#define MGetConTxt(Context, ctxtptr)
F_VOID_FUNC igamx2d_(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)
void(* VVFUNPTR)(int, char *, char *)
void BI_MringComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2, int N, VVFUNPTR Xvvop, int dest, int nrings)
void BI_iMPI_amx(void *in, void *inout, int *N, MPI_Datatype *dtype)
void BI_TreeComb(BLACSCONTEXT *ctxt, BLACBUFF *bp, BLACBUFF *bp2, int N, VVFUNPTR Xvvop, int dest, int nbranches)
MPI_Datatype BI_GetMpiGeType(BLACSCONTEXT *ctxt, int m, int n, int lda, MPI_Datatype Dtype, int *N)
void BI_ivvamx(int N, char *vec1, char *vec2)
void BI_BlacsErr(int ConTxt, int line, char *file, char *form,...)
void BI_imvcopy(int m, int n, int *A, int lda, int *buff)
void BI_BlacsWarn(int ConTxt, int line, char *file, char *form,...)
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)
#define BI_MPI_TYPE_FREE(t)
#define Mvkpnum(ctxt, prow, pcol)
void BI_UpdateBuffs(BLACBUFF *Newbp)
int BI_BuffIsFree(BLACBUFF *bp, int Wait)