⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adioi.h

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 H
📖 第 1 页 / 共 2 页
字号:
/* -*- Mode: C; c-basic-offset:4 ; -*- *//*  *   $Id: adioi.h,v 1.19 2002/10/24 17:01:16 gropp Exp $     * *   Copyright (C) 1997 University of Chicago.  *   See COPYRIGHT notice in top-level directory. *//* contains general definitions, declarations, and macros internal to   the ADIO implementation, though independent of the underlying file   system. This file is included in adio.h */ /* Functions and datataypes that are "internal" to the ADIO implementation    prefixed ADIOI_. Functions and datatypes that are part of the   "externally visible" (documented) ADIO interface are prefixed ADIO_.   An implementation of MPI-IO, or any other high-level interface, should   not need to use any of the ADIOI_ functions/datatypes.    Only someone implementing ADIO on a new file system, or modifying    an existing ADIO implementation, would need to use the ADIOI_   functions/datatypes. */#ifndef ADIOI_INCLUDE#define ADIOI_INCLUDE/* each pending nonblocking request is stored on a linked list */typedef struct ADIOI_Async {    ADIO_Request *request;    struct ADIOI_Async *prev, *next;} ADIOI_Async_node;/* list to keep track of memory regions that have been malloced    for above async list */typedef struct ADIOI_Malloc_async_ptr {    ADIOI_Async_node *ptr;  /* ptr to malloced region */    struct ADIOI_Malloc_async_ptr *next;} ADIOI_Malloc_async;/* used to malloc request objects in bulk */typedef struct ADIOI_Req_n {    struct ADIOI_RequestD reqd;    struct ADIOI_Req_n *next;} ADIOI_Req_node;/* used to keep track of the malloced requests that need to be freed */typedef struct ADIOI_Malloc_req_ptr {    ADIOI_Req_node *ptr;  /* ptr to malloced region */    struct ADIOI_Malloc_req_ptr *next;} ADIOI_Malloc_req;/* used to keep track of hint/info values. * Note that there are a lot of int-sized values in here...they are * used as int-sized entities other places as well.  This would be a  * problem on 32-bit systems using > 2GB files in some cases... */struct ADIOI_Hints_struct {    int initialized;    int cb_read;    int cb_write;    int cb_nodes;    int cb_buffer_size;    int ds_read;    int ds_write;    int no_indep_rw;    int ind_rd_buffer_size;    int ind_wr_buffer_size;    char *cb_config_list;    int *ranklist;    union {	    struct {		    int listio_read;		    int listio_write;	    } pvfs;    } fs_hints;};/* Values for use with cb_read, cb_write, ds_read, and ds_write  * and some fs-specific hints   (IBM xlc, Compaq Tru64 compilers object to a comma after the last item)   (that's just wrong) */enum {    ADIOI_HINT_AUTO    = 0,    ADIOI_HINT_ENABLE  = 1,    ADIOI_HINT_DISABLE = 2};/* flattened datatypes. Each datatype is stored as a node of a   globally accessible linked list. Once attribute caching on a   datatype is available (in MPI-2), that should be used instead. */  typedef struct ADIOI_Fl_node {      MPI_Datatype type;    int count;                   /* no. of contiguous blocks */    int *blocklens;              /* array of contiguous block lengths (bytes)*/    /* may need to make it ADIO_Offset *blocklens */    ADIO_Offset *indices;        /* array of byte offsets of each block */    struct ADIOI_Fl_node *next;  /* pointer to next node */} ADIOI_Flatlist_node;struct ADIOI_Fns_struct {    void (*ADIOI_xxx_Open) (ADIO_File fd, int *error_code);    void (*ADIOI_xxx_ReadContig) (ADIO_File fd, void *buf, int count,                    MPI_Datatype datatype, int file_ptr_type,                    ADIO_Offset offset, ADIO_Status *status, int *error_code);    void (*ADIOI_xxx_WriteContig) (ADIO_File fd, void *buf, int count,                    MPI_Datatype datatype, int file_ptr_type,                    ADIO_Offset offset, ADIO_Status *status, int *error_code);      void (*ADIOI_xxx_ReadStridedColl) (ADIO_File fd, void *buf, int count,	       MPI_Datatype datatype, int file_ptr_type,	       ADIO_Offset offset, ADIO_Status *status, int *error_code);    void (*ADIOI_xxx_WriteStridedColl) (ADIO_File fd, void *buf, int count,	       MPI_Datatype datatype, int file_ptr_type,	       ADIO_Offset offset, ADIO_Status *status, int *error_code);    ADIO_Offset (*ADIOI_xxx_SeekIndividual) (ADIO_File fd, ADIO_Offset offset,                        int whence, int *error_code);    void (*ADIOI_xxx_Fcntl) (ADIO_File fd, int flag,                              ADIO_Fcntl_t *fcntl_struct, int *error_code);     void (*ADIOI_xxx_SetInfo) (ADIO_File fd, MPI_Info users_info,                                int *error_code);    void (*ADIOI_xxx_ReadStrided) (ADIO_File fd, void *buf, int count,	       MPI_Datatype datatype, int file_ptr_type,	       ADIO_Offset offset, ADIO_Status *status, int *error_code);    void (*ADIOI_xxx_WriteStrided) (ADIO_File fd, void *buf, int count,	       MPI_Datatype datatype, int file_ptr_type,	       ADIO_Offset offset, ADIO_Status *status, int *error_code);    void (*ADIOI_xxx_Close) (ADIO_File fd, int *error_code);    void (*ADIOI_xxx_IreadContig) (ADIO_File fd, void *buf, int count,                    MPI_Datatype datatype, int file_ptr_type,                    ADIO_Offset offset, ADIO_Request *request, int *error_code);    void (*ADIOI_xxx_IwriteContig) (ADIO_File fd, void *buf, int count,                    MPI_Datatype datatype, int file_ptr_type, 	           ADIO_Offset offset, ADIO_Request *request, int *error_code);    int (*ADIOI_xxx_ReadDone) (ADIO_Request *request, ADIO_Status *status,                int *error_code);     int (*ADIOI_xxx_WriteDone) (ADIO_Request *request, ADIO_Status *status,                int *error_code);    void (*ADIOI_xxx_ReadComplete) (ADIO_Request *request, ADIO_Status *status,                int *error_code);     void (*ADIOI_xxx_WriteComplete) (ADIO_Request *request, ADIO_Status *status,	       int *error_code);     void (*ADIOI_xxx_IreadStrided) (ADIO_File fd, void *buf, int count,	       MPI_Datatype datatype, int file_ptr_type,	       ADIO_Offset offset, ADIO_Request *request, int *error_code);    void (*ADIOI_xxx_IwriteStrided) (ADIO_File fd, void *buf, int count,	       MPI_Datatype datatype, int file_ptr_type,	       ADIO_Offset offset, ADIO_Request *request, int *error_code);    void (*ADIOI_xxx_Flush) (ADIO_File fd, int *error_code);     void (*ADIOI_xxx_Resize) (ADIO_File fd, ADIO_Offset size, int *error_code);    void (*ADIOI_xxx_Delete) (char *filename, int *error_code);};/* optypes for ADIO_RequestD */#define ADIOI_READ                26#define ADIOI_WRITE               27#define ADIOI_MIN(a, b) ((a) < (b) ? (a) : (b))#define ADIOI_MAX(a, b) ((a) > (b) ? (a) : (b))#define ADIOI_PREALLOC_BUFSZ      4194304    /* buffer size used to                                                 preallocate disk space *//* default values for some hints */    /* buffer size for collective I/O = 4MB */#define ADIOI_CB_BUFFER_SIZE_DFLT         "4194304"    /* buffer size for data sieving in independent reads = 4MB */#define ADIOI_IND_RD_BUFFER_SIZE_DFLT     "4194304"    /* buffer size for data sieving in independent writes = 512KB. default is       smaller than for reads, because write requires read-modify-write       with file locking. If buffer size is large there is more contention        for locks. */#define ADIOI_IND_WR_BUFFER_SIZE_DFLT     "524288"    /* use one process per processor name by default */#define ADIOI_CB_CONFIG_LIST_DFLT "*:1"/* some of the ADIO functions are macro-replaced */#define ADIO_ReadContig(fd,buf,count,datatype,file_ptr_type,offset,status,error_code) \        (*(fd->fns->ADIOI_xxx_ReadContig))(fd,buf,count,datatype,file_ptr_type,offset,status,error_code)#define ADIO_WriteContig(fd,buf,count,datatype,file_ptr_type,offset,status,error_code) \        (*(fd->fns->ADIOI_xxx_WriteContig))(fd,buf,count,datatype,file_ptr_type,offset,status,error_code)#define ADIO_SeekIndividual(fd,offset,whence,error_code) \        (*(fd->fns->ADIOI_xxx_SeekIndividual))(fd,offset,whence,error_code)#define ADIO_Fcntl(fd,flag,fcntl_struct,error_code) \        (*(fd->fns->ADIOI_xxx_Fcntl))(fd,flag,fcntl_struct,error_code)#define ADIO_IreadContig(fd,buf,count,datatype,file_ptr_type,offset,request,error_code) \        (*(fd->fns->ADIOI_xxx_IreadContig))(fd,buf,count,datatype,file_ptr_type,offset,request,error_code)#define ADIO_IwriteContig(fd,buf,count,datatype,file_ptr_type,offset,request,error_code) \        (*(fd->fns->ADIOI_xxx_IwriteContig))(fd,buf,count,datatype,file_ptr_type,offset,request,error_code)/* in these routines a pointer to request is passed */#define ADIO_ReadDone(request,status,error_code) \        (*((*(request))->fd->fns->ADIOI_xxx_ReadDone))(request,status,error_code)#define ADIO_WriteDone(request,status,error_code) \        (*((*(request))->fd->fns->ADIOI_xxx_WriteDone))(request,status,error_code)#define ADIO_ReadIcomplete(request,status,error_code) \        (*((*(request))->fd->fns->ADIOI_xxx_ReadIcomplete))(request,status,error_code)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -