Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
be041816e3ef8aca4ca19674ffa3cc7b0030efe3
[simgrid.git] / teshsuite / smpi / mpich-test / pt2pt / testtypes.c
1 #include <stdio.h>
2 #include "mpi.h"
3 #include "test.h"
4
5 int main( int argc, char **argv )
6 {
7   int i_size;
8   MPI_Aint i_extent;
9     
10   MPI_Init(&argc, &argv);
11
12
13   MPI_Type_extent(MPI_INT, &i_extent);
14   printf("MPI_Type_extent (MPI_INT) = %ld\n", i_extent);
15
16   MPI_Type_size(MPI_INT, &i_size);
17   printf("MPI_Type_size (MPI_INT) = %d\n", i_size);
18
19
20   MPI_Type_extent(MPI_UNSIGNED, &i_extent);
21   printf("MPI_Type_extent (MPI_UNSIGNED) = %ld\n", i_extent);
22
23   MPI_Type_size(MPI_UNSIGNED, &i_size);
24   printf("MPI_Type_size (MPI_UNSIGNED) = %d\n", i_size);
25
26 #if defined(HAVE_LONG_DOUBLE)
27   MPI_Type_extent(MPI_LONG_DOUBLE, &i_extent);
28   printf("MPI_Type_extent (MPI_LONG_DOUBLE) = %ld\n", i_extent);
29
30   MPI_Type_size(MPI_LONG_DOUBLE, &i_size);
31   printf("MPI_Type_size (MPI_LONG_DOUBLE) = %d\n", i_size);
32 #endif
33
34   Test_Waitforall( );
35   MPI_Finalize();
36   return 0;
37 }