Bugfix merge

master
Julian M. Kunkel 2018-07-12 16:13:40 +01:00
parent 1577dacd25
commit 205b20f0f4
7 changed files with 20 additions and 14 deletions

View File

@ -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,
};

View File

@ -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);
}
}

View File

@ -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.
*/

View File

@ -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};

View File

@ -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,

View File

@ -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);

View File

@ -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