File: BI_GetMpiGeType.c

package info (click to toggle)
scalapack 2.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 36,184 kB
  • sloc: fortran: 338,772; ansic: 75,298; makefile: 1,392; sh: 56
file content (24 lines) | stat: -rw-r--r-- 559 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
23
24
#include "Bdef.h"
MPI_Datatype BI_GetMpiGeType(BLACSCONTEXT *ctxt, int m, int n, int lda,
                                MPI_Datatype Dtype, int *N)
{
   int info;
   MPI_Datatype GeType;

/*
 * Some versions of mpich and its derivitives cannot handle 0 byte typedefs,
 * so we set type MPI_BYTE as a flag for a 0 byte message
 */
#ifdef ZeroByteTypeBug
   if ( (m < 1) || (n < 1) )
   {
      *N = 0;
      return (MPI_BYTE);
   }
#endif
   *N = 1;
   info=MPI_Type_vector(n, m, lda, Dtype, &GeType);
   info=MPI_Type_commit(&GeType);

   return(GeType);
}