SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
BI_Arecv.c
Go to the documentation of this file.
1#include "Bdef.h"
2
3void BI_Arecv(BLACSCONTEXT *ctxt, Int src, Int msgid, BLACBUFF *bp)
4{
5 Int i, info;
6 MpiInt errclass;
7
8 info=MPI_Irecv(bp->Buff, bp->N, bp->dtype, src, msgid, ctxt->scp->comm,
9 &bp->Aops[bp->nAops]);
10 while(info != MPI_SUCCESS)
11 {
12 i=MPI_Error_class(info, &errclass);
13 if ( (errclass != MPI_ERR_UNKNOWN) && (errclass != MPI_ERR_OTHER) &&
14 (errclass != MPI_ERR_INTERN) )
15 {
16 Mmpierror(info, "MPI_Irecv", ctxt, __LINE__, __FILE__);
17 BI_BlacsErr(BI_ContxtNum(ctxt), __LINE__, __FILE__,
18 "MPI error %d on call to MPI_Irecv", info);
19 }
20#if (BlacsDebugLvl > 0)
21 else BI_BlacsWarn(BI_ContxtNum(ctxt), __LINE__, __FILE__,
22"MPI error %d assumed to mean out of non-blocking resources on call to MPI_Irecv",
23 info);
24#endif
25 info=MPI_Irecv(bp->Buff, bp->N, bp->dtype, src, msgid, ctxt->scp->comm,
26 &bp->Aops[bp->nAops]);
27 }
28 bp->nAops++;
29/*
30 * Signal if we need to use status to figure out true length of received message
31 * We only need do this if we are doing our own buffering
32 */
33#ifndef MpiBuffGood
34 if (bp->dtype == MPI_PACKED) bp->N = -bp->nAops;
35#endif
36}
void BI_Arecv(BLACSCONTEXT *ctxt, Int src, Int msgid, BLACBUFF *bp)
Definition BI_Arecv.c:3
#define Int
Definition Bconfig.h:22
#define MpiInt
Definition Bconfig.h:25
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form,...)
Definition BI_BlacsErr.c:3
#define Mmpierror(ierr, rout, ctxt, line, file)
Definition Bdef.h:217
Int BI_ContxtNum(BLACSCONTEXT *ctxt)
Definition BI_ContxtNum.c:3
void BI_BlacsWarn(Int ConTxt, Int line, char *file, char *form,...)
Definition BI_BlacsWarn.c:3
Int N
Definition Bdef.h:61
MPI_Request * Aops
Definition Bdef.h:59
MPI_Datatype dtype
Definition Bdef.h:60
Int nAops
Definition Bdef.h:58
char * Buff
Definition Bdef.h:56
BLACSSCOPE * scp
Definition Bdef.h:26
MPI_Comm comm
Definition Bdef.h:15