IOR
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.

Macros

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

Functions

static int GetFileMode (IOR_param_t *)
 
static void * NCMPI_Create (char *, IOR_param_t *)
 
static void * NCMPI_Open (char *, IOR_param_t *)
 
static IOR_offset_t NCMPI_Xfer (int, void *, IOR_size_t *, IOR_offset_t, IOR_param_t *)
 
static void NCMPI_Close (void *, IOR_param_t *)
 
static void NCMPI_Delete (char *, IOR_param_t *)
 
static char * NCMPI_GetVersion ()
 
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 *)
 

Variables

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 ( IOR_param_t param)
static

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

References IOR_APPEND, IOR_CREAT, IOR_DIRECT, IOR_EXCL, IOR_RDONLY, IOR_RDWR, IOR_TRUNC, IOR_WRONLY, and IOR_param_t::openFlags.

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,
IOR_param_t param 
)
static

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

References MPIIO_Access().

Here is the call graph for this function:

◆ NCMPI_Close()

static void NCMPI_Close ( void *  fd,
IOR_param_t param 
)
static

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

References IOR_param_t::collective, FALSE, and NCMPI_CHECK.

◆ NCMPI_Create()

static void * NCMPI_Create ( char *  testFileName,
IOR_param_t param 
)
static

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

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

Here is the call graph for this function:

◆ NCMPI_Delete()

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

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

References MPIIO_Delete().

Here is the call graph for this function:

◆ NCMPI_Fsync()

static void NCMPI_Fsync ( void *  fd,
IOR_param_t param 
)
static

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

◆ NCMPI_GetFileSize()

static IOR_offset_t NCMPI_GetFileSize ( IOR_param_t test,
MPI_Comm  testComm,
char *  testFileName 
)
static

Definition at line 384 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 336 of file aiori-NCMPI.c.

◆ NCMPI_Open()

static void * NCMPI_Open ( char *  testFileName,
IOR_param_t param 
)
static

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

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

Here is the call graph for this function:

◆ NCMPI_Xfer()

static IOR_offset_t NCMPI_Xfer ( int  access,
void *  fd,
IOR_size_t buffer,
IOR_offset_t  length,
IOR_param_t param 
)
static

Variable Documentation

◆ 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,
}
static char * NCMPI_GetVersion()
Definition: aiori-NCMPI.c:336
int aiori_posix_rmdir(const char *path, IOR_param_t *param)
Definition: aiori.c:185
static IOR_offset_t NCMPI_Xfer(int, void *, IOR_size_t *, IOR_offset_t, IOR_param_t *)
Definition: aiori-NCMPI.c:178
int aiori_posix_mkdir(const char *path, mode_t mode, IOR_param_t *param)
Definition: aiori.c:180
static IOR_offset_t NCMPI_GetFileSize(IOR_param_t *, MPI_Comm, char *)
Definition: aiori-NCMPI.c:384
int aiori_posix_statfs(const char *path, ior_aiori_statfs_t *stat_buf, IOR_param_t *param)
Definition: aiori.c:155
static void * NCMPI_Create(char *, IOR_param_t *)
Definition: aiori-NCMPI.c:86
int aiori_posix_stat(const char *path, struct stat *buf, IOR_param_t *param)
Definition: aiori.c:195
static void NCMPI_Fsync(void *, IOR_param_t *)
Definition: aiori-NCMPI.c:307
static void * NCMPI_Open(char *, IOR_param_t *)
Definition: aiori-NCMPI.c:132
static void NCMPI_Delete(char *, IOR_param_t *)
Definition: aiori-NCMPI.c:328
static void NCMPI_Close(void *, IOR_param_t *)
Definition: aiori-NCMPI.c:315
#define NULL
Definition: iordef.h:79
static int NCMPI_Access(const char *, int, IOR_param_t *)
Definition: aiori-NCMPI.c:393

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