00001
00002
00003
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AD_BGL_AGGRS_H_
00021 #define AD_BGL_AGGRS_H_
00022
00023 #include "adio.h"
00024 #include <sys/stat.h>
00025
00026 #if !defined(GPFS_SUPER_MAGIC)
00027 #define GPFS_SUPER_MAGIC (0x47504653)
00028 #endif
00029
00030 #if !defined(PVFS2_SUPER_MAGIC)
00031 #define PVFS2_SUPER_MAGIC (0x20030528)
00032 #endif
00033
00034
00035
00036 typedef struct ADIOI_BGL_fs_s {
00037 __blksize_t blksize;
00038 int fsync_aggr;
00039 #define ADIOI_BGL_FSYNC_AGGREGATION_DISABLED 0x00
00040 #define ADIOI_BGL_FSYNC_AGGREGATION_ENABLED 0x01
00041 #define ADIOI_BGL_FSYNC_AGGREGATOR 0x10
00042 } ADIOI_BGL_fs;
00043
00044
00045 int ADIOI_BGL_gen_agg_ranklist(ADIO_File fd, int n_aggrs_per_pset);
00046
00047
00048 void ADIOI_BGL_GPFS_Calc_file_domains(ADIO_Offset *st_offsets,
00049 ADIO_Offset *end_offsets,
00050 int nprocs,
00051 int nprocs_for_coll,
00052 ADIO_Offset *min_st_offset_ptr,
00053 ADIO_Offset **fd_start_ptr,
00054 ADIO_Offset **fd_end_ptr,
00055 ADIO_Offset *fd_size_ptr,
00056 void *fs_ptr);
00057
00058
00059 int ADIOI_BGL_Aggrs_index(ADIO_File fd, int myrank );
00060
00061
00062
00063 int ADIOI_BGL_Calc_aggregator(ADIO_File fd,
00064 ADIO_Offset off,
00065 ADIO_Offset min_off,
00066 ADIO_Offset *len,
00067 ADIO_Offset fd_size,
00068 ADIO_Offset *fd_start,
00069 ADIO_Offset *fd_end);
00070
00071
00072
00073 void ADIOI_BGL_Calc_my_req ( ADIO_File fd, ADIO_Offset *offset_list, ADIO_Offset *len_list,
00074 int contig_access_count, ADIO_Offset
00075 min_st_offset, ADIO_Offset *fd_start,
00076 ADIO_Offset *fd_end, ADIO_Offset fd_size,
00077 int nprocs,
00078 int *count_my_req_procs_ptr,
00079 int **count_my_req_per_proc_ptr,
00080 ADIOI_Access **my_req_ptr,
00081 int **buf_idx_ptr);
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 void ADIOI_BGL_Calc_others_req(ADIO_File fd, int count_my_req_procs,
00101 int *count_my_req_per_proc,
00102 ADIOI_Access *my_req,
00103 int nprocs, int myrank,
00104 int *count_others_req_procs_ptr,
00105 ADIOI_Access **others_req_ptr);
00106
00107
00108 #endif