diff --git a/src/aiori-MMAP.c b/src/aiori-MMAP.c index 7f34d51..ac622ff 100644 --- a/src/aiori-MMAP.c +++ b/src/aiori-MMAP.c @@ -42,7 +42,7 @@ ior_aiori_t mmap_aiori = { .xfer = MMAP_Xfer, .close = MMAP_Close, .delete = POSIX_Delete, - .set_version = POSIX_SetVersion, + .set_version = aiori_set_version, .fsync = MMAP_Fsync, .get_file_size = POSIX_GetFileSize, }; diff --git a/src/aiori-MPIIO.c b/src/aiori-MPIIO.c index d8c8d5e..7405ca5 100755 --- a/src/aiori-MPIIO.c +++ b/src/aiori-MPIIO.c @@ -377,7 +377,7 @@ static IOR_offset_t MPIIO_Xfer(int access, void *fd, IOR_size_t * buffer, */ static void MPIIO_Fsync(void *fdp, IOR_param_t * param) { - if (MPI_File_sync(*(MPI_File *)fd) != MPI_SUCCESS) + if (MPI_File_sync(*(MPI_File *)fdp) != MPI_SUCCESS) EWARN("fsync() failed"); } @@ -507,4 +507,4 @@ IOR_offset_t MPIIO_GetFileSize(IOR_param_t * test, MPI_Comm testComm, } return (aggFileSizeFromStat); -} \ No newline at end of file +} diff --git a/src/aiori-POSIX.c b/src/aiori-POSIX.c index 7e0dbdf..24d1d45 100755 --- a/src/aiori-POSIX.c +++ b/src/aiori-POSIX.c @@ -78,7 +78,7 @@ ior_aiori_t posix_aiori = { .xfer = POSIX_Xfer, .close = POSIX_Close, .delete = POSIX_Delete, - .set_version = POSIX_SetVersion, + .set_version = aiori_set_version, .fsync = POSIX_Fsync, .get_file_size = POSIX_GetFileSize, .statfs = aiori_posix_statfs, @@ -512,14 +512,6 @@ void POSIX_Delete(char *testFileName, IOR_param_t * param) EWARN(errmsg); } -/* - * Determine api version. - */ -void POSIX_SetVersion(IOR_param_t * test) -{ - strcpy(test->apiVersion, test->api); -} - /* * Use POSIX stat() to return aggregate file size. */ diff --git a/src/aiori.c b/src/aiori.c index c36de4a..8e3319e 100644 --- a/src/aiori.c +++ b/src/aiori.c @@ -112,6 +112,13 @@ int aiori_posix_stat (const char *path, struct stat *buf, IOR_param_t * param) return stat (path, buf); } +void aiori_set_version(IOR_param_t * test) +{ + strcpy(test->apiVersion, test->api); +} + + + const ior_aiori_t *aiori_select (const char *api) { char warn_str[256] = {0}; diff --git a/src/aiori.h b/src/aiori.h index 94c99e6..ca28c3c 100755 --- a/src/aiori.h +++ b/src/aiori.h @@ -96,12 +96,19 @@ int aiori_count (void); const char *aiori_default (void); /* some generic POSIX-based backend calls */ +void aiori_set_version(IOR_param_t * test); int aiori_posix_statfs (const char *path, ior_aiori_statfs_t *stat_buf, IOR_param_t * param); int aiori_posix_mkdir (const char *path, mode_t mode, IOR_param_t * param); int aiori_posix_rmdir (const char *path, IOR_param_t * param); int aiori_posix_access (const char *path, int mode, IOR_param_t * param); int aiori_posix_stat (const char *path, struct stat *buf, IOR_param_t * param); +void *POSIX_Create(char *testFileName, IOR_param_t * param); +void *POSIX_Open(char *testFileName, IOR_param_t * param); +IOR_offset_t POSIX_GetFileSize(IOR_param_t * test, MPI_Comm testComm, char *testFileName); +void POSIX_Delete(char *testFileName, IOR_param_t * param); +void POSIX_Close(void *fd, IOR_param_t * param); + /* NOTE: these 3 MPI-IO functions are exported for reuse by HDF5/PNetCDF */ void MPIIO_Delete(char *testFileName, IOR_param_t * param); IOR_offset_t MPIIO_GetFileSize(IOR_param_t * test, MPI_Comm testComm, diff --git a/src/ior.c b/src/ior.c index b53f867..36f13d6 100755 --- a/src/ior.c +++ b/src/ior.c @@ -1687,7 +1687,7 @@ static void ValidateTests(IOR_param_t * test) test, &defaults, singleXferAttempt); if (((strcasecmp(test->api, "POSIX") != 0) && (strcasecmp(test->api, "MPIIO") != 0) - && (strcasecmp(test->api, "MMAP") != 0) && + && (strcasecmp(test->api, "MMAP") != 0) && (strcasecmp(test->api, "HDFS") != 0)) && test->fsync) WARN_RESET("fsync() not supported in selected backend", test, &defaults, fsync); diff --git a/testing/basic-tests.sh b/testing/basic-tests.sh index 885a884..c81b129 100755 --- a/testing/basic-tests.sh +++ b/testing/basic-tests.sh @@ -15,7 +15,7 @@ MDTEST 2 -a POSIX -W 2 IOR 1 -a POSIX -w -z -F -Y -e -i1 -m -t 100k -b 1000k IOR 1 -a POSIX -w -z -F -k -e -i2 -m -t 100k -b 100k -IOR 1 -a POSIX -r -z -F -k -e -i1 -m -t 100k -b 100k +IOR 1 -a MMAP -r -z -F -k -e -i1 -m -t 100k -b 100k IOR 2 -a POSIX -w -z -C -F -k -e -i1 -m -t 100k -b 100k IOR 2 -a POSIX -w -z -C -Q 1 -F -k -e -i1 -m -t 100k -b 100k