Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add tests for errhandlers
[simgrid.git] / teshsuite / smpi / mpich3-test / errhan / errstring2.c
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *  (C) 2014 by Argonne National Laboratory.
4  *      See COPYRIGHT in top-level directory.
5  */
6
7 #include <stdio.h>
8 #include <mpi.h>
9 #include <string.h>
10 #include "mpitest.h"
11
12 int main(int argc, char *argv[])
13 {
14     int errorclass;
15     char errorstring[MPI_MAX_ERROR_STRING] = { 64, 0 };
16     int slen;
17     int errs = 0;
18
19     MTest_Init(&argc, &argv);
20     MPI_Add_error_class(&errorclass);
21     MPI_Error_string(errorclass, errorstring, &slen);
22     if (strncmp(errorstring, "", 1)) {
23         fprintf(stderr, "errorclass:%d errorstring:'%s' len:%d\n", errorclass, errorstring, slen);
24         errs++;
25     }
26     MTest_Finalize(errs);
27     return MTestReturnValue(errs);
28 }