1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
3 * Copyright (C) 2003 University of Chicago, Ohio Supercomputer Center.
4 * See COPYRIGHT notice in top-level directory.
7 #ifndef AD_GRIDFTP_INCLUDE
8 #define AD_GRIDFTP_INCLUDE
11 #include <sys/types.h>
15 #include <globus_ftp_client.h>
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
];
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
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
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
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
45 int ADIOI_GRIDFTP_ReadDone(ADIO_Request
*request
, ADIO_Status
*status
, int
47 int ADIOI_GRIDFTP_WriteDone(ADIO_Request
*request
, ADIO_Status
*status
, int
49 void ADIOI_GRIDFTP_ReadComplete(ADIO_Request
*request
, ADIO_Status
*status
, int
51 void ADIOI_GRIDFTP_WriteComplete(ADIO_Request
*request
, ADIO_Status
*status
,
53 void ADIOI_GRIDFTP_Fcntl(ADIO_File fd
, int flag
, ADIO_Fcntl_t
*fcntl_struct
,
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
,
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
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
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
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
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
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
,
85 void ADIOI_GRIDFTP_Set_shared_fp(ADIO_File fd
, ADIO_Offset offset
,
87 void ADIOI_GRIDFTP_Delete(char *filename
, int *error_code
);
89 void globus_err_handler(const char *routine
, const char *caller
,
90 globus_result_t result
);