1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ 2 /* 3 * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center. 4 * See COPYRIGHT notice in top-level directory. 5 */ 6 7 #ifndef AD_GRIDFTP_INCLUDE 8 #define AD_GRIDFTP_INCLUDE 9 10 #include <unistd.h> 11 #include <sys/types.h> 12 #include <sys/uio.h> 13 #include <fcntl.h> 14 #include "adio.h" 15 #include <globus_ftp_client.h> 16 17 /* These live in globus_routines.c */ 18 extern int num_gridftp_handles; 19 #ifndef ADIO_GRIDFTP_HANDLES_MAX 20 #define ADIO_GRIDFTP_HANDLES_MAX 200 21 #endif /* ! ADIO_GRIDFTP_HANDLES_MAX */ 22 extern globus_ftp_client_handle_t gridftp_fh[ADIO_GRIDFTP_HANDLES_MAX]; 23 extern globus_ftp_client_operationattr_t oattr[ADIO_GRIDFTP_HANDLES_MAX]; 24 25 26 /* TODO: weed out the now-unused prototypes */ 27 void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code); 28 void ADIOI_GRIDFTP_Close(ADIO_File fd, int *error_code); 29 void ADIOI_GRIDFTP_ReadContig(ADIO_File fd, void *buf, int count, 30 MPI_Datatype datatype, int file_ptr_type, 31 ADIO_Offset offset, ADIO_Status *status, int 32 *error_code); 33 void ADIOI_GRIDFTP_WriteContig(ADIO_File fd, void *buf, int count, 34 MPI_Datatype datatype, int file_ptr_type, 35 ADIO_Offset offset, ADIO_Status *status, int 36 *error_code); 37 void ADIOI_GRIDFTP_IwriteContig(ADIO_File fd, void *buf, int count, 38 MPI_Datatype datatype, int file_ptr_type, 39 ADIO_Offset offset, ADIO_Request *request, int 40 *error_code); 41 void ADIOI_GRIDFTP_IreadContig(ADIO_File fd, void *buf, int count, 42 MPI_Datatype datatype, int file_ptr_type, 43 ADIO_Offset offset, ADIO_Request *request, int 44 *error_code); 45 int ADIOI_GRIDFTP_ReadDone(ADIO_Request *request, ADIO_Status *status, int 46 *error_code); 47 int ADIOI_GRIDFTP_WriteDone(ADIO_Request *request, ADIO_Status *status, int 48 *error_code); 49 void ADIOI_GRIDFTP_ReadComplete(ADIO_Request *request, ADIO_Status *status, int 50 *error_code); 51 void ADIOI_GRIDFTP_WriteComplete(ADIO_Request *request, ADIO_Status *status, 52 int *error_code); 53 void ADIOI_GRIDFTP_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, 54 int *error_code); 55 void ADIOI_GRIDFTP_WriteStrided(ADIO_File fd, 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_GRIDFTP_ReadStrided(ADIO_File fd, void *buf, int count, 60 MPI_Datatype datatype, int file_ptr_type, 61 ADIO_Offset offset, ADIO_Status *status, int 62 *error_code); 63 void ADIOI_GRIDFTP_WriteStridedColl(ADIO_File fd, void *buf, int count, 64 MPI_Datatype datatype, int file_ptr_type, 65 ADIO_Offset offset, ADIO_Status *status, int 66 *error_code); 67 void ADIOI_GRIDFTP_ReadStridedColl(ADIO_File fd, void *buf, int count, 68 MPI_Datatype datatype, int file_ptr_type, 69 ADIO_Offset offset, ADIO_Status *status, int 70 *error_code); 71 void ADIOI_GRIDFTP_IreadStrided(ADIO_File fd, void *buf, int count, 72 MPI_Datatype datatype, int file_ptr_type, 73 ADIO_Offset offset, ADIO_Request *request, int 74 *error_code); 75 void ADIOI_GRIDFTP_IwriteStrided(ADIO_File fd, void *buf, int count, 76 MPI_Datatype datatype, int file_ptr_type, 77 ADIO_Offset offset, ADIO_Request *request, int 78 *error_code); 79 void ADIOI_GRIDFTP_Flush(ADIO_File fd, int *error_code); 80 void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); 81 void ADIOI_GRIDFTP_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); 82 void ADIOI_GRIDFTP_Get_shared_fp(ADIO_File fd, int size, 83 ADIO_Offset *shared_fp, 84 int *error_code); 85 void ADIOI_GRIDFTP_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, 86 int *error_code); 87 void ADIOI_GRIDFTP_Delete(char *filename, int *error_code); 88 89 void globus_err_handler(const char *routine, const char *caller, 90 globus_result_t result); 91 92 #endif 93 94 95 96 97