File: syserrors.c

package info (click to toggle)
scalapack 2.2.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,724 kB
  • sloc: fortran: 339,123; ansic: 74,530; makefile: 1,494; sh: 33
file content (27 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
#include <mpi.h>

main(int nargs, char **args)
{
   MPI_Datatype Dtype, Dt;
   int i, j, ierr;

   MPI_Init(&nargs, &args);
   printf( "If this routine does not complete, you should set SYSERRORS = -DZeroByteTypeBug.\n");

   i = 0;
   j = 1;
   ierr = MPI_Type_indexed(1, &i, &j, MPI_INT, &Dtype);
   if (ierr == MPI_SUCCESS)
   {
      MPI_Type_commit(&Dtype);
      ierr = MPI_Type_vector(0, 1, 1, MPI_INT, &Dt);
      if (ierr != MPI_SUCCESS)
         printf("MPI_Type_vector returned %d, set SYSERRORS = -DZeroByteTypeBug\n", ierr);
      else MPI_Type_commit(&Dt);
   }
   else printf("MPI_Type_commit returned %d, set SYSERRORS = -DZeroByteTypeBug\n", ierr);
   if (ierr == MPI_SUCCESS) printf("Leave SYSERRORS blank for this system.\n");

   MPI_Finalize();
}