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

📄 adioi.h

📁 mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环境
💻 H
📖 第 1 页 / 共 2 页
字号:
void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag);void ADIOI_Get_position(ADIO_File fd, ADIO_Offset *offset);void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset);void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset,			   ADIO_Offset *disp);void ADIOI_GEN_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct,		     int *error_code);void ADIOI_GEN_Flush(ADIO_File fd, int *error_code);void ADIOI_GEN_Delete(char *filename, int *error_code);void ADIOI_GEN_ReadContig(ADIO_File fd, void *buf, int count, 			  MPI_Datatype datatype, int file_ptr_type,			  ADIO_Offset offset, ADIO_Status *status,			  int *error_code);int ADIOI_GEN_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset,		  int wr, void *handle);void ADIOI_GEN_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_GEN_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_GEN_IwriteContig(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_GEN_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_GEN_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_GEN_IwriteStrided(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_GEN_IODone(ADIO_Request *request, ADIO_Status *status,		     int *error_code);void ADIOI_GEN_IOComplete(ADIO_Request *request, ADIO_Status *status,			  int *error_code);void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count,                       MPI_Datatype buftype, int file_ptr_type,                       ADIO_Offset offset, ADIO_Status *status, int                       *error_code);void ADIOI_GEN_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_GEN_WriteStrided_naive(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_GEN_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_GEN_WriteStridedColl(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_Calc_my_off_len(ADIO_File fd, int bufcount, MPI_Datatype			    datatype, int file_ptr_type, ADIO_Offset 			    offset, ADIO_Offset **offset_list_ptr, int			    **len_list_ptr, ADIO_Offset *start_offset_ptr,			    ADIO_Offset *end_offset_ptr, int			   *contig_access_count_ptr);void ADIOI_Calc_file_domains(ADIO_Offset *st_offsets, ADIO_Offset			     *end_offsets, int nprocs, int nprocs_for_coll,			     ADIO_Offset *min_st_offset_ptr,			     ADIO_Offset **fd_start_ptr, ADIO_Offset 			     **fd_end_ptr, ADIO_Offset *fd_size_ptr);int ADIOI_Calc_aggregator(ADIO_File fd,                                 ADIO_Offset off,                                 ADIO_Offset min_off,                                 ADIO_Offset *len,                                 ADIO_Offset fd_size,                                 ADIO_Offset *fd_start,                                 ADIO_Offset *fd_end);void ADIOI_Calc_my_req(ADIO_File fd, ADIO_Offset *offset_list, 			    int *len_list, int			    contig_access_count, ADIO_Offset 			    min_st_offset, ADIO_Offset *fd_start,			    ADIO_Offset *fd_end, ADIO_Offset fd_size,                            int nprocs,                            int *count_my_req_procs_ptr,			    int **count_my_req_per_proc_ptr,			    ADIOI_Access **my_req_ptr,			    int **buf_idx_ptr);void ADIOI_Calc_others_req(ADIO_File fd, int count_my_req_procs, 				int *count_my_req_per_proc,				ADIOI_Access *my_req, 				int nprocs, int myrank,				int *count_others_req_procs_ptr,				ADIOI_Access **others_req_ptr);  ADIO_Offset ADIOI_GEN_SeekIndividual(ADIO_File fd, ADIO_Offset offset, 				     int whence, int *error_code);void ADIOI_GEN_Resize(ADIO_File fd, ADIO_Offset size, int *error_code);void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);void ADIOI_GEN_Close(ADIO_File fd, int *error_code);void ADIOI_Shfp_fname(ADIO_File fd, int rank);void ADIOI_GEN_Prealloc(ADIO_File fd, ADIO_Offset size, int *error_code);int ADIOI_Error(ADIO_File fd, int error_code, char *string);int MPIR_Err_setmsg( int, int, const char *, const char *, const char *, ... );int ADIOI_End_call(MPI_Comm comm, int keyval, void *attribute_val, void *extra_state);int MPIR_Status_set_bytes(MPI_Status *status, MPI_Datatype datatype, int nbytes);int ADIOI_Uses_generic_read(ADIO_File fd);int ADIOI_Uses_generic_write(ADIO_File fd);int ADIOI_FAKE_IODone(ADIO_Request *request, ADIO_Status *status,                      int *error_code);void ADIOI_FAKE_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_FAKE_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_FAKE_IwriteContig(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_FAKE_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_FAKE_IOComplete(ADIO_Request *request, ADIO_Status *status,                           int *error_code);/* File I/O common functionality */int MPIOI_File_read(MPI_File fh,		    MPI_Offset offset,		    int file_ptr_type,		    void *buf,		    int count,		    MPI_Datatype datatype,		    char *myname,		    MPI_Status *status);int MPIOI_File_write(MPI_File fh,		     MPI_Offset offset,		     int file_ptr_type,		     void *buf,		     int count,		     MPI_Datatype datatype,		     char *myname,		     MPI_Status *status);int MPIOI_File_read_all(MPI_File fh,			MPI_Offset offset,			int file_ptr_type,			void *buf,			int count,			MPI_Datatype datatype,			char *myname,			MPI_Status *status);int MPIOI_File_write_all(MPI_File fh,			 MPI_Offset offset,			 int file_ptr_type,			 void *buf,			 int count,			 MPI_Datatype datatype,			 char *myname,			 MPI_Status *status);int MPIOI_File_read_all_begin(MPI_File fh,			      MPI_Offset offset,			      int file_ptr_type,			      void *buf,			      int count,			      MPI_Datatype datatype,			      char *myname);int MPIOI_File_write_all_begin(MPI_File fh,			       MPI_Offset offset,			       int file_ptr_type,			       void *buf,			       int count,			       MPI_Datatype datatype,			       char *myname);int MPIOI_File_read_all_end(MPI_File fh,			    void *buf,			    char *myname,			    MPI_Status *status);int MPIOI_File_write_all_end(MPI_File fh,			     void *buf,			     char *myname,			     MPI_Status *status);#ifndef HAVE_MPI_GREQUESTint MPIOI_File_iwrite(MPI_File fh,		      MPI_Offset offset,		      int file_ptr_type,		      void *buf,		      int count,		      MPI_Datatype datatype,		      char *myname,		      MPIO_Request *request);int MPIOI_File_iread(MPI_File fh,		     MPI_Offset offset,		     int file_ptr_type,		     void *buf,		     int count,		     MPI_Datatype datatype,		     char *myname,		     MPIO_Request *request);#endif/* Unix-style file locking */#if (defined(ROMIO_HFS) || defined(ROMIO_XFS))# define ADIOI_WRITE_LOCK(fd, offset, whence, len) \   if (((fd)->file_system == ADIO_XFS) || ((fd)->file_system == ADIO_HFS)) \     ADIOI_Set_lock64((fd)->fd_sys, F_SETLKW64, F_WRLCK, offset, whence, len);\   else ADIOI_Set_lock((fd)->fd_sys, F_SETLKW, F_WRLCK, offset, whence, len)# define ADIOI_READ_LOCK(fd, offset, whence, len) \   if (((fd)->file_system == ADIO_XFS) || ((fd)->file_system == ADIO_HFS)) \     ADIOI_Set_lock64((fd)->fd_sys, F_SETLKW64, F_RDLCK, offset, whence, len);\   else ADIOI_Set_lock((fd)->fd_sys, F_SETLKW, F_RDLCK, offset, whence, len)# define ADIOI_UNLOCK(fd, offset, whence, len) \   if (((fd)->file_system == ADIO_XFS) || ((fd)->file_system == ADIO_HFS)) \     ADIOI_Set_lock64((fd)->fd_sys, F_SETLK64, F_UNLCK, offset, whence, len); \   else ADIOI_Set_lock((fd)->fd_sys, F_SETLK, F_UNLCK, offset, whence, len)#elif (defined(ROMIO_NTFS))#define ADIOI_LOCK_CMD		0#define ADIOI_UNLOCK_CMD	1#   define ADIOI_WRITE_LOCK(fd, offset, whence, len) \          ADIOI_Set_lock((fd)->fd_sys, ADIOI_LOCK_CMD, LOCKFILE_EXCLUSIVE_LOCK, offset, whence, len)#   define ADIOI_READ_LOCK(fd, offset, whence, len) \          ADIOI_Set_lock((fd)->fd_sys, ADIOI_LOCK_CMD, 0, offset, whence, len)#   define ADIOI_UNLOCK(fd, offset, whence, len) \          ADIOI_Set_lock((fd)->fd_sys, ADIOI_UNLOCK_CMD, LOCKFILE_FAIL_IMMEDIATELY, offset, whence, len)#else#   define ADIOI_WRITE_LOCK(fd, offset, whence, len) \          ADIOI_Set_lock((fd)->fd_sys, F_SETLKW, F_WRLCK, offset, whence, len)#   define ADIOI_READ_LOCK(fd, offset, whence, len) \          ADIOI_Set_lock((fd)->fd_sys, F_SETLKW, F_RDLCK, offset, whence, len)#   define ADIOI_UNLOCK(fd, offset, whence, len) \          ADIOI_Set_lock((fd)->fd_sys, F_SETLK, F_UNLCK, offset, whence, len)#endifint ADIOI_Set_lock(FDTYPE fd_sys, int cmd, int type, ADIO_Offset offset, int whence, ADIO_Offset len);int ADIOI_Set_lock64(FDTYPE fd_sys, int cmd, int type, ADIO_Offset offset, int whence, ADIO_Offset len);#define ADIOI_Malloc(a) ADIOI_Malloc_fn(a,__LINE__,__FILE__)#define ADIOI_Calloc(a,b) ADIOI_Calloc_fn(a,b,__LINE__,__FILE__)#define ADIOI_Realloc(a,b) ADIOI_Realloc_fn(a,b,__LINE__,__FILE__)#define ADIOI_Free(a) ADIOI_Free_fn(a,__LINE__,__FILE__)int ADIOI_Strncpy( char *outstr, const char *instr, size_t maxlen );int ADIOI_Strnapp( char *, const char *, size_t );char *ADIOI_Strdup( const char * );/* Provide a fallback snprintf for systems that do not have one *//* Define attribute as empty if it has no definition */#ifndef ATTRIBUTE#ifdef HAVE_GCC_ATTRIBUTE#define ATTRIBUTE(a) __attribute__(a)#else#define ATTRIBUTE(a)#endif#endif/* style: allow:snprintf:1 sig:0 */#ifdef HAVE_SNPRINTF#define ADIOI_Snprintf snprintf/* Sometimes systems don't provide prototypes for snprintf */#ifdef NEEDS_SNPRINTF_DECLextern int snprintf( char *, size_t, const char *, ... ) ATTRIBUTE((format(printf,3,4)));#endif#elseint ADIOI_Snprintf( char *str, size_t size, const char *format, ... )      ATTRIBUTE((format(printf,3,4)));#endif /* HAVE_SNPRINTF */#define FPRINTF fprintf#ifndef HAVE_STRERROR#  ifdef HAVE_SYSERRLIST      extern char *sys_errlist[];#     define strerror(n) sys_errlist[n]#  else #     define PRINT_ERR_MSG#  endif#endif#include "adioi_error.h"#endif

⌨️ 快捷键说明

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