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 / typefree.c
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *  (C) 2007 by Argonne National Laboratory.
4  *      See COPYRIGHT in top-level directory.
5  */
6 #include "mpi.h"
7 #include "mpitest.h"
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <string.h>
11
12 /*
13  * This test may be used to confirm that memory is properly recovered from
14  * freed datatypes.  To test this, build the MPI implementation with memory
15  * leak checking.  As this program may be run with a single process, it should
16  * also be easy to run it under valgrind or a similar program.  With MPICH,
17  * you can configure with the option
18  *
19  *   --enable-g=mem
20  *
21  * to turn on MPICH's internal memory checking.
22  */
23
24 int main(int argc, char *argv[])
25 {
26     int errs = 0;
27     MPI_Datatype type;
28
29     MTest_Init(&argc, &argv);
30     MPI_Type_dup(MPI_INT, &type);
31     MPI_Type_free(&type);
32     MTest_Finalize(errs);
33     MPI_Finalize();
34     return 0;
35 }