File: BI_Srecv.c

package info (click to toggle)
blacs-mpi 1.1-28.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,320 kB
  • ctags: 2,031
  • sloc: fortran: 14,968; ansic: 12,353; makefile: 531; sh: 1
file content (23 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "Bdef.h"

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

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