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