00001
00002
00003
00004
00005
00006
00007
00008 #include "ad_pvfs.h"
00009
00010 void ADIOI_PVFS_Close(ADIO_File fd, int *error_code)
00011 {
00012 int err;
00013 static char myname[] = "ADIOI_PVFS_CLOSE";
00014
00015 #ifdef ADIOI_MPE_LOGGING
00016 MPE_Log_event( ADIOI_MPE_close_a, 0, NULL );
00017 #endif
00018 err = pvfs_close(fd->fd_sys);
00019 #ifdef ADIOI_MPE_LOGGING
00020 MPE_Log_event( ADIOI_MPE_close_b, 0, NULL );
00021 #endif
00022 fd->fd_sys = -1;
00023
00024 if (err == -1) {
00025 *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
00026 myname, __LINE__, MPI_ERR_IO,
00027 "**io",
00028 "**io %s", strerror(errno));
00029 }
00030 else *error_code = MPI_SUCCESS;
00031 }