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 { \
int _NCMPI_RETURN = (NCMPI_RETURN); \
\
if (_NCMPI_RETURN != NC_NOERR) { \
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(EXIT_FAILURE); \
} \
} while(0)

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

Referenced by NCMPI_Close(), NCMPI_Create(), NCMPI_Delete(), NCMPI_Fsync(), 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 371 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 420 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 346 of file aiori-NCMPI.c.

References NCMPI_CHECK.

◆ NCMPI_Create()

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

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

References ERR, GetFileMode(), mpiio_options_t::hintsFileName, MPI_CHECK, ncmpi_options_t::mpio, NCMPI_CHECK, NULL, o, rank, SetHints(), mpiio_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 355 of file aiori-NCMPI.c.

References NCMPI_CHECK.

◆ NCMPI_Fsync()

static void NCMPI_Fsync ( aiori_fd_t fd,
aiori_mod_opt_t param 
)
static

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

References NCMPI_CHECK.

◆ NCMPI_GetFileSize()

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

Definition at line 411 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 363 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 174 of file aiori-NCMPI.c.

References ERR, GetFileMode(), mpiio_options_t::hintsFileName, MPI_CHECK, ncmpi_options_t::mpio, NCMPI_CHECK, NULL, o, rank, SetHints(), mpiio_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 65 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 63 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:363
static aiori_fd_t * NCMPI_Create(char *, int iorflags, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:128
static void NCMPI_Delete(char *, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:355
int aiori_posix_stat(const char *path, struct stat *buf, aiori_mod_opt_t *module_options)
Definition: aiori.c:230
static aiori_fd_t * NCMPI_Open(char *, int iorflags, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:174
static void NCMPI_Fsync(aiori_fd_t *, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:338
static void NCMPI_Close(aiori_fd_t *, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:346
int aiori_posix_rmdir(const char *path, aiori_mod_opt_t *module_options)
Definition: aiori.c:220
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:221
int aiori_posix_mkdir(const char *path, mode_t mode, aiori_mod_opt_t *module_options)
Definition: aiori.c:215
int aiori_posix_statfs(const char *path, ior_aiori_statfs_t *stat_buf, aiori_mod_opt_t *module_options)
Definition: aiori.c:169
static IOR_offset_t NCMPI_GetFileSize(aiori_mod_opt_t *, char *)
Definition: aiori-NCMPI.c:411
static int NCMPI_Access(const char *, int, aiori_mod_opt_t *)
Definition: aiori-NCMPI.c:420
static void NCMPI_xfer_hints(aiori_xfer_hint_t *params)
Definition: aiori-NCMPI.c:65
#define NULL
Definition: iordef.h:84

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