Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the size of partial shared malloc tests.
[simgrid.git] / teshsuite / smpi / mpich3-test / datatype / zeroparms.c
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *  (C) 2001 by Argonne National Laboratory.
4  *      See COPYRIGHT in top-level directory.
5  */
6 #include "mpi.h"
7
8 #include <stdio.h>
9
10 int main(int argc, char *argv[])
11 {
12     MPI_Datatype newtype;
13     int b[1], d[1];
14
15     MPI_Init(&argc, &argv);
16
17     /* create a legitimate type to see that we don't
18      * emit spurious errors.
19      */
20     MPI_Type_hvector(0, 1, 10, MPI_DOUBLE, &newtype);
21     MPI_Type_commit(&newtype);
22     MPI_Type_free(&newtype);
23
24     MPI_Type_indexed(0, b, d, MPI_DOUBLE, &newtype);
25     MPI_Type_commit(&newtype);
26
27     MPI_Sendrecv(b, 1, newtype, 0, 0, d, 0, newtype, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
28
29     printf(" No Errors\n");
30
31     MPI_Type_free(&newtype);
32
33     MPI_Finalize();
34
35     return 0;
36 }