Commit 449eab8d authored by Lisandro Dalcin's avatar Lisandro Dalcin Committed by Rob Latham
Browse files

testcase for MPI_Error_string()



The MPI-3 standard says (pp.354, lines 39-40):

"""
If MPI_ERROR_STRING is called when no string has been set, it will
return a empty
string (all spaces in Fortran, "" in C).
"""

RobL added bits to hook into the test infrastrucutre.
Signed-off-by: Rob Latham's avatarRob Latham <robl@mcs.anl.gov>
parent 87de5b09
......@@ -18,7 +18,8 @@ noinst_PROGRAMS = \
adderr \
commcall \
errfatal \
predef_eh
predef_eh \
errstring2
EXTRA_PROGRAMS = errcode errring errstring
......
#include <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[])
{
int errorclass;
char errorstring[MPI_MAX_ERROR_STRING] = {64,0};
int slen;
MPI_Init(&argc, &argv);
MPI_Add_error_class(&errorclass);
MPI_Error_string(errorclass, errorstring, &slen);
printf("errorclass:%d errorstring:'%s' len:%d\n", errorclass,
errorstring, slen);
MPI_Finalize();
return 0;
}
......@@ -3,3 +3,4 @@ commcall 2
errfatal 1 resultTest=TestErrFatal
predef_eh 1
predef_eh 2
errstring2 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment