From a7e6dfe5bc705841ca1faf2d8e5c5d63f8c760f5 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 20 Nov 2000 19:55:14 -0500 Subject: [svn-r2983] Purpose: Simple changes Description: testphdf5.h: Call MPI_Abort when error is detected. MPI_Finalized was used before but it might hang if the test has already encountered errors. Also, it does not do the H5Eprint any more since auto report is on. t_mdest.c: Changed the variable name of rank and nprocs to mpi_rank and mpi_size so that it is the same with the other tests and can use the VRFY macro call. Platforms tested: modi4-64. --- testpar/t_mdset.c | 14 +++++++------- testpar/testphdf5.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 86f393e..8b9d505 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -6,7 +6,7 @@ void multiple_dset_write(char *filename) { - int i, j, n, nprocs, rank; + int i, j, n, mpi_size, mpi_rank; hid_t iof, plist, dataset, memspace, filespace; hssize_t chunk_origin [DIM]; hsize_t chunk_dims [DIM], file_dims [DIM]; @@ -15,14 +15,14 @@ void multiple_dset_write(char *filename) char dname [100]; - MPI_Comm_rank (MPI_COMM_WORLD, &rank); - MPI_Comm_size (MPI_COMM_WORLD, &nprocs); + MPI_Comm_rank (MPI_COMM_WORLD, &mpi_rank); + MPI_Comm_size (MPI_COMM_WORLD, &mpi_size); - VRFY((nprocs <= SIZE), "nprocs <= SIZE"); + VRFY((mpi_size <= SIZE), "mpi_size <= SIZE"); - chunk_origin [0] = rank * (SIZE / nprocs); + chunk_origin [0] = mpi_rank * (SIZE / mpi_size); chunk_origin [1] = 0; - chunk_dims [0] = SIZE / nprocs; + chunk_dims [0] = SIZE / mpi_size; chunk_dims [1] = SIZE; for (i = 0; i < DIM; i++) @@ -45,7 +45,7 @@ void multiple_dset_write(char *filename) /* calculate data to write */ for (i = 0; i < SIZE; i++) for (j = 0; j < SIZE; j++) - outme [i][j] = n*1000 + rank; + outme [i][j] = n*1000 + mpi_rank; H5Dwrite (dataset, H5T_NATIVE_DOUBLE, memspace, filespace, H5P_DEFAULT, outme); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index b246f6a..371e07f 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -21,14 +21,14 @@ } \ } \ else{ \ + printf("Proc %d: ", mpi_rank); \ printf("*** PHDF5 Assertion failed (%s) at line %4d in %s\n", \ mesg, (int)__LINE__, __FILE__); \ nerrors++; \ - H5Eprint (stdout); \ fflush(stdout); \ if (!verbose){ \ printf("aborting MPI process\n"); \ - MPI_Abort(MPI_COMM_WORLD, nerrors); \ + MPI_Finalize(); exit(nerrors); \ } \ } \ H5Eclear(); \ -- cgit v0.12