File: BI_Srecv.c

package info (click to toggle)
scalapack 2.0.2-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 36,300 kB
  • sloc: fortran: 338,514; ansic: 75,307; makefile: 1,385; sh: 56
file content (22 lines) | stat: -rw-r--r-- 629 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "Bdef.h"

void BI_Srecv(BLACSCONTEXT *ctxt, int src, int msgid, BLACBUFF *bp)
{
   int i, info;
   extern MPI_Status *BI_Stats;

   info=MPI_Recv(bp->Buff, bp->N, bp->dtype, src, msgid, ctxt->scp->comm,BI_Stats);
/*
 * If we are doing our own buffering, need to determine the true length of
 * the message just received
 */
#ifndef MpiBuffGood
   if (bp->dtype == MPI_PACKED)
   {
      info=MPI_Get_count(BI_Stats, MPI_PACKED, &i);
      if (i != MPI_UNDEFINED) bp->N = i;
      else BI_BlacsWarn(BI_ContxtNum(ctxt), __LINE__, __FILE__,
                        "MPI_Get_count returned MPI_UNDEFINED.\n");
   }
#endif
}