IOR
Data Structures | Macros | Functions | Variables
aiori-NCMPI.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <pnetcdf.h>
#include "ior.h"
#include "iordef.h"
#include "aiori.h"
#include "utilities.h"
Include dependency graph for aiori-NCMPI.c:

Go to the source code of this file.

Data Structures

struct  ncmpi_options_t
 

Macros

#define NUM_DIMS   3 /* number of dimensions to data set */
 
#define NCMPI_CHECK(NCMPI_RETURN, MSG)
 

Functions

static int GetFileMode (int flags)
 
static aiori_fd_tNCMPI_Create (char *, int iorflags, aiori_mod_opt_t *)
 
static aiori_fd_tNCMPI_Open (char *, int iorflags, aiori_mod_opt_t *)
 
static IOR_offset_t NCMPI_Xfer (int, aiori_fd_t *, IOR_size_t *, IOR_offset_t, IOR_offset_t, aiori_mod_opt_t *)
 
static void NCMPI_Close (aiori_fd_t *, aiori_mod_opt_t *)
 
static void NCMPI_Delete (char *, aiori_mod_opt_t *)
 
static char * NCMPI_GetVersion ()
 
static void NCMPI_Fsync (aiori_fd_t *, aiori_mod_opt_t *)
 
static IOR_offset_t NCMPI_GetFileSize (aiori_mod_opt_t *, char *)
 
static int NCMPI_Access (const char *, int, aiori_mod_opt_t *)
 
static void NCMPI_xfer_hints (aiori_xfer_hint_t *params)
 
static option_helpNCMPI_options (aiori_mod_opt_t **init_backend_options, aiori_mod_opt_t *init_values)
 

Variables

static aiori_xfer_hint_thints = NULL
 
ior_aiori_t ncmpi_aiori
 

Macro Definition Documentation

◆ NCMPI_CHECK

#define NCMPI_CHECK (   NCMPI_RETURN,
  MSG 
)
Value:
do { \
\
if (NCMPI_RETURN < 0) { \
fprintf(stdout, "** error **\n"); \
fprintf(stdout, "ERROR in %s (line %d): %s.\n", \
__FILE__, __LINE__, MSG); \
fprintf(stdout, "ERROR: %s.\n", ncmpi_strerror(NCMPI_RETURN)); \
fprintf(stdout, "** exiting **\n"); \
exit(-1); \
} \
} while(0)

Definition at line 34 of file aiori-NCMPI.c.

Referenced by NCMPI_Close(), NCMPI_Create(), NCMPI_Open(), and NCMPI_Xfer().

◆ NUM_DIMS

#define NUM_DIMS   3 /* number of dimensions to data set */

Definition at line 29 of file aiori-NCMPI.c.

Referenced by NCMPI_Xfer().

Function Documentation

◆ GetFileMode()

static int GetFileMode ( int  flags)
static

Definition at line 372 of file aiori-NCMPI.c.

References IOR_APPEND, IOR_CREAT, IOR_DIRECT, IOR_EXCL, IOR_RDONLY, IOR_RDWR, IOR_TRUNC, IOR_WRONLY, and WARN.

Referenced by NCMPI_Create(), and NCMPI_Open().

Here is the caller graph for this function:

◆ NCMPI_Access()

static int NCMPI_Access ( const char *  path,
int  mode,
aiori_mod_opt_t param 
)
static

Definition at line 421 of file aiori-NCMPI.c.

References MPIIO_Access().

Here is the call graph for this function:

◆ NCMPI_Close()

static void NCMPI_Close ( aiori_fd_t fd,
aiori_mod_opt_t param 
)
static

Definition at line 343 of file aiori-NCMPI.c.

References aiori_xfer_hint_t::collective, FALSE, and NCMPI_CHECK.

◆ NCMPI_Create()

static aiori_fd_t * NCMPI_Create ( char *  testFileName,
int  iorflags,
aiori_mod_opt_t param 
)
static

Definition at line 125 of file aiori-NCMPI.c.

References ERR, GetFileMode(), ncmpi_options_t::hintsFileName, MPI_CHECK, NCMPI_CHECK, NULL, o, rank, SetHints(), ncmpi_options_t::showHints, ShowHints(), and testComm.

Here is the call graph for this function:

◆ NCMPI_Delete()

static void NCMPI_Delete ( char *  testFileName,
aiori_mod_opt_t param 
)
static

Definition at line 356 of file aiori-NCMPI.c.

