00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 #include "adio.h"
00009 
00010 #ifdef HAVE_UNISTD_H
00011 #include <unistd.h>
00012 #endif
00013 
00014 void ADIOI_GEN_Flush(ADIO_File fd, int *error_code)
00015 {
00016     int err;
00017     static char myname[] = "ADIOI_GEN_FLUSH";
00018 
00019     err = fsync(fd->fd_sys);
00020     
00021     if (err == -1) {
00022     *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
00023                        myname, __LINE__, MPI_ERR_IO,
00024                        "**io",
00025                        "**io %s", strerror(errno));
00026     return;
00027     }
00028     
00029 
00030     *error_code = MPI_SUCCESS;
00031 }