Fixed type typo in name.
parent
294b8891e6
commit
c4c19d3245
|
@ -25,7 +25,7 @@ typedef struct {
|
|||
|
||||
static char * current = (char*) 1;
|
||||
|
||||
static option_help * DUMMY_options(airori_mod_opt_t ** init_backend_options, airori_mod_opt_t * init_values){
|
||||
static option_help * DUMMY_options(aiori_mod_opt_t ** init_backend_options, aiori_mod_opt_t * init_values){
|
||||
dummy_options_t * o = malloc(sizeof(dummy_options_t));
|
||||
if (init_values != NULL){
|
||||
memcpy(o, init_values, sizeof(dummy_options_t));
|
||||
|
@ -33,7 +33,7 @@ static option_help * DUMMY_options(airori_mod_opt_t ** init_backend_options, air
|
|||
memset(o, 0, sizeof(dummy_options_t));
|
||||
}
|
||||
|
||||
*init_backend_options = (airori_mod_opt_t*) o;
|
||||
*init_backend_options = (aiori_mod_opt_t*) o;
|
||||
|
||||
option_help h [] = {
|
||||
{0, "dummy.delay-create", "Delay per create in usec", OPTION_OPTIONAL_ARGUMENT, 'l', & o->delay_creates},
|
||||
|
@ -48,7 +48,7 @@ static option_help * DUMMY_options(airori_mod_opt_t ** init_backend_options, air
|
|||
|
||||
static int count_init = 0;
|
||||
|
||||
static void *DUMMY_Create(char *testFileName, int iorflags, airori_mod_opt_t * options)
|
||||
static void *DUMMY_Create(char *testFileName, int iorflags, aiori_mod_opt_t * options)
|
||||
{
|
||||
if(count_init <= 0){
|
||||
ERR("DUMMY missing initialization in create\n");
|
||||
|
@ -66,7 +66,7 @@ static void *DUMMY_Create(char *testFileName, int iorflags, airori_mod_opt_t * o
|
|||
return current++;
|
||||
}
|
||||
|
||||
static void *DUMMY_Open(char *testFileName, int flags, airori_mod_opt_t * options)
|
||||
static void *DUMMY_Open(char *testFileName, int flags, aiori_mod_opt_t * options)
|
||||
{
|
||||
if(count_init <= 0){
|
||||
ERR("DUMMY missing initialization in open\n");
|
||||
|
@ -77,7 +77,7 @@ static void *DUMMY_Open(char *testFileName, int flags, airori_mod_opt_t * option
|
|||
return current++;
|
||||
}
|
||||
|
||||
static void DUMMY_Fsync(void *fd, airori_mod_opt_t * options)
|
||||
static void DUMMY_Fsync(void *fd, aiori_mod_opt_t * options)
|
||||
{
|
||||
if(verbose > 4){
|
||||
fprintf(out_logfile, "DUMMY fsync %p\n", fd);
|
||||
|
@ -85,18 +85,18 @@ static void DUMMY_Fsync(void *fd, airori_mod_opt_t * options)
|
|||
}
|
||||
|
||||
|
||||
static void DUMMY_Sync(airori_mod_opt_t * options)
|
||||
static void DUMMY_Sync(aiori_mod_opt_t * options)
|
||||
{
|
||||
}
|
||||
|
||||
static void DUMMY_Close(void *fd, airori_mod_opt_t * options)
|
||||
static void DUMMY_Close(void *fd, aiori_mod_opt_t * options)
|
||||
{
|
||||
if(verbose > 4){
|
||||
fprintf(out_logfile, "DUMMY close %p\n", fd);
|
||||
}
|
||||
}
|
||||
|
||||
static void DUMMY_Delete(char *testFileName, airori_mod_opt_t * options)
|
||||
static void DUMMY_Delete(char *testFileName, aiori_mod_opt_t * options)
|
||||
{
|
||||
if(verbose > 4){
|
||||
fprintf(out_logfile, "DUMMY delete: %s\n", testFileName);
|
||||
|
@ -108,7 +108,7 @@ static char * DUMMY_getVersion()
|
|||
return "0.5";
|
||||
}
|
||||
|
||||
static IOR_offset_t DUMMY_GetFileSize(airori_mod_opt_t * options, MPI_Comm testComm, char *testFileName)
|
||||
static IOR_offset_t DUMMY_GetFileSize(aiori_mod_opt_t * options, MPI_Comm testComm, char *testFileName)
|
||||
{
|
||||
if(verbose > 4){
|
||||
fprintf(out_logfile, "DUMMY getFileSize: %s\n", testFileName);
|
||||
|
@ -116,7 +116,7 @@ static IOR_offset_t DUMMY_GetFileSize(airori_mod_opt_t * options, MPI_Comm testC
|
|||
return 0;
|
||||
}
|
||||
|
||||
static IOR_offset_t DUMMY_Xfer(int access, void *file, IOR_size_t * buffer, IOR_offset_t length, airori_mod_opt_t * options){
|
||||
static IOR_offset_t DUMMY_Xfer(int access, void *file, IOR_size_t * buffer, IOR_offset_t length, aiori_mod_opt_t * options){
|
||||
if(verbose > 4){
|
||||
fprintf(out_logfile, "DUMMY xfer: %p\n", file);
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ static IOR_offset_t DUMMY_Xfer(int access, void *file, IOR_size_t * buffer, IOR_
|
|||
return length;
|
||||
}
|
||||
|
||||
static int DUMMY_statfs (const char * path, ior_aiori_statfs_t * stat, airori_mod_opt_t * options){
|
||||
static int DUMMY_statfs (const char * path, ior_aiori_statfs_t * stat, aiori_mod_opt_t * options){
|
||||
stat->f_bsize = 1;
|
||||
stat->f_blocks = 1;
|
||||
stat->f_bfree = 1;
|
||||
|
@ -140,32 +140,32 @@ static int DUMMY_statfs (const char * path, ior_aiori_statfs_t * stat, airori_mo
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int DUMMY_mkdir (const char *path, mode_t mode, airori_mod_opt_t * options){
|
||||
static int DUMMY_mkdir (const char *path, mode_t mode, aiori_mod_opt_t * options){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int DUMMY_rmdir (const char *path, airori_mod_opt_t * options){
|
||||
static int DUMMY_rmdir (const char *path, aiori_mod_opt_t * options){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int DUMMY_access (const char *path, int mode, airori_mod_opt_t * options){
|
||||
static int DUMMY_access (const char *path, int mode, aiori_mod_opt_t * options){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int DUMMY_stat (const char *path, struct stat *buf, airori_mod_opt_t * options){
|
||||
static int DUMMY_stat (const char *path, struct stat *buf, aiori_mod_opt_t * options){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int DUMMY_check_params(airori_mod_opt_t * options){
|
||||
static int DUMMY_check_params(aiori_mod_opt_t * options){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void DUMMY_init(airori_mod_opt_t * options){
|
||||
static void DUMMY_init(aiori_mod_opt_t * options){
|
||||
WARN("DUMMY initialized");
|
||||
count_init++;
|
||||
}
|
||||
|
||||
static void DUMMY_final(airori_mod_opt_t * options){
|
||||
static void DUMMY_final(aiori_mod_opt_t * options){
|
||||
WARN("DUMMY finalized");
|
||||
if(count_init <= 0){
|
||||
ERR("DUMMY invalid finalization\n");
|
||||
|
|
|
@ -81,20 +81,20 @@
|
|||
#endif /* H5_VERS_MAJOR > 1 && H5_VERS_MINOR > 6 */
|
||||
/**************************** P R O T O T Y P E S *****************************/
|
||||
|
||||
static IOR_offset_t SeekOffset(void *, IOR_offset_t, airori_mod_opt_t *);
|
||||
static void SetupDataSet(void *, airori_mod_opt_t *);
|
||||
static void *HDF5_Create(char *, int flags, airori_mod_opt_t *);
|
||||
static void *HDF5_Open(char *, int flags, airori_mod_opt_t *);
|
||||
static IOR_offset_t SeekOffset(void *, IOR_offset_t, aiori_mod_opt_t *);
|
||||
static void SetupDataSet(void *, aiori_mod_opt_t *);
|
||||
static void *HDF5_Create(char *, int flags, aiori_mod_opt_t *);
|
||||
static void *HDF5_Open(char *, int flags, aiori_mod_opt_t *);
|
||||
static IOR_offset_t HDF5_Xfer(int, void *, IOR_size_t *,
|
||||
IOR_offset_t, airori_mod_opt_t *);
|
||||
static void HDF5_Close(void *, airori_mod_opt_t *);
|
||||
static void HDF5_Delete(char *, airori_mod_opt_t *);
|
||||
IOR_offset_t, aiori_mod_opt_t *);
|
||||
static void HDF5_Close(void *, aiori_mod_opt_t *);
|
||||
static void HDF5_Delete(char *, aiori_mod_opt_t *);
|
||||
static char* HDF5_GetVersion();
|
||||
static void HDF5_Fsync(void *, airori_mod_opt_t *);
|
||||
static IOR_offset_t HDF5_GetFileSize(airori_mod_opt_t *, MPI_Comm, char *);
|
||||
static int HDF5_Access(const char *, int, airori_mod_opt_t *);
|
||||
static void HDF5_Fsync(void *, aiori_mod_opt_t *);
|
||||
static IOR_offset_t HDF5_GetFileSize(aiori_mod_opt_t *, MPI_Comm, char *);
|
||||
static int HDF5_Access(const char *, int, aiori_mod_opt_t *);
|
||||
static void HDF5_init_xfer_options(IOR_param_t * params);
|
||||
static int HDF5_check_params(airori_mod_opt_t * options);
|
||||
static int HDF5_check_params(aiori_mod_opt_t * options);
|
||||
|
||||
/************************** O P T I O N S *****************************/
|
||||
typedef struct{
|
||||
|
@ -107,7 +107,7 @@ typedef struct{
|
|||
} HDF5_options_t;
|
||||
/***************************** F U N C T I O N S ******************************/
|
||||
|
||||
static option_help * HDF5_options(airori_mod_opt_t ** init_backend_options, airori_mod_opt_t * init_values){
|
||||
static option_help * HDF5_options(aiori_mod_opt_t ** init_backend_options, aiori_mod_opt_t * init_values){
|
||||
HDF5_options_t * o = malloc(sizeof(HDF5_options_t));
|
||||
|
||||
if (init_values != NULL){
|
||||
|
@ -119,7 +119,7 @@ static option_help * HDF5_options(airori_mod_opt_t ** init_backend_options, airo
|
|||
o->setAlignment = 1;
|
||||
}
|
||||
|
||||
*init_backend_options = (airori_mod_opt_t*) o;
|
||||
*init_backend_options = (aiori_mod_opt_t*) o;
|
||||
|
||||
option_help h [] = {
|
||||
{0, "hdf5.collectiveMetadata", "Use collectiveMetadata (available since HDF5-1.10.0)", OPTION_FLAG, 'd', & o->collective_md},
|
||||
|
@ -173,7 +173,7 @@ static void HDF5_init_xfer_options(IOR_param_t * params){
|
|||
ior_param = params;
|
||||
}
|
||||
|
||||
static int HDF5_check_params(airori_mod_opt_t * options){
|
||||
static int HDF5_check_params(aiori_mod_opt_t * options){
|
||||
HDF5_options_t *o = (HDF5_options_t*) options;
|
||||
if (o->setAlignment < 0)
|
||||
ERR("alignment must be non-negative integer");
|
||||
|
@ -197,7 +197,7 @@ static int HDF5_check_params(airori_mod_opt_t * options){
|
|||
/*
|
||||
* Create and open a file through the HDF5 interface.
|
||||
*/
|
||||
static void *HDF5_Create(char *testFileName, int flags, airori_mod_opt_t * param)
|
||||
static void *HDF5_Create(char *testFileName, int flags, aiori_mod_opt_t * param)
|
||||
{
|
||||
return HDF5_Open(testFileName, flags, param);
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ static void *HDF5_Create(char *testFileName, int flags, airori_mod_opt_t * param
|
|||
/*
|
||||
* Open a file through the HDF5 interface.
|
||||
*/
|
||||
static void *HDF5_Open(char *testFileName, int flags, airori_mod_opt_t * param)
|
||||
static void *HDF5_Open(char *testFileName, int flags, aiori_mod_opt_t * param)
|
||||
{
|
||||
HDF5_options_t *o = (HDF5_options_t*) param;
|
||||
hid_t accessPropList, createPropList;
|
||||
|
@ -417,7 +417,7 @@ static void *HDF5_Open(char *testFileName, int flags, airori_mod_opt_t * param)
|
|||
* Write or read access to file using the HDF5 interface.
|
||||
*/
|
||||
static IOR_offset_t HDF5_Xfer(int access, void *fd, IOR_size_t * buffer,
|
||||
IOR_offset_t length, airori_mod_opt_t * param)
|
||||
IOR_offset_t length, aiori_mod_opt_t * param)
|
||||
{
|
||||
static int firstReadCheck = FALSE, startNewDataSet;
|
||||
IOR_offset_t segmentPosition, segmentSize;
|
||||
|
@ -495,7 +495,7 @@ static IOR_offset_t HDF5_Xfer(int access, void *fd, IOR_size_t * buffer,
|
|||
/*
|
||||
* Perform fsync().
|
||||
*/
|
||||
static void HDF5_Fsync(void *fd, airori_mod_opt_t * param)
|
||||
static void HDF5_Fsync(void *fd, aiori_mod_opt_t * param)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
@ -503,7 +503,7 @@ static void HDF5_Fsync(void *fd, airori_mod_opt_t * param)
|
|||
/*
|
||||
* Close a file through the HDF5 interface.
|
||||
*/
|
||||
static void HDF5_Close(void *fd, airori_mod_opt_t * param)
|
||||
static void HDF5_Close(void *fd, aiori_mod_opt_t * param)
|
||||
{
|
||||
if(ior_param->dryRun)
|
||||
return;
|
||||
|
@ -524,7 +524,7 @@ static void HDF5_Close(void *fd, airori_mod_opt_t * param)
|
|||
/*
|
||||
* Delete a file through the HDF5 interface.
|
||||
*/
|
||||
static void HDF5_Delete(char *testFileName, airori_mod_opt_t * param)
|
||||
static void HDF5_Delete(char *testFileName, aiori_mod_opt_t * param)
|
||||
{
|
||||
if(ior_param->dryRun)
|
||||
return
|
||||
|
@ -558,7 +558,7 @@ static char * HDF5_GetVersion()
|
|||
* Seek to offset in file using the HDF5 interface and set up hyperslab.
|
||||
*/
|
||||
static IOR_offset_t SeekOffset(void *fd, IOR_offset_t offset,
|
||||
airori_mod_opt_t * param)
|
||||
aiori_mod_opt_t * param)
|
||||
{
|
||||
HDF5_options_t *o = (HDF5_options_t*) param;
|
||||
IOR_offset_t segmentSize;
|
||||
|
@ -598,7 +598,7 @@ static IOR_offset_t SeekOffset(void *fd, IOR_offset_t offset,
|
|||
/*
|
||||
* Create HDF5 data set.
|
||||
*/
|
||||
static void SetupDataSet(void *fd, airori_mod_opt_t * param)
|
||||
static void SetupDataSet(void *fd, aiori_mod_opt_t * param)
|
||||
{
|
||||
HDF5_options_t *o = (HDF5_options_t*) param;
|
||||
char dataSetName[MAX_STR];
|
||||
|
@ -661,7 +661,7 @@ static void SetupDataSet(void *fd, airori_mod_opt_t * param)
|
|||
* Use MPIIO call to get file size.
|
||||
*/
|
||||
static IOR_offset_t
|
||||
HDF5_GetFileSize(airori_mod_opt_t * test, MPI_Comm testComm, char *testFileName)
|
||||
HDF5_GetFileSize(aiori_mod_opt_t * test, MPI_Comm testComm, char *testFileName)
|
||||
{
|
||||
if(ior_param->dryRun)
|
||||
return 0;
|
||||
|
@ -671,7 +671,7 @@ HDF5_GetFileSize(airori_mod_opt_t * test, MPI_Comm testComm, char *testFileName)
|
|||
/*
|
||||
* Use MPIIO call to check for access.
|
||||
*/
|
||||
static int HDF5_Access(const char *path, int mode, airori_mod_opt_t *param)
|
||||
static int HDF5_Access(const char *path, int mode, aiori_mod_opt_t *param)
|
||||
{
|
||||
if(ior_param->dryRun)
|
||||
return 0;
|
||||
|
|
|
@ -26,15 +26,15 @@
|
|||
#include "utilities.h"
|
||||
|
||||
/**************************** P R O T O T Y P E S *****************************/
|
||||
static void *MMAP_Create(char *, int flags, airori_mod_opt_t *);
|
||||
static void *MMAP_Open(char *, int flags, airori_mod_opt_t *);
|
||||
static void *MMAP_Create(char *, int flags, aiori_mod_opt_t *);
|
||||
static void *MMAP_Open(char *, int flags, aiori_mod_opt_t *);
|
||||
static IOR_offset_t MMAP_Xfer(int, void *, IOR_size_t *,
|
||||
IOR_offset_t, airori_mod_opt_t *);
|
||||
static void MMAP_Close(void *, airori_mod_opt_t *);
|
||||
static void MMAP_Fsync(void *, airori_mod_opt_t *);
|
||||
static option_help * MMAP_options(airori_mod_opt_t ** init_backend_options, airori_mod_opt_t * init_values);
|
||||
IOR_offset_t, aiori_mod_opt_t *);
|
||||
static void MMAP_Close(void *, aiori_mod_opt_t *);
|
||||
static void MMAP_Fsync(void *, aiori_mod_opt_t *);
|
||||
static option_help * MMAP_options(aiori_mod_opt_t ** init_backend_options, aiori_mod_opt_t * init_values);
|
||||
static void MMAP_init_xfer_options(IOR_param_t * params);
|
||||
static int MMAP_check_params(airori_mod_opt_t * options);
|
||||
static int MMAP_check_params(aiori_mod_opt_t * options);
|
||||
/************************** D E C L A R A T I O N S ***************************/
|
||||
|
||||
ior_aiori_t mmap_aiori = {
|
||||
|
@ -61,7 +61,7 @@ typedef struct{
|
|||
int madv_pattern;
|
||||
} mmap_options_t;
|
||||
|
||||
static option_help * MMAP_options(airori_mod_opt_t ** init_backend_options, airori_mod_opt_t * init_values){
|
||||
static option_help * MMAP_options(aiori_mod_opt_t ** init_backend_options, aiori_mod_opt_t * init_values){
|
||||
mmap_options_t * o = malloc(sizeof(mmap_options_t));
|
||||
|
||||
if (init_values != NULL){
|
||||
|
@ -70,7 +70,7 @@ static option_help * MMAP_options(airori_mod_opt_t ** init_backend_options, airo
|
|||
memset(o, 0, sizeof(mmap_options_t));
|
||||
}
|
||||
|
||||
*init_backend_options = (airori_mod_opt_t*) o;
|
||||
*init_backend_options = (aiori_mod_opt_t*) o;
|
||||
|
||||
option_help h [] = {
|
||||
{0, "mmap.madv_dont_need", "Use advise don't need", OPTION_FLAG, 'd', & o->madv_dont_need},
|
||||
|
@ -89,7 +89,7 @@ static void MMAP_init_xfer_options(IOR_param_t * params){
|
|||
aiori_posix_init_xfer_options(params);
|
||||
}
|
||||
|
||||
static int MMAP_check_params(airori_mod_opt_t * options){
|
||||
static int MMAP_check_params(aiori_mod_opt_t * options){
|
||||
if (ior_param->fsyncPerWrite && (ior_param->transferSize & (sysconf(_SC_PAGESIZE) - 1)))
|
||||
ERR("transfer size must be aligned with PAGESIZE for MMAP with fsyncPerWrite");
|
||||
return 0;
|
||||
|
@ -130,7 +130,7 @@ static void ior_mmap_file(int *file, int mflags, void *param)
|
|||
/*
|
||||
* Creat and open a file through the POSIX interface, then setup mmap.
|
||||
*/
|
||||
static void *MMAP_Create(char *testFileName, int flags, airori_mod_opt_t * param)
|
||||
static void *MMAP_Create(char *testFileName, int flags, aiori_mod_opt_t * param)
|
||||
{
|
||||
int *fd;
|
||||
|
||||
|
@ -144,7 +144,7 @@ static void *MMAP_Create(char *testFileName, int flags, airori_mod_opt_t * param
|
|||
/*
|
||||
* Open a file through the POSIX interface and setup mmap.
|
||||
*/
|
||||
static void *MMAP_Open(char *testFileName, int flags, airori_mod_opt_t * param)
|
||||
static void *MMAP_Open(char *testFileName, int flags, aiori_mod_opt_t * param)
|
||||
{
|
||||
int *fd;
|
||||
fd = POSIX_Open(testFileName, flags, param);
|
||||
|
@ -156,7 +156,7 @@ static void *MMAP_Open(char *testFileName, int flags, airori_mod_opt_t * param)
|
|||
* Write or read access to file using mmap
|
||||
*/
|
||||
static IOR_offset_t MMAP_Xfer(int access, void *file, IOR_size_t * buffer,
|
||||
IOR_offset_t length, airori_mod_opt_t * param)
|
||||
IOR_offset_t length, aiori_mod_opt_t * param)
|
||||
{
|
||||
mmap_options_t *o = (mmap_options_t*) param;
|
||||
if (access == WRITE) {
|
||||
|
@ -178,7 +178,7 @@ static IOR_offset_t MMAP_Xfer(int access, void *file, IOR_size_t * buffer,
|
|||
/*
|
||||
* Perform msync().
|
||||
*/
|
||||
static void MMAP_Fsync(void *fd, airori_mod_opt_t * param)
|
||||
static void MMAP_Fsync(void *fd, aiori_mod_opt_t * param)
|
||||
{
|
||||
mmap_options_t *o = (mmap_options_t*) param;
|
||||
if (msync(o->mmap_ptr, ior_param->expectedAggFileSize, MS_SYNC) != 0)
|
||||
|
@ -188,7 +188,7 @@ static void MMAP_Fsync(void *fd, airori_mod_opt_t * param)
|
|||
/*
|
||||
* Close a file through the POSIX interface, after tear down the mmap.
|
||||
*/
|
||||
static void MMAP_Close(void *fd, airori_mod_opt_t * param)
|
||||
static void MMAP_Close(void *fd, aiori_mod_opt_t * param)
|
||||
{
|
||||
mmap_options_t *o = (mmap_options_t*) param;
|
||||
if (munmap(o->mmap_ptr, ior_param->expectedAggFileSize) != 0)
|
||||
|
|
|
@ -31,17 +31,17 @@
|
|||
|
||||
/**************************** P R O T O T Y P E S *****************************/
|
||||
|
||||
static IOR_offset_t SeekOffset(MPI_File, IOR_offset_t, airori_mod_opt_t *);
|
||||
static IOR_offset_t SeekOffset(MPI_File, IOR_offset_t, aiori_mod_opt_t *);
|
||||
|
||||
static void *MPIIO_Create(char *, int iorflags, airori_mod_opt_t *);
|
||||
static void *MPIIO_Open(char *, int flags, airori_mod_opt_t *);
|
||||
static void *MPIIO_Create(char *, int iorflags, aiori_mod_opt_t *);
|
||||
static void *MPIIO_Open(char *, int flags, aiori_mod_opt_t *);
|
||||
static IOR_offset_t MPIIO_Xfer(int, void *, IOR_size_t *,
|
||||
IOR_offset_t, airori_mod_opt_t *);
|
||||
static void MPIIO_Close(void *, airori_mod_opt_t *);
|
||||
IOR_offset_t, aiori_mod_opt_t *);
|
||||
static void MPIIO_Close(void *, aiori_mod_opt_t *);
|
||||
static char* MPIIO_GetVersion();
|
||||
static void MPIIO_Fsync(void *, airori_mod_opt_t *);
|
||||
static void MPIIO_Fsync(void *, aiori_mod_opt_t *);
|
||||
static void MPIIO_init_xfer_options(IOR_param_t * params);
|
||||
static int MPIIO_check_params(airori_mod_opt_t * options);
|
||||
static int MPIIO_check_params(aiori_mod_opt_t * options);
|
||||
|
||||
/************************** D E C L A R A T I O N S ***************************/
|
||||
|
||||
|
@ -61,14 +61,14 @@ typedef struct {
|
|||
char * hintsFileName; /* full name for hints file */
|
||||
} mpiio_options_t;
|
||||
|
||||
static option_help * MPIIO_options(airori_mod_opt_t ** init_backend_options, airori_mod_opt_t * init_values){
|
||||
static option_help * MPIIO_options(aiori_mod_opt_t ** init_backend_options, aiori_mod_opt_t * init_values){
|
||||
mpiio_options_t * o = malloc(sizeof(mpiio_options_t));
|
||||
if (init_values != NULL){
|
||||
memcpy(o, init_values, sizeof(mpiio_options_t));
|
||||
}else{
|
||||
memset(o, 0, sizeof(mpiio_options_t));
|
||||
}
|
||||
*init_backend_options = (airori_mod_opt_t*) o;
|
||||
*init_backend_options = (aiori_mod_opt_t*) o;
|
||||
|
||||
option_help h [] = {
|
||||
{0, "mpiio.dryRun", "Dry run, disable actual IO", OPTION_FLAG, 'd', & o->dry_run},
|
||||
|
@ -114,7 +114,7 @@ static void MPIIO_init_xfer_options(IOR_param_t * params){
|
|||
ior_param = params;
|
||||
}
|
||||
|
||||
static int MPIIO_check_params(airori_mod_opt_t * module_options){
|
||||
static int MPIIO_check_params(aiori_mod_opt_t * module_options){
|
||||
mpiio_options_t * param = (mpiio_options_t*) module_options;
|
||||
if ((param->useFileView == TRUE)
|
||||
&& (sizeof(MPI_Aint) < 8) /* used for 64-bit datatypes */
|
||||
|
@ -140,7 +140,7 @@ static int MPIIO_check_params(airori_mod_opt_t * module_options){
|
|||
/*
|
||||
* Try to access a file through the MPIIO interface.
|
||||
*/
|
||||
int MPIIO_Access(const char *path, int mode, airori_mod_opt_t *module_options)
|
||||
int MPIIO_Access(const char *path, int mode, aiori_mod_opt_t *module_options)
|
||||
{
|
||||
mpiio_options_t * param = (mpiio_options_t*) module_options;
|
||||
if(param->dry_run){
|
||||
|
@ -172,7 +172,7 @@ int MPIIO_Access(const char *path, int mode, airori_mod_opt_t *module_options)
|
|||
/*
|
||||
* Create and open a file through the MPIIO interface.
|
||||
*/
|
||||
static void *MPIIO_Create(char *testFileName, int iorflags, airori_mod_opt_t * module_options)
|
||||
static void *MPIIO_Create(char *testFileName, int iorflags, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
return MPIIO_Open(testFileName, iorflags, module_options);
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ static void *MPIIO_Create(char *testFileName, int iorflags, airori_mod_opt_t * m
|
|||
/*
|
||||
* Open a file through the MPIIO interface. Setup file view.
|
||||
*/
|
||||
static void *MPIIO_Open(char *testFileName, int flags, airori_mod_opt_t * module_options)
|
||||
static void *MPIIO_Open(char *testFileName, int flags, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
mpiio_options_t * param = (mpiio_options_t*) module_options;
|
||||
int fd_mode = (int)0,
|
||||
|
@ -329,7 +329,7 @@ static void *MPIIO_Open(char *testFileName, int flags, airori_mod_opt_t * module
|
|||
* Write or read access to file using the MPIIO interface.
|
||||
*/
|
||||
static IOR_offset_t MPIIO_Xfer(int access, void * fdp, IOR_size_t * buffer,
|
||||
IOR_offset_t length, airori_mod_opt_t * module_options)
|
||||
IOR_offset_t length, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
/* NOTE: The second arg is (void *) for reads, and (const void *)
|
||||
for writes. Therefore, one of the two sets of assignments below
|
||||
|
@ -464,7 +464,7 @@ static IOR_offset_t MPIIO_Xfer(int access, void * fdp, IOR_size_t * buffer,
|
|||
/*
|
||||
* Perform fsync().
|
||||
*/
|
||||
static void MPIIO_Fsync(void *fdp, airori_mod_opt_t * module_options)
|
||||
static void MPIIO_Fsync(void *fdp, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
mpiio_options_t * param = (mpiio_options_t*) module_options;
|
||||
if(param->dry_run)
|
||||
|
@ -477,7 +477,7 @@ static void MPIIO_Fsync(void *fdp, airori_mod_opt_t * module_options)
|
|||
/*
|
||||
* Close a file through the MPIIO interface.
|
||||
*/
|
||||
static void MPIIO_Close(void *fdp, airori_mod_opt_t * module_options)
|
||||
static void MPIIO_Close(void *fdp, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
mpiio_options_t * param = (mpiio_options_t*) module_options;
|
||||
mpiio_fd_t * mfd = (mpiio_fd_t*) fdp;
|
||||
|
@ -497,7 +497,7 @@ static void MPIIO_Close(void *fdp, airori_mod_opt_t * module_options)
|
|||
/*
|
||||
* Delete a file through the MPIIO interface.
|
||||
*/
|
||||
void MPIIO_Delete(char *testFileName, airori_mod_opt_t * module_options)
|
||||
void MPIIO_Delete(char *testFileName, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
mpiio_options_t * param = (mpiio_options_t*) module_options;
|
||||
if(param->dry_run)
|
||||
|
@ -522,7 +522,7 @@ static char* MPIIO_GetVersion()
|
|||
* Seek to offset in file using the MPIIO interface.
|
||||
*/
|
||||
static IOR_offset_t SeekOffset(MPI_File fd, IOR_offset_t offset,
|
||||
airori_mod_opt_t * module_options)
|
||||
aiori_mod_opt_t * module_options)
|
||||
{
|
||||
mpiio_options_t * param = (mpiio_options_t*) module_options;
|
||||
int offsetFactor, tasksPerFile;
|
||||
|
@ -564,7 +564,7 @@ static IOR_offset_t SeekOffset(MPI_File fd, IOR_offset_t offset,
|
|||
* Use MPI_File_get_size() to return aggregate file size.
|
||||
* NOTE: This function is used by the HDF5 and NCMPI backends.
|
||||
*/
|
||||
IOR_offset_t MPIIO_GetFileSize(airori_mod_opt_t * module_options, MPI_Comm testComm,
|
||||
IOR_offset_t MPIIO_GetFileSize(aiori_mod_opt_t * module_options, MPI_Comm testComm,
|
||||
char *testFileName)
|
||||
{
|
||||
mpiio_options_t * test = (mpiio_options_t*) module_options;
|
||||
|
|
|
@ -69,10 +69,10 @@
|
|||
|
||||
/**************************** P R O T O T Y P E S *****************************/
|
||||
static IOR_offset_t POSIX_Xfer(int, void *, IOR_size_t *,
|
||||
IOR_offset_t, airori_mod_opt_t *);
|
||||
static void POSIX_Fsync(void *, airori_mod_opt_t *);
|
||||
static void POSIX_Sync(airori_mod_opt_t * );
|
||||
static int POSIX_check_params(airori_mod_opt_t * options);
|
||||
IOR_offset_t, aiori_mod_opt_t *);
|
||||
static void POSIX_Fsync(void *, aiori_mod_opt_t *);
|
||||
static void POSIX_Sync(aiori_mod_opt_t * );
|
||||
static int POSIX_check_params(aiori_mod_opt_t * options);
|
||||
|
||||
/************************** O P T I O N S *****************************/
|
||||
typedef struct{
|
||||
|
@ -97,7 +97,7 @@ typedef struct{
|
|||
} posix_options_t;
|
||||
|
||||
|
||||
option_help * POSIX_options(airori_mod_opt_t ** init_backend_options, airori_mod_opt_t * init_values){
|
||||
option_help * POSIX_options(aiori_mod_opt_t ** init_backend_options, aiori_mod_opt_t * init_values){
|
||||
posix_options_t * o = malloc(sizeof(posix_options_t));
|
||||
|
||||
if (init_values != NULL){
|
||||
|
@ -110,7 +110,7 @@ option_help * POSIX_options(airori_mod_opt_t ** init_backend_options, airori_mod
|
|||
o->beegfs_chunkSize = -1;
|
||||
}
|
||||
|
||||
*init_backend_options = (airori_mod_opt_t*) o;
|
||||
*init_backend_options = (aiori_mod_opt_t*) o;
|
||||
|
||||
option_help h [] = {
|
||||
{0, "posix.odirect", "Direct I/O Mode", OPTION_FLAG, 'd', & o->direct_io},
|
||||
|
@ -172,7 +172,7 @@ void aiori_posix_init_xfer_options(IOR_param_t * params){
|
|||
ior_param = params;
|
||||
}
|
||||
|
||||
static int POSIX_check_params(airori_mod_opt_t * param){
|
||||
static int POSIX_check_params(aiori_mod_opt_t * param){
|
||||
posix_options_t * o = (posix_options_t*) param;
|
||||
if (ior_param->useExistingTestFile && o->lustre_set_striping)
|
||||
ERR("Lustre stripe options are incompatible with useExistingTestFile");
|
||||
|
@ -372,7 +372,7 @@ bool beegfs_createFilePath(char* filepath, mode_t mode, int numTargets, int chun
|
|||
/*
|
||||
* Creat and open a file through the POSIX interface.
|
||||
*/
|
||||
void *POSIX_Create(char *testFileName, int flags, airori_mod_opt_t * param)
|
||||
void *POSIX_Create(char *testFileName, int flags, aiori_mod_opt_t * param)
|
||||
{
|
||||
int fd_oflag = O_BINARY;
|
||||
int mode = 0664;
|
||||
|
@ -503,7 +503,7 @@ int POSIX_Mknod(char *testFileName)
|
|||
/*
|
||||
* Open a file through the POSIX interface.
|
||||
*/
|
||||
void *POSIX_Open(char *testFileName, int flags, airori_mod_opt_t * param)
|
||||
void *POSIX_Open(char *testFileName, int flags, aiori_mod_opt_t * param)
|
||||
{
|
||||
int fd_oflag = O_BINARY;
|
||||
int *fd;
|
||||
|
@ -549,7 +549,7 @@ void *POSIX_Open(char *testFileName, int flags, airori_mod_opt_t * param)
|
|||
* Write or read access to file using the POSIX interface.
|
||||
*/
|
||||
static IOR_offset_t POSIX_Xfer(int access, void *file, IOR_size_t * buffer,
|
||||
IOR_offset_t length, airori_mod_opt_t * param)
|
||||
IOR_offset_t length, aiori_mod_opt_t * param)
|
||||
{
|
||||
int xferRetries = 0;
|
||||
long long remaining = (long long)length;
|
||||
|
@ -634,14 +634,14 @@ static IOR_offset_t POSIX_Xfer(int access, void *file, IOR_size_t * buffer,
|
|||
/*
|
||||
* Perform fsync().
|
||||
*/
|
||||
static void POSIX_Fsync(void *fd, airori_mod_opt_t * param)
|
||||
static void POSIX_Fsync(void *fd, aiori_mod_opt_t * param)
|
||||
{
|
||||
if (fsync(*(int *)fd) != 0)
|
||||
EWARNF("fsync(%d) failed", *(int *)fd);
|
||||
}
|
||||
|
||||
|
||||
static void POSIX_Sync(airori_mod_opt_t * param)
|
||||
static void POSIX_Sync(aiori_mod_opt_t * param)
|
||||
{
|
||||
int ret = system("sync");
|
||||
if (ret != 0){
|
||||
|
@ -653,7 +653,7 @@ static void POSIX_Sync(airori_mod_opt_t * param)
|
|||
/*
|
||||
* Close a file through the POSIX interface.
|
||||
*/
|
||||
void POSIX_Close(void *fd, airori_mod_opt_t * param)
|
||||
void POSIX_Close(void *fd, aiori_mod_opt_t * param)
|
||||
{
|
||||
if(ior_param->dryRun)
|
||||
return;
|
||||
|
@ -665,7 +665,7 @@ void POSIX_Close(void *fd, airori_mod_opt_t * param)
|
|||
/*
|
||||
* Delete a file through the POSIX interface.
|
||||
*/
|
||||
void POSIX_Delete(char *testFileName, airori_mod_opt_t * param)
|
||||
void POSIX_Delete(char *testFileName, aiori_mod_opt_t * param)
|
||||
{
|
||||
if(ior_param->dryRun)
|
||||
return;
|
||||
|
@ -678,7 +678,7 @@ void POSIX_Delete(char *testFileName, airori_mod_opt_t * param)
|
|||
/*
|
||||
* Use POSIX stat() to return aggregate file size.
|
||||
*/
|
||||
IOR_offset_t POSIX_GetFileSize(airori_mod_opt_t * test, MPI_Comm testComm,
|
||||
IOR_offset_t POSIX_GetFileSize(aiori_mod_opt_t * test, MPI_Comm testComm,
|
||||
char *testFileName)
|
||||
{
|
||||
if(ior_param->dryRun)
|
||||
|
|
10
src/aiori.c
10
src/aiori.c
|
@ -152,7 +152,7 @@ void aiori_supported_apis(char * APIs, char * APIs_legacy, enum bench_type type)
|
|||
* This function provides a AIORI statfs for POSIX-compliant filesystems. It
|
||||
* uses statvfs is available and falls back on statfs.
|
||||
*/
|
||||
int aiori_posix_statfs (const char *path, ior_aiori_statfs_t *stat_buf, airori_mod_opt_t * module_options)
|
||||
int aiori_posix_statfs (const char *path, ior_aiori_statfs_t *stat_buf, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
int ret;
|
||||
#if defined(HAVE_STATVFS)
|
||||
|
@ -177,22 +177,22 @@ int aiori_posix_statfs (const char *path, ior_aiori_statfs_t *stat_buf, airori_m
|
|||
return 0;
|
||||
}
|
||||
|
||||
int aiori_posix_mkdir (const char *path, mode_t mode, airori_mod_opt_t * module_options)
|
||||
int aiori_posix_mkdir (const char *path, mode_t mode, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
return mkdir (path, mode);
|
||||
}
|
||||
|
||||
int aiori_posix_rmdir (const char *path, airori_mod_opt_t * module_options)
|
||||
int aiori_posix_rmdir (const char *path, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
return rmdir (path);
|
||||
}
|
||||
|
||||
int aiori_posix_access (const char *path, int mode, airori_mod_opt_t * module_options)
|
||||
int aiori_posix_access (const char *path, int mode, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
return access (path, mode);
|
||||
}
|
||||
|
||||
int aiori_posix_stat (const char *path, struct stat *buf, airori_mod_opt_t * module_options)
|
||||
int aiori_posix_stat (const char *path, struct stat *buf, aiori_mod_opt_t * module_options)
|
||||
{
|
||||
return stat (path, buf);
|
||||
}
|
||||
|
|
73
src/aiori.h
73
src/aiori.h
|
@ -63,39 +63,42 @@ typedef struct ior_aiori_statfs {
|
|||
uint64_t f_ffree;
|
||||
} ior_aiori_statfs_t;
|
||||
|
||||
/* this is a dummy structure to create some type safety */
|
||||
typedef struct airori_mod_opt_t{
|
||||
void * dummy;
|
||||
} airori_mod_opt_t;
|
||||
typedef struct aiori_xfer_hint_t{
|
||||
|
||||
} aiori_xfer_hint_t;
|
||||
|
||||
/* this is a dummy structure to create some type safety */
|
||||
typedef struct aiori_mod_opt_t{
|
||||
void * dummy;
|
||||
} aiori_mod_opt_t;
|
||||
|
||||
typedef struct ior_aiori {
|
||||
char *name;
|
||||
char *name_legacy;
|
||||
void *(*create)(char *, int iorflags, airori_mod_opt_t *);
|
||||
void *(*create)(char *, int iorflags, aiori_mod_opt_t *);
|
||||
int (*mknod)(char *);
|
||||
void *(*open)(char *, int iorflags, airori_mod_opt_t *);
|
||||
void *(*open)(char *, int iorflags, aiori_mod_opt_t *);
|
||||
/*
|
||||
Allow to set generic transfer options that shall be applied to any subsequent IO call.
|
||||
*/
|
||||
void (*init_xfer_options)(IOR_param_t * params);
|
||||
IOR_offset_t (*xfer)(int, void *, IOR_size_t *,
|
||||
IOR_offset_t, airori_mod_opt_t *);
|
||||
void (*close)(void *, airori_mod_opt_t *);
|
||||
void (*delete)(char *, airori_mod_opt_t *);
|
||||
IOR_offset_t, aiori_mod_opt_t *);
|
||||
void (*close)(void *, aiori_mod_opt_t *);
|
||||
void (*delete)(char *, aiori_mod_opt_t *);
|
||||
char* (*get_version)(void);
|
||||
void (*fsync)(void *, airori_mod_opt_t *);
|
||||
IOR_offset_t (*get_file_size)(airori_mod_opt_t * module_options, MPI_Comm, char *);
|
||||
int (*statfs) (const char *, ior_aiori_statfs_t *, airori_mod_opt_t * module_options);
|
||||
int (*mkdir) (const char *path, mode_t mode, airori_mod_opt_t * module_options);
|
||||
int (*rmdir) (const char *path, airori_mod_opt_t * module_options);
|
||||
int (*access) (const char *path, int mode, airori_mod_opt_t * module_options);
|
||||
int (*stat) (const char *path, struct stat *buf, airori_mod_opt_t * module_options);
|
||||
void (*initialize)(airori_mod_opt_t * options); /* called once per program before MPI is started */
|
||||
void (*finalize)(airori_mod_opt_t * options); /* called once per program after MPI is shutdown */
|
||||
option_help * (*get_options)(airori_mod_opt_t ** init_backend_options, airori_mod_opt_t* init_values); /* initializes the backend options as well and returns the pointer to the option help structure */
|
||||
int (*check_params)(airori_mod_opt_t *); /* check if the provided module_optionseters for the given test and the module options are correct, if they aren't print a message and exit(1) or return 1*/
|
||||
void (*sync)(airori_mod_opt_t * ); /* synchronize every pending operation for this storage */
|
||||
void (*fsync)(void *, aiori_mod_opt_t *);
|
||||
IOR_offset_t (*get_file_size)(aiori_mod_opt_t * module_options, MPI_Comm, char *);
|
||||
int (*statfs) (const char *, ior_aiori_statfs_t *, aiori_mod_opt_t * module_options);
|
||||
int (*mkdir) (const char *path, mode_t mode, aiori_mod_opt_t * module_options);
|
||||
int (*rmdir) (const char *path, aiori_mod_opt_t * module_options);
|
||||
int (*access) (const char *path, int mode, aiori_mod_opt_t * module_options);
|
||||
int (*stat) (const char *path, struct stat *buf, aiori_mod_opt_t * module_options);
|
||||
void (*initialize)(aiori_mod_opt_t * options); /* called once per program before MPI is started */
|
||||
void (*finalize)(aiori_mod_opt_t * options); /* called once per program after MPI is shutdown */
|
||||
option_help * (*get_options)(aiori_mod_opt_t ** init_backend_options, aiori_mod_opt_t* init_values); /* initializes the backend options as well and returns the pointer to the option help structure */
|
||||
int (*check_params)(aiori_mod_opt_t *); /* check if the provided module_optionseters for the given test and the module options are correct, if they aren't print a message and exit(1) or return 1*/
|
||||
void (*sync)(aiori_mod_opt_t * ); /* synchronize every pending operation for this storage */
|
||||
bool enable_mdtest;
|
||||
} ior_aiori_t;
|
||||
|
||||
|
@ -132,25 +135,25 @@ const char *aiori_default (void);
|
|||
|
||||
/* some generic POSIX-based backend calls */
|
||||
char * aiori_get_version (void);
|
||||
int aiori_posix_statfs (const char *path, ior_aiori_statfs_t *stat_buf, airori_mod_opt_t * module_options);
|
||||
int aiori_posix_mkdir (const char *path, mode_t mode, airori_mod_opt_t * module_options);
|
||||
int aiori_posix_rmdir (const char *path, airori_mod_opt_t * module_options);
|
||||
int aiori_posix_access (const char *path, int mode, airori_mod_opt_t * module_options);
|
||||
int aiori_posix_stat (const char *path, struct stat *buf, airori_mod_opt_t * module_options);
|
||||
int aiori_posix_statfs (const char *path, ior_aiori_statfs_t *stat_buf, aiori_mod_opt_t * module_options);
|
||||
int aiori_posix_mkdir (const char *path, mode_t mode, aiori_mod_opt_t * module_options);
|
||||
int aiori_posix_rmdir (const char *path, aiori_mod_opt_t * module_options);
|
||||
int aiori_posix_access (const char *path, int mode, aiori_mod_opt_t * module_options);
|
||||
int aiori_posix_stat (const char *path, struct stat *buf, aiori_mod_opt_t * module_options);
|
||||
void aiori_posix_init_xfer_options(IOR_param_t * params);
|
||||
|
||||
void *POSIX_Create(char *testFileName, int flags, airori_mod_opt_t * module_options);
|
||||
void *POSIX_Create(char *testFileName, int flags, aiori_mod_opt_t * module_options);
|
||||
int POSIX_Mknod(char *testFileName);
|
||||
void *POSIX_Open(char *testFileName, int flags, airori_mod_opt_t * module_options);
|
||||
IOR_offset_t POSIX_GetFileSize(airori_mod_opt_t * test, MPI_Comm testComm, char *testFileName);
|
||||
void POSIX_Delete(char *testFileName, airori_mod_opt_t * module_options);
|
||||
void POSIX_Close(void *fd, airori_mod_opt_t * module_options);
|
||||
option_help * POSIX_options(airori_mod_opt_t ** init_backend_options, airori_mod_opt_t * init_values);
|
||||
void *POSIX_Open(char *testFileName, int flags, aiori_mod_opt_t * module_options);
|
||||
IOR_offset_t POSIX_GetFileSize(aiori_mod_opt_t * test, MPI_Comm testComm, char *testFileName);
|
||||
void POSIX_Delete(char *testFileName, aiori_mod_opt_t * module_options);
|
||||
void POSIX_Close(void *fd, aiori_mod_opt_t * module_options);
|
||||
option_help * POSIX_options(aiori_mod_opt_t ** init_backend_options, aiori_mod_opt_t * init_values);
|
||||
|
||||
|
||||
/* NOTE: these 3 MPI-IO functions are exported for reuse by HDF5/PNetCDF */
|
||||
void MPIIO_Delete(char *testFileName, airori_mod_opt_t * module_options);
|
||||
IOR_offset_t MPIIO_GetFileSize(airori_mod_opt_t * options, MPI_Comm testComm, char *testFileName);
|
||||
int MPIIO_Access(const char *, int, airori_mod_opt_t *);
|
||||
void MPIIO_Delete(char *testFileName, aiori_mod_opt_t * module_options);
|
||||
IOR_offset_t MPIIO_GetFileSize(aiori_mod_opt_t * options, MPI_Comm testComm, char *testFileName);
|
||||
int MPIIO_Access(const char *, int, aiori_mod_opt_t *);
|
||||
|
||||
#endif /* not _AIORI_H */
|
||||
|
|
|
@ -23,12 +23,12 @@ typedef struct{
|
|||
void * variable;
|
||||
} option_help;
|
||||
|
||||
typedef struct airori_mod_opt_t airori_mod_opt_t;
|
||||
typedef struct aiori_mod_opt_t aiori_mod_opt_t;
|
||||
|
||||
typedef struct{
|
||||
char * prefix; // may be NULL to include it in the standard name
|
||||
option_help * options;
|
||||
airori_mod_opt_t * defaults; // these default values are taken from the command line
|
||||
aiori_mod_opt_t * defaults; // these default values are taken from the command line
|
||||
} option_module;
|
||||
|
||||
typedef struct{
|
||||
|
|
Loading…
Reference in New Issue