1
2
3
4
5
6
7
8
9
10
11 #ifndef AD_UNIX_INCLUDE
12 #define AD_UNIX_INCLUDE
13
14
15 #define HAVE_ASM_TYPES_H 1
16
17 #include <unistd.h>
18 #include <linux/types.h>
19
20 #ifdef __linux__
21 # include <sys/ioctl.h>
22 # include <time.h>
23 # define __USE_GNU
24 # include <fcntl.h>
25 # undef __USE_GNU
26 #endif
27
28
29 #include <sys/ioctl.h>
30 #include <lustre/lustre_user.h>
31 #include "adio.h"
32
33
34 #ifdef HAVE_SIGNAL_H
35 #include <signal.h>
36 #endif
37
38 #ifdef HAVE_AIO_LITE_H
39 #include <aio-lite.h>
40 #else
41 #ifdef HAVE_AIO_H
42 #include <aio.h>
43 #endif
44 #ifdef HAVE_SYS_AIO_H
45 #include <sys/aio.h>
46 #endif
47 #endif
48
49 void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code);
50 void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code);
51 void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count,
52 MPI_Datatype datatype, int file_ptr_type,
53 ADIO_Offset offset, ADIO_Status *status,
54 int *error_code);
55 void ADIOI_LUSTRE_WriteContig(ADIO_File fd, const void *buf, int count,
56 MPI_Datatype datatype, int file_ptr_type,
57 ADIO_Offset offset, ADIO_Status *status,
58 int *error_code);
59 void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, const void *buf, int count,
60 MPI_Datatype datatype, int file_ptr_type,
61 ADIO_Offset offset, ADIO_Status *status,
62 int *error_code);
63 void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, const void *buf, int count,
64 MPI_Datatype datatype, int file_ptr_type,
65 ADIO_Offset offset, ADIO_Status *status,
66 int *error_code);
67 void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
68 MPI_Datatype datatype, int file_ptr_type,
69 ADIO_Offset offset, ADIO_Status *status,
70 int *error_code);
71 void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count,
72 MPI_Datatype datatype, int file_ptr_type,
73 ADIO_Offset offset, ADIO_Status *status,
74 int *error_code);
75 void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct,
76 int *error_code);
77 void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
78
79
80 int ADIOI_LUSTRE_Docollect(ADIO_File fd, int contig_access_count,
81 ADIO_Offset *len_list, int nprocs);
82
83 void ADIOI_LUSTRE_Get_striping_info(ADIO_File fd, int **striping_info_ptr,
84 int mode);
85 void ADIOI_LUSTRE_Calc_my_req(ADIO_File fd, ADIO_Offset *offset_list,
86 ADIO_Offset *len_list, int contig_access_count,
87 int *striping_info, int nprocs,
88 int *count_my_req_procs_ptr,
89 int **count_my_req_per_proc_ptr,
90 ADIOI_Access **my_req_ptr,
91 int ***buf_idx_ptr);
92
93 int ADIOI_LUSTRE_Calc_aggregator(ADIO_File fd, ADIO_Offset off,
94 ADIO_Offset *len, int *striping_info);
95 #endif