SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ BI_BuffIsFree()

Int BI_BuffIsFree ( BLACBUFF bp,
Int  Wait 
)

Definition at line 3 of file BI_BuffIsFree.c.

8{
9 MpiInt i, info;
10 extern MPI_Status *BI_Stats;
11 extern Int BI_Np;
12
13
14 if (!Wait)
15 {
16 info=MPI_Testall(bp->nAops, bp->Aops, &i, BI_Stats);
17 if (!i)
18 {
19/*
20 * If we are doing our own Packing, need to check true length of receive
21 */
22#ifndef MpiBuffGood
23/*
24 * If we have an outstanding receive, make sure that when it
25 * completes we correctly set bp->N, if required
26 */
27 if (bp->N < 0)
28 {
29 if (bp->Aops[-bp->N-1] == MPI_REQUEST_NULL)
30 {
31 info=MPI_Get_count(&BI_Stats[(-bp->N-1)*sizeof(MPI_Status)],MPI_PACKED, &i);
32 if (i != MPI_UNDEFINED) bp->N = i;
33 else BI_BlacsWarn(-1, __LINE__, __FILE__,
34 "MPI_Get_count returned MPI_UNDEFINED.\n");
35 }
36 }
37#endif
38 return(0);
39 }
40 }
41 else
42 {
43 info=MPI_Waitall(bp->nAops, bp->Aops, BI_Stats);
44 }
45
46 bp->nAops = 0;
47/*
48 * If we are doing our own packing, need to check true length of receive
49 */
50#ifndef MpiBuffGood
51/*
52 * If we had an outstanding receive, make sure that we correctly set bp->N,
53 * if required
54 */
55 if (bp->N < 0)
56 {
57 info=MPI_Get_count(&BI_Stats[(-bp->N-1)*sizeof(MPI_Status)],MPI_PACKED, &i);
58 if (i != MPI_UNDEFINED) bp->N = i;
59 else BI_BlacsWarn(-1, __LINE__, __FILE__,
60 "MPI_Get_count returned MPI_UNDEFINED.\n");
61 }
62#endif
63 return(1);
64}
MPI_Status * BI_Stats
Int BI_Np
#define Int
Definition Bconfig.h:22
#define MpiInt
Definition Bconfig.h:25
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
Int nAops
Definition Bdef.h:58
Here is the call graph for this function: