3{
6 MPI_Aint eltsiz;
7#ifdef ZeroByteTypeBug
8 char *cptr;
11#endif
12
13
14
15
16
17#ifdef ZeroByteTypeBug
18 if (Dtype == MPI_BYTE)
19 {
21 if (info % sizeof(MPI_Request))
22 info += sizeof(MPI_Request) - info % sizeof(MPI_Request);
23 i = info +
BI_Np*
sizeof(MPI_Request);
25 cptr = malloc(i);
26 if (cptr)
27 {
30 bp->
Aops = (MPI_Request *) &cptr[info];
33 return(bp);
34 }
36 "Not enough memory to allocate 0 byte buffer\n");
37 }
38#endif
39 if (bp == NULL)
40 {
41 info=MPI_Pack_size(one, Dtype, ctxt->
scp->
comm, &i);
43 }
44
45 i = 0;
46 info=MPI_Pack(A, one, Dtype, bp->
Buff, bp->
Len, &i, ctxt->
scp->
comm);
47 bp->
dtype = MPI_PACKED;
49
50 return(bp);
51}
BLACBUFF * BI_GetBuff(Int length)
void BI_BlacsErr(Int ConTxt, Int line, char *file, char *form,...)
Int BI_ContxtNum(BLACSCONTEXT *ctxt)