Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
functioning MPI_Comm_get_name, MPI_Comm_set_name
[simgrid.git] / teshsuite / smpi / mpich3-test / datatype / gaddress.c
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *
4  *  (C) 2003 by Argonne National Laboratory.
5  *      See COPYRIGHT in top-level directory.
6  */
7 #include "mpi.h"
8 #include <stdio.h>
9 #include "mpitest.h"
10
11 /*
12 static char MTEST_Descrip[] = "";
13 */
14
15 int main(int argc, char *argv[])
16 {
17     int errs = 0;
18     int buf[10];
19     MPI_Aint a1, a2;
20
21     MTest_Init(&argc, &argv);
22
23     MPI_Get_address(&buf[0], &a1);
24     MPI_Get_address(&buf[1], &a2);
25
26     if ((int) (a2 - a1) != sizeof(int)) {
27         errs++;
28         printf("Get address of two address did not return values the correct distance apart\n");
29     }
30
31     MTest_Finalize(errs);
32     MPI_Finalize();
33     return 0;
34 }