X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cadaf14d02d7d926cd339088dacff03077ba004f..bc75e22e7ea7c0fdc45e5622d8f95b90bdcf2c27:/teshsuite/smpi/mpich3-test/info/infoorder.c diff --git a/teshsuite/smpi/mpich3-test/info/infoorder.c b/teshsuite/smpi/mpich3-test/info/infoorder.c new file mode 100644 index 0000000000..aa1db8c35b --- /dev/null +++ b/teshsuite/smpi/mpich3-test/info/infoorder.c @@ -0,0 +1,166 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +/* + * + * (C) 2003 by Argonne National Laboratory. + * See COPYRIGHT in top-level directory. + */ +#include "mpi.h" +#include +#include +#include "mpitest.h" +#include "mpitestconf.h" +#ifdef HAVE_STRING_H +#include +#endif + +#define NKEYS 3 +int main( int argc, char *argv[] ) +{ + int errs = 0; + MPI_Info info; + char *keys1[NKEYS] = { (char*)"file", (char*)"soft", (char*)"host" }; + char *values1[NKEYS] = { (char*)"runfile.txt", (char*)"2:1000:4,3:1000:7", + (char*)"myhost.myorg.org" }; + + char value[MPI_MAX_INFO_VAL]; + int i, flag; + + MTest_Init( &argc, &argv ); + + /* 1,2,3 */ + MPI_Info_create( &info ); + /* Use only named keys incase the info implementation only supports + the predefined keys (e.g., IBM) */ + for (i=0; i=0; i--) { + MPI_Info_set( info, keys1[i], values1[i] ); + } + + /* Check that all values are present */ + for (i=0; i