References MPIIO_Delete().

Here is the call graph for this function:

◆ NCMPI_Fsync()

static void NCMPI_Fsync ( aiori_fd_t fd,
aiori_mod_opt_t param 
)
static

Definition at line 336 of file aiori-NCMPI.c.

◆ NCMPI_GetFileSize()

static IOR_offset_t NCMPI_GetFileSize ( aiori_mod_opt_t opt,
char *  testFileName 
)
static

Definition at line 412 of file aiori-NCMPI.c.

References MPIIO_GetFileSize().

Here is the call graph for this function:

◆ NCMPI_GetVersion()

static char * NCMPI_GetVersion ( )
static

Definition at line 364 of file aiori-NCMPI.c.

◆ NCMPI_Open()

static aiori_fd_t * NCMPI_Open ( char *  testFileName,
int  iorflags,
aiori_mod_opt_t param 
)
static

Definition at line 172 of file aiori-NCMPI.c.

References ERR, GetFileMode(), ncmpi_options_t::hintsFileName, MPI_CHECK, NCMPI_CHECK, NULL, o, rank, SetHints(), ncmpi_options_t::showHints, ShowHints(), and testComm.

Here is the call graph for this function:

◆ NCMPI_options()

static option_help* NCMPI_options ( aiori_mod_opt_t **  init_backend_options,
aiori_mod_opt_t init_values 
)
static

◆ NCMPI_Xfer()

static IOR_offset_t NCMPI_Xfer ( int  access,
aiori_fd_t fd,
IOR_size_t buffer,
IOR_offset_t  transferSize,
IOR_offset_t  offset,
aiori_mod_opt_t param 
)
static

◆ NCMPI_xfer_hints()

static void NCMPI_xfer_hints ( aiori_xfer_hint_t params)
static

Definition at line 64 of file aiori-NCMPI.c.

References MPIIO_xfer_hints().

Here is the call graph for this function:

Variable Documentation

◆ hints

aiori_xfer_hint_t* hints = NULL
static

Definition at line 62 of file aiori-NCMPI.c.

◆ ncmpi_aiori

ior_aiori_t ncmpi_aiori
Initial value:
= {
.name = "NCMPI",
.name_legacy = NULL,
.create = NCMPI_Create,
.open = NCMPI_Open,
.xfer = NCMPI_Xfer,
.close = NCMPI_Close,
.delete = NCMPI_Delete,
.get_version = NCMPI_GetVersion,
.fsync = NCMPI_Fsync,
.get_file_size = NCMPI_GetFileSize,
.statfs = aiori_posix_statfs,
.access = NCMPI_Access,
.get_options = NCMPI_options,
.xfer_hints = NCMPI_xfer_hints,
}
static char * NCMPI_GetVersion()
Definition: aiori-NCMPI.c:364
static aiori_fd_t * NCMPI_Create(char *, int iorflags, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:125
static void NCMPI_Delete(char *, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:356
int aiori_posix_stat(const char *path, struct stat *buf, aiori_mod_opt_t *module_options)
Definition: aiori.c:227
static aiori_fd_t * NCMPI_Open(char *, int iorflags, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:172
static void NCMPI_Fsync(aiori_fd_t *, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:336
static void NCMPI_Close(aiori_fd_t *, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:343
int aiori_posix_rmdir(const char *path, aiori_mod_opt_t *module_options)
Definition: aiori.c:217
static option_help * NCMPI_options(aiori_mod_opt_t **init_backend_options, aiori_mod_opt_t *init_values)
Definition: aiori-NCMPI.c:81
static IOR_offset_t NCMPI_Xfer(int, aiori_fd_t *, IOR_size_t *, IOR_offset_t, IOR_offset_t, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:219
int aiori_posix_mkdir(const char *path, mode_t mode, aiori_mod_opt_t *module_options)
Definition: aiori.c:212
int aiori_posix_statfs(const char *path, ior_aiori_statfs_t *stat_buf, aiori_mod_opt_t *module_options)
Definition: aiori.c:166
static IOR_offset_t NCMPI_GetFileSize(aiori_mod_opt_t *, char *)
Definition: aiori-NCMPI.c:412
static int NCMPI_Access(const char *, int, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:421
static void NCMPI_xfer_hints(aiori_xfer_hint_t *params)
Definition: aiori-NCMPI.c:64
#define NULL
Definition: iordef.h:70

Definition at line 100 of file aiori-NCMPI.c.