IOR
|
#include <mpi.h>
#include <mpio.h>
#include <sys/stat.h>
#include <stdbool.h>
#include "ior.h"
#include "iordef.h"
#include "option.h"
Go to the source code of this file.
Data Structures | |
struct | ior_aiori_statfs |
struct | ior_aiori |
Macros | |
#define | IOR_RDONLY 0x01 /* read only */ |
#define | IOR_WRONLY 0x02 /* write only */ |
#define | IOR_RDWR 0x04 /* read/write */ |
#define | IOR_APPEND 0x08 /* append */ |
#define | IOR_CREAT 0x10 /* create */ |
#define | IOR_TRUNC 0x20 /* truncate */ |
#define | IOR_EXCL 0x40 /* exclusive */ |
#define | IOR_DIRECT 0x80 /* bypass I/O buffers */ |
#define | IOR_IRWXU 0x0001 /* read, write, execute perm: owner */ |
#define | IOR_IRUSR 0x0002 /* read permission: owner */ |
#define | IOR_IWUSR 0x0004 /* write permission: owner */ |
#define | IOR_IXUSR 0x0008 /* execute permission: owner */ |
#define | IOR_IRWXG 0x0010 /* read, write, execute perm: group */ |
#define | IOR_IRGRP 0x0020 /* read permission: group */ |
#define | IOR_IWGRP 0x0040 /* write permission: group */ |
#define | IOR_IXGRP 0x0080 /* execute permission: group */ |
#define | IOR_IRWXO 0x0100 /* read, write, execute perm: other */ |
#define | IOR_IROTH 0x0200 /* read permission: other */ |
#define | IOR_IWOTH 0x0400 /* write permission: other */ |
#define | IOR_IXOTH 0x0800 /* execute permission: other */ |
Typedefs | |
typedef struct ior_aiori_statfs | ior_aiori_statfs_t |
typedef struct ior_aiori | ior_aiori_t |
Enumerations | |
enum | bench_type { IOR, MDTEST } |
Functions | |
void | aiori_initialize (IOR_test_t *tests) |
void | aiori_finalize (IOR_test_t *tests) |
const ior_aiori_t * | aiori_select (const char *api) |
int | aiori_count (void) |
void | aiori_supported_apis (char *APIs, char *APIs_legacy, enum bench_type type) |
options_all_t * | airoi_create_all_module_options (option_help *global_options) |
void * | airoi_update_module_options (const ior_aiori_t *backend, options_all_t *module_defaults) |
const char * | aiori_default (void) |
char * | aiori_get_version (void) |
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) |
int | POSIX_Mknod (char *testFileName) |
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) |
option_help * | POSIX_options (void **init_backend_options, void *init_values) |
void | MPIIO_Delete (char *testFileName, IOR_param_t *param) |
IOR_offset_t | MPIIO_GetFileSize (IOR_param_t *test, MPI_Comm testComm, char *testFileName) |
int | MPIIO_Access (const char *, int, IOR_param_t *) |
#define IOR_APPEND 0x08 /* append */ |
Definition at line 37 of file aiori.h.
Referenced by CEPHFS_Open(), GetFileMode(), HDF5_Open(), HDFS_Create_Or_Open(), and IME_Open().
#define IOR_CREAT 0x10 /* create */ |
Definition at line 38 of file aiori.h.
Referenced by CEPHFS_Open(), CheckRunSettings(), collective_helper(), create_file(), EMC_Open(), GetFileMode(), HDF5_Open(), HDFS_Open(), IME_Open(), init_IOR_Param_t(), RADOS_Open(), and S3_Open().
#define IOR_DIRECT 0x80 /* bypass I/O buffers */ |
Definition at line 41 of file aiori.h.
Referenced by CEPHFS_Open(), GetFileMode(), and HDF5_Open().
#define IOR_EXCL 0x40 /* exclusive */ |
Definition at line 40 of file aiori.h.
Referenced by CEPHFS_Open(), CheckRunSettings(), GetFileMode(), HDF5_Open(), HDFS_Create_Or_Open(), IME_Open(), RADOS_Create_Or_Open(), and S3_Create_Or_Open_internal().
#define IOR_IRGRP 0x0020 /* read permission: group */ |
Definition at line 49 of file aiori.h.
Referenced by init_IOR_Param_t().
#define IOR_IRUSR 0x0002 /* read permission: owner */ |
Definition at line 45 of file aiori.h.
Referenced by init_IOR_Param_t().
#define IOR_IRWXG 0x0010 /* read, write, execute perm: group */ |
#define IOR_IRWXO 0x0100 /* read, write, execute perm: other */ |
#define IOR_IRWXU 0x0001 /* read, write, execute perm: owner */ |
#define IOR_IWGRP 0x0040 /* write permission: group */ |
Definition at line 50 of file aiori.h.
Referenced by init_IOR_Param_t().
#define IOR_IWUSR 0x0004 /* write permission: owner */ |
Definition at line 46 of file aiori.h.
Referenced by init_IOR_Param_t().
#define IOR_RDONLY 0x01 /* read only */ |
Definition at line 34 of file aiori.h.
Referenced by CEPHFS_Open(), CheckRunSettings(), GetFileMode(), HDF5_Open(), and IME_Open().
#define IOR_RDWR 0x04 /* read/write */ |
Definition at line 36 of file aiori.h.
Referenced by CEPHFS_Open(), CheckRunSettings(), GetFileMode(), HDF5_Open(), HDFS_Create_Or_Open(), IME_Open(), and init_IOR_Param_t().
#define IOR_TRUNC 0x20 /* truncate */ |
Definition at line 39 of file aiori.h.
Referenced by CEPHFS_Open(), GetFileMode(), HDF5_Open(), IME_Open(), and S3_Create_Or_Open_internal().
#define IOR_WRONLY 0x02 /* write only */ |
Definition at line 35 of file aiori.h.
Referenced by CEPHFS_Open(), CheckRunSettings(), collective_helper(), create_file(), GetFileMode(), HDF5_Open(), HDFS_Close(), HDFS_Create_Or_Open(), and IME_Open().
typedef struct ior_aiori_statfs ior_aiori_statfs_t |
typedef struct ior_aiori ior_aiori_t |
enum bench_type |
int aiori_count | ( | void | ) |
Definition at line 345 of file aiori.c.
References available_aiori.
Referenced by aiori_default(), airoi_create_all_module_options(), and init_or_fini().
const char* aiori_default | ( | void | ) |
Definition at line 350 of file aiori.c.
References aiori_count(), ior_aiori::name, and NULL.
Referenced by init_IOR_Param_t().
void aiori_finalize | ( | IOR_test_t * | tests | ) |
Finalize IO backends.
[in] | tests | Pointers to the first test |
This function finalizes all backends which were used. If tests is NULL all available backends are finialized.
Definition at line 281 of file aiori.c.
References init_or_fini(), and is_initialized.
Referenced by ior_main(), and ior_run().
void aiori_initialize | ( | IOR_test_t * | tests | ) |
Initialize IO backends.
[in] | tests | Pointers to the first test |
This function initializes all backends which will be used. If tests is NULL all available backends are initialized.
Definition at line 263 of file aiori.c.
References init_or_fini(), and is_initialized.
Referenced by ior_main(), and ior_run().
int aiori_posix_access | ( | const char * | path, |
int | mode, | ||
IOR_param_t * | param | ||
) |
Definition at line 190 of file aiori.c.
Referenced by aiori_select().
int aiori_posix_mkdir | ( | const char * | path, |
mode_t | mode, | ||
IOR_param_t * | param | ||
) |
Definition at line 180 of file aiori.c.
Referenced by aiori_select().
int aiori_posix_rmdir | ( | const char * | path, |
IOR_param_t * | param | ||
) |
Definition at line 185 of file aiori.c.
Referenced by aiori_select().
int aiori_posix_stat | ( | const char * | path, |
struct stat * | buf, | ||
IOR_param_t * | param | ||
) |
Definition at line 195 of file aiori.c.
Referenced by aiori_select().
int aiori_posix_statfs | ( | const char * | path, |
ior_aiori_statfs_t * | stat_buf, | ||
IOR_param_t * | param | ||
) |
Default statfs implementation.
[in] | path | Path to run statfs on |
[out] | statfs_buf | AIORI statfs buffer |
This function provides a AIORI statfs for POSIX-compliant filesystems. It uses statvfs is available and falls back on statfs.
Definition at line 155 of file aiori.c.
References ior_aiori_statfs::f_bfree, ior_aiori_statfs::f_blocks, ior_aiori_statfs::f_bsize, ior_aiori_statfs::f_ffree, and ior_aiori_statfs::f_files.
Referenced by aiori_select().
const ior_aiori_t* aiori_select | ( | const char * | api | ) |
Definition at line 291 of file aiori.c.
References aiori_posix_access(), aiori_posix_mkdir(), aiori_posix_rmdir(), aiori_posix_stat(), aiori_posix_statfs(), ior_aiori::name_legacy, NULL, and WARN.
Referenced by DecodeDirective(), and updateParsedOptions().
void aiori_supported_apis | ( | char * | APIs, |
char * | APIs_legacy, | ||
enum bench_type | type | ||
) |
Definition at line 118 of file aiori.c.
References available_aiori, MDTEST, and NULL.
Referenced by createGlobalOptions(), and mdtest_run().
options_all_t* airoi_create_all_module_options | ( | option_help * | global_options | ) |
Definition at line 99 of file aiori.c.
References aiori_count(), available_aiori, option_module::defaults, global_options, options_all_t::module_count, options_all_t::modules, NULL, option_module::options, and option_module::prefix.
Referenced by mdtest_run(), and ParseCommandLine().
void* airoi_update_module_options | ( | const ior_aiori_t * | backend, |
options_all_t * | module_defaults | ||
) |
Definition at line 85 of file aiori.c.
References available_aiori, option_module::defaults, ior_aiori::get_options, options_all_t::modules, ior_aiori::name, NULL, option_module::options, and option_module::prefix.
Referenced by ReadConfigScript(), and updateParsedOptions().
int MPIIO_Access | ( | const char * | , |
int | , | ||
IOR_param_t * | |||
) |
Definition at line 70 of file aiori-MPIIO.c.
References IOR_param_t::dryRun, IOR_param_t::hintsFileName, MPI_CHECK, and SetHints().
Referenced by HDF5_Access(), and NCMPI_Access().
void MPIIO_Delete | ( | char * | testFileName, |
IOR_param_t * | param | ||
) |
Definition at line 431 of file aiori-MPIIO.c.
References IOR_param_t::dryRun, and MPI_CHECKF.
Referenced by HDF5_Delete(), and NCMPI_Delete().
IOR_offset_t MPIIO_GetFileSize | ( | IOR_param_t * | test, |
MPI_Comm | testComm, | ||
char * | testFileName | ||
) |
Definition at line 496 of file aiori-MPIIO.c.
References IOR_param_t::dryRun, IOR_param_t::filePerProc, IOR_param_t::hintsFileName, MPI_CHECK, rank, SetHints(), testComm, TRUE, and WARN.
Referenced by HDF5_GetFileSize(), and NCMPI_GetFileSize().
void POSIX_Close | ( | void * | fd, |
IOR_param_t * | param | ||
) |
Definition at line 602 of file aiori-POSIX.c.
References IOR_param_t::dryRun, and ERRF.
Referenced by MMAP_Close().
void* POSIX_Create | ( | char * | testFileName, |
IOR_param_t * | param | ||
) |
Definition at line 321 of file aiori-POSIX.c.
References IOR_param_t::backend_options, IOR_param_t::beegfs_chunkSize, IOR_param_t::beegfs_numTargets, posix_options_t::direct_io, IOR_param_t::dryRun, ERR, ERRF, errno, EWARN, IOR_param_t::filePerProc, IOR_param_t::gpfs_release_token, IOR_param_t::lustre_ignore_locks, IOR_param_t::lustre_set_striping, IOR_param_t::lustre_start_ost, IOR_param_t::lustre_stripe_count, IOR_param_t::lustre_stripe_size, MPI_CHECK, NULL, o, O_BINARY, open64, rank, set_o_direct_flag(), testComm, and TRUE.
Referenced by MMAP_Create().
void POSIX_Delete | ( | char * | testFileName, |
IOR_param_t * | param | ||
) |
Definition at line 614 of file aiori-POSIX.c.
References IOR_param_t::dryRun, EWARNF, and rank.
IOR_offset_t POSIX_GetFileSize | ( | IOR_param_t * | test, |
MPI_Comm | testComm, | ||
char * | testFileName | ||
) |
Definition at line 627 of file aiori-POSIX.c.
References IOR_param_t::dryRun, ERRF, IOR_param_t::filePerProc, MPI_CHECK, rank, TRUE, and WARN.
int POSIX_Mknod | ( | char * | testFileName | ) |
Definition at line 439 of file aiori-POSIX.c.
References ERR.
void* POSIX_Open | ( | char * | testFileName, |
IOR_param_t * | param | ||
) |
Definition at line 453 of file aiori-POSIX.c.
References IOR_param_t::backend_options, posix_options_t::direct_io, IOR_param_t::dryRun, ERR, ERRF, IOR_param_t::gpfs_release_token, IOR_param_t::lustre_ignore_locks, NULL, o, O_BINARY, open64, set_o_direct_flag(), TRUE, verbose, and VERBOSE_1.
Referenced by MMAP_Open().
option_help* POSIX_options | ( | void ** | init_backend_options, |
void * | init_values | ||
) |
Definition at line 83 of file aiori-POSIX.c.
References posix_options_t::direct_io, LAST_OPTION, NULL, o, and OPTION_FLAG.
ior_aiori_t cephfs_aiori |
Definition at line 83 of file aiori-CEPHFS.c.
ior_aiori_t daos_aiori |
Definition at line 84 of file aiori-DAOS.c.
ior_aiori_t dfs_aiori |
Definition at line 119 of file aiori-DFS.c.
ior_aiori_t dummy_aiori |
Definition at line 155 of file aiori-DUMMY.c.
ior_aiori_t gfarm_aiori |
Definition at line 296 of file aiori-Gfarm.c.
ior_aiori_t hdf5_aiori |
Definition at line 127 of file aiori-HDF5.c.
ior_aiori_t hdfs_aiori |
Definition at line 116 of file aiori-HDFS.c.
ior_aiori_t ime_aiori |
Definition at line 97 of file aiori-IME.c.
ior_aiori_t mmap_aiori |
Definition at line 39 of file aiori-MMAP.c.
ior_aiori_t mpiio_aiori |
Definition at line 47 of file aiori-MPIIO.c.
ior_aiori_t ncmpi_aiori |
Definition at line 63 of file aiori-NCMPI.c.
ior_aiori_t posix_aiori |
Definition at line 107 of file aiori-POSIX.c.
ior_aiori_t rados_aiori |
Definition at line 68 of file aiori-RADOS.c.
ior_aiori_t s3_aiori |
Definition at line 170 of file aiori-S3.c.
ior_aiori_t s3_emc_aiori |
Definition at line 206 of file aiori-S3.c.
ior_aiori_t s3_plus_aiori |
Definition at line 189 of file aiori-S3.c.