make ncmpi/hdf5 use mpiio access/delete

Signed-off-by: Julian M. Kunkel <juliankunkel@googlemail.com>
master
Shane Snyder 2018-04-25 17:34:25 -05:00 committed by Julian M. Kunkel
parent 1a3c92718b
commit 8069e018e3
4 changed files with 41 additions and 6 deletions

View File

@ -92,6 +92,7 @@ static void HDF5_Delete(char *, IOR_param_t *);
static void HDF5_SetVersion(IOR_param_t *);
static void HDF5_Fsync(void *, IOR_param_t *);
static IOR_offset_t HDF5_GetFileSize(IOR_param_t *, MPI_Comm, char *);
static int HDF5_Access(const char *, int, IOR_param_t *);
/************************** D E C L A R A T I O N S ***************************/
@ -105,6 +106,11 @@ ior_aiori_t hdf5_aiori = {
.set_version = HDF5_SetVersion,
.fsync = HDF5_Fsync,
.get_file_size = HDF5_GetFileSize,
.statfs = aiori_posix_statfs,
.mkdir = aiori_posix_mkdir,
.rmdir = aiori_posix_rmdir,
.access = HDF5_Access,
.stat = aiori_posix_stat,
};
static hid_t xferPropList; /* xfer property list */
@ -435,8 +441,7 @@ static void HDF5_Close(void *fd, IOR_param_t * param)
*/
static void HDF5_Delete(char *testFileName, IOR_param_t * param)
{
if (unlink(testFileName) != 0)
WARN("cannot delete file");
return(MPIIO_Delete(testFileName, param));
}
/*
@ -565,5 +570,13 @@ static void SetupDataSet(void *fd, IOR_param_t * param)
static IOR_offset_t
HDF5_GetFileSize(IOR_param_t * test, MPI_Comm testComm, char *testFileName)
{
return (MPIIO_GetFileSize(test, testComm, testFileName));
return(MPIIO_GetFileSize(test, testComm, testFileName));
}
/*
* Use MPIIO call to check for access.
*/
static int HDF5_Access(const char *path, int mode, IOR_param_t *param)
{
return(MPIIO_Access(path, mode, param));
}

View File

@ -55,7 +55,11 @@ ior_aiori_t mpiio_aiori = {
.set_version = MPIIO_SetVersion,
.fsync = MPIIO_Fsync,
.get_file_size = MPIIO_GetFileSize,
.statfs = aiori_posix_statfs,
.mkdir = aiori_posix_mkdir,
.rmdir = aiori_posix_rmdir,
.access = MPIIO_Access,
.stat = aiori_posix_stat,
};
/***************************** F U N C T I O N S ******************************/

View File

@ -56,6 +56,7 @@ static void NCMPI_Delete(char *, IOR_param_t *);
static void NCMPI_SetVersion(IOR_param_t *);
static void NCMPI_Fsync(void *, IOR_param_t *);
static IOR_offset_t NCMPI_GetFileSize(IOR_param_t *, MPI_Comm, char *);
static int NCMPI_Access(const char *, int, IOR_param_t *);
/************************** D E C L A R A T I O N S ***************************/
@ -69,6 +70,11 @@ ior_aiori_t ncmpi_aiori = {
.set_version = NCMPI_SetVersion,
.fsync = NCMPI_Fsync,
.get_file_size = NCMPI_GetFileSize,
.statfs = aiori_posix_statfs,
.mkdir = aiori_posix_mkdir,
.rmdir = aiori_posix_rmdir,
.access = NCMPI_Access,
.stat = aiori_posix_stat,
};
/***************************** F U N C T I O N S ******************************/
@ -329,8 +335,7 @@ static void NCMPI_Close(void *fd, IOR_param_t * param)
*/
static void NCMPI_Delete(char *testFileName, IOR_param_t * param)
{
if (unlink(testFileName) != 0)
WARN("unlink() failed");
return(MPIIO_Delete(testFileName, param));
}
/*
@ -387,5 +392,13 @@ static int GetFileMode(IOR_param_t * param)
static IOR_offset_t NCMPI_GetFileSize(IOR_param_t * test, MPI_Comm testComm,
char *testFileName)
{
return (MPIIO_GetFileSize(test, testComm, testFileName));
return(MPIIO_GetFileSize(test, testComm, testFileName));
}
/*
* Use MPIIO call to check for access.
*/
static int NCMPI_Access(const char *path, int mode, IOR_param_t *param)
{
return(MPIIO_Access(path, mode, param));
}

View File

@ -81,6 +81,11 @@ ior_aiori_t posix_aiori = {
.set_version = POSIX_SetVersion,
.fsync = POSIX_Fsync,
.get_file_size = POSIX_GetFileSize,
.statfs = aiori_posix_statfs,
.mkdir = aiori_posix_mkdir,
.rmdir = aiori_posix_rmdir,
.access = aiori_posix_access,
.stat = aiori_posix_stat,
};
/***************************** F U N C T I O N S ******************************/