From b6265298d8929f828798f83ab8568ef30b2f9177 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Sat, 12 May 2001 22:54:28 -0500 Subject: [svn-r3926] Description: Changed MPI_File_seek then MPI_File_write or MPI_File_read to just MPI_File_write_at and MPI_File_read_at. Some compiler, e.g., IBM mpcc_r does not support MPI_File_seek and MPI_File_read or MPI_File_write. This is a better measurement against HDF5 performance since HDF5 uses MPI_File_write_at and MPI_File_read_at all the times. It is a more thread safe to use MPI_xxx_at than the other seek then read/write approaches. Platforms tested: modi4 (irix64 parallel), IBM sp2. --- testpar/mpi-perf.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/testpar/mpi-perf.c b/testpar/mpi-perf.c index 9e93a68..3d40eb8 100644 --- a/testpar/mpi-perf.c +++ b/testpar/mpi-perf.c @@ -4,6 +4,7 @@ * See COPYING in top-level directory. * * This is contributed by Robert Ross to the HDF5 software. + * and was called mpi-io-test.c */ /* mpi-perf.c @@ -24,6 +25,14 @@ * the processes that make up the parallel job, which isn't always the case. * So if it doesn't work on some platform, that might be why. */ +/* Modifications: + * Albert Cheng, Apr 30, 20001 + * Changed MPI_File_open to use MPI_COMM_WORLD (was MPI_COMM_SELF). + * Albert Cheng, May 5, 20001 + * Changed MPI_File_seek then MPI_File_write or MPI_File_read to just + * MPI_File_write_at and MPI_File_read_at. Some compiler, e.g., IBM + * mpcc_r does not support MPI_File_seek and MPI_File_read or MPI_File_write. + */ #include #include @@ -33,7 +42,10 @@ #include #include #include -#include "mpio.h" +#ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */ +# include +#endif + /* DEFAULT VALUES FOR OPTIONS */ @@ -136,7 +148,7 @@ int main(int argc, char **argv) * rank of the current process */ seek_position = (j*iter_jump)+(mynod*opt_block); - MPI_File_seek(fh, seek_position, MPI_SEEK_SET); +/* MPI_File_seek(fh, seek_position, MPI_SEEK_SET);*/ if (opt_correct) /* fill in buffer for iteration */ { for (i=mynod+j, check=buf; i