summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testpar/t_mdset.c14
-rw-r--r--testpar/testphdf5.h4
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(); \