1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
4 * (C) 2003 by Argonne National Laboratory.
5 * See COPYRIGHT in top-level directory.
13 static char MTEST_Descrip[] = "Test of the sized types, supported in MPI-2";
16 int main(int argc, char *argv[])
21 MTest_Init(&argc, &argv);
23 MPI_Type_size(MPI_REAL4, &size);
26 printf("MPI_REAL4 has size %d\n", size);
28 MPI_Type_size(MPI_REAL8, &size);
31 printf("MPI_REAL8 has size %d\n", size);
33 if (MPI_REAL16 != MPI_DATATYPE_NULL) {
34 MPI_Type_size(MPI_REAL16, &size);
37 printf("MPI_REAL16 has size %d\n", size);
41 MPI_Type_size(MPI_COMPLEX8, &size);
44 printf("MPI_COMPLEX8 has size %d\n", size);
46 MPI_Type_size(MPI_COMPLEX16, &size);
49 printf("MPI_COMPLEX16 has size %d\n", size);
51 if (MPI_COMPLEX32 != MPI_DATATYPE_NULL) {
52 MPI_Type_size(MPI_COMPLEX32, &size);
55 printf("MPI_COMPLEX32 has size %d\n", size);
59 MPI_Type_size(MPI_INTEGER1, &size);
62 printf("MPI_INTEGER1 has size %d\n", size);
64 MPI_Type_size(MPI_INTEGER2, &size);
67 printf("MPI_INTEGER2 has size %d\n", size);
69 MPI_Type_size(MPI_INTEGER4, &size);
72 printf("MPI_INTEGER4 has size %d\n", size);
74 if (MPI_INTEGER8 != MPI_DATATYPE_NULL) {
75 MPI_Type_size(MPI_INTEGER8, &size);
78 printf("MPI_INTEGER8 has size %d\n", size);
81 #ifdef HAVE_MPI_INTEGER16
82 if (MPI_INTEGER16 != MPI_DATATYPE_NULL) {
83 MPI_Type_size(MPI_INTEGER16, &size);
86 printf("MPI_INTEGER16 has size %d\n", size);