This source file includes following definitions.
- ADIOI_GRIDFTP_Close
1
2
3
4
5
6
7
8 #include "ad_gridftp.h"
9 #include "adioi.h"
10
11 void ADIOI_GRIDFTP_Close(ADIO_File fd, int *error_code)
12 {
13 int err;
14 static char myname[]="ADIOI_GRIDFTP_Close";
15
16 globus_result_t result;
17
18 MPI_Barrier(fd->comm);
19
20
21 result = globus_ftp_client_operationattr_destroy(&(oattr[fd->fd_sys]));
22 if (result != GLOBUS_SUCCESS )
23 {
24 globus_err_handler("globus_ftp_client_operationattr_destroy",
25 myname,result);
26 *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
27 myname, __LINE__, MPI_ERR_IO,
28 "**io",
29 "**io %s",globus_object_printable_to_string(globus_error_get(result)));
30 return;
31 }
32 result=globus_ftp_client_handle_destroy(&(gridftp_fh[fd->fd_sys]));
33 if (result != GLOBUS_SUCCESS )
34 {
35 globus_err_handler("globus_ftp_client_handle_destroy",
36 myname,result);
37 *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
38 myname, __LINE__, MPI_ERR_IO,
39 "**io",
40 "**io %s", globus_object_printable_to_string(globus_error_get(result)));
41 return;
42 }
43
44 fd->fd_sys = -1;
45 fd->fp_ind=0;
46 fd->fp_sys_posn=0;
47 num_gridftp_handles--;
48
49 *error_code = MPI_SUCCESS;
50 }