00001
00002
00003
00004
00005
00006
00007 #ifndef AD_GRIDFTP_INCLUDE
00008 #define AD_GRIDFTP_INCLUDE
00009
00010 #include <unistd.h>
00011 #include <sys/types.h>
00012 #include <sys/uio.h>
00013 #include <fcntl.h>
00014 #include "adio.h"
00015 #include <globus_ftp_client.h>
00016
00017
00018 extern int num_gridftp_handles;
00019 #ifndef ADIO_GRIDFTP_HANDLES_MAX
00020 #define ADIO_GRIDFTP_HANDLES_MAX 200
00021 #endif
00022 extern globus_ftp_client_handle_t gridftp_fh[ADIO_GRIDFTP_HANDLES_MAX];
00023 extern globus_ftp_client_operationattr_t oattr[ADIO_GRIDFTP_HANDLES_MAX];
00024
00025
00026
00027 void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code);
00028 void ADIOI_GRIDFTP_Close(ADIO_File fd, int *error_code);
00029 void ADIOI_GRIDFTP_ReadContig(ADIO_File fd, void *buf, int count,
00030 MPI_Datatype datatype, int file_ptr_type,
00031 ADIO_Offset offset, ADIO_Status *status, int
00032 *error_code);
00033 void ADIOI_GRIDFTP_WriteContig(ADIO_File fd, void *buf, int count,
00034 MPI_Datatype datatype, int file_ptr_type,
00035 ADIO_Offset offset, ADIO_Status *status, int
00036 *error_code);
00037 void ADIOI_GRIDFTP_IwriteContig(ADIO_File fd, void *buf, int count,
00038 MPI_Datatype datatype, int file_ptr_type,
00039 ADIO_Offset offset, ADIO_Request *request, int
00040 *error_code);
00041 void ADIOI_GRIDFTP_IreadContig(ADIO_File fd, void *buf, int count,
00042 MPI_Datatype datatype, int file_ptr_type,
00043 ADIO_Offset offset, ADIO_Request *request, int
00044 *error_code);
00045 int ADIOI_GRIDFTP_ReadDone(ADIO_Request *request, ADIO_Status *status, int
00046 *error_code);
00047 int ADIOI_GRIDFTP_WriteDone(ADIO_Request *request, ADIO_Status *status, int
00048 *error_code);
00049 void ADIOI_GRIDFTP_ReadComplete(ADIO_Request *request, ADIO_Status *status, int
00050 *error_code);
00051 void ADIOI_GRIDFTP_WriteComplete(ADIO_Request *request, ADIO_Status *status,
00052 int *error_code);
00053 void ADIOI_GRIDFTP_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct,
00054 int *error_code);
00055 void ADIOI_GRIDFTP_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_GRIDFTP_ReadStrided(ADIO_File fd, void *buf, int count,
00060 MPI_Datatype datatype, int file_ptr_type,
00061 ADIO_Offset offset, ADIO_Status *status, int
00062 *error_code);
00063 void ADIOI_GRIDFTP_WriteStridedColl(ADIO_File fd, void *buf, int count,
00064 MPI_Datatype datatype, int file_ptr_type,
00065 ADIO_Offset offset, ADIO_Status *status, int
00066 *error_code);
00067 void ADIOI_GRIDFTP_ReadStridedColl(ADIO_File fd, void *buf, int count,
00068 MPI_Datatype datatype, int file_ptr_type,
00069 ADIO_Offset offset, ADIO_Status *status, int
00070 *error_code);
00071 void ADIOI_GRIDFTP_IreadStrided(ADIO_File fd, void *buf, int count,
00072 MPI_Datatype datatype, int file_ptr_type,
00073 ADIO_Offset offset, ADIO_Request *request, int
00074 *error_code);
00075 void ADIOI_GRIDFTP_IwriteStrided(ADIO_File fd, void *buf, int count,
00076 MPI_Datatype datatype, int file_ptr_type,
00077 ADIO_Offset offset, ADIO_Request *request, int
00078 *error_code);
00079 void ADIOI_GRIDFTP_Flush(ADIO_File fd, int *error_code);
00080 void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code);
00081 void ADIOI_GRIDFTP_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
00082 void ADIOI_GRIDFTP_Get_shared_fp(ADIO_File fd, int size,
00083 ADIO_Offset *shared_fp,
00084 int *error_code);
00085 void ADIOI_GRIDFTP_Set_shared_fp(ADIO_File fd, ADIO_Offset offset,
00086 int *error_code);
00087 void ADIOI_GRIDFTP_Delete(char *filename, int *error_code);
00088
00089 void globus_err_handler(const char *routine, const char *caller,
00090 globus_result_t result);
00091
00092 #endif
00093
00094
00095
00096