00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef AD_UNIX_INCLUDE
00012 #define AD_UNIX_INCLUDE
00013
00014
00015 #define HAVE_ASM_TYPES_H 1
00016
00017 #include <unistd.h>
00018 #include <linux/types.h>
00019
00020 #ifdef __linux__
00021 # include <sys/ioctl.h>
00022 # include <time.h>
00023 # define __USE_GNU
00024 # include <fcntl.h>
00025 # undef __USE_GNU
00026 #endif
00027
00028
00029 #include <sys/ioctl.h>
00030 #include <lustre/lustre_user.h>
00031 #include "adio.h"
00032
00033
00034 #ifdef HAVE_SIGNAL_H
00035 #include <signal.h>
00036 #endif
00037
00038 #ifdef HAVE_AIO_H
00039 #include <aio.h>
00040 #ifdef HAVE_SYS_AIO_H
00041 #include <sys/aio.h>
00042 #endif
00043 #endif
00044
00045 void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code);
00046 void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code);
00047 void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count,
00048 MPI_Datatype datatype, int file_ptr_type,
00049 ADIO_Offset offset, ADIO_Status *status,
00050 int *error_code);
00051 void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count,
00052 MPI_Datatype datatype, int file_ptr_type,
00053 ADIO_Offset offset, ADIO_Status *status,
00054 int *error_code);
00055 void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count,
00056 MPI_Datatype datatype, int file_ptr_type,
00057 ADIO_Offset offset, ADIO_Status *status,
00058 int *error_code);
00059 void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,
00060 MPI_Datatype datatype, int file_ptr_type,
00061 ADIO_Offset offset, ADIO_Status *status,
00062 int *error_code);
00063 void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
00064 MPI_Datatype datatype, int file_ptr_type,
00065 ADIO_Offset offset, ADIO_Status *status,
00066 int *error_code);
00067 void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count,
00068 MPI_Datatype datatype, int file_ptr_type,
00069 ADIO_Offset offset, ADIO_Status *status,
00070 int *error_code);
00071 void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct,
00072 int *error_code);
00073 void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
00074
00075
00076 int ADIOI_LUSTRE_Docollect(ADIO_File fd, int contig_access_count,
00077 ADIO_Offset *len_list, int nprocs);
00078
00079 void ADIOI_LUSTRE_Get_striping_info(ADIO_File fd, int **striping_info_ptr,
00080 int mode);
00081 void ADIOI_LUSTRE_Calc_my_req(ADIO_File fd, ADIO_Offset *offset_list,
00082 ADIO_Offset *len_list, int contig_access_count,
00083 int *striping_info, int nprocs,
00084 int *count_my_req_procs_ptr,
00085 int **count_my_req_per_proc_ptr,
00086 ADIOI_Access **my_req_ptr,
00087 int ***buf_idx_ptr);
00088
00089 int ADIOI_LUSTRE_Calc_aggregator(ADIO_File fd, ADIO_Offset off,
00090 ADIO_Offset *len, int *striping_info);
00091 #endif