This source file includes following definitions.
- ADIOI_GEN_Flush
1
2
3
4
5
6
7
8 #include "adio.h"
9
10 #ifdef HAVE_UNISTD_H
11 #include <unistd.h>
12 #endif
13
14 void ADIOI_GEN_Flush(ADIO_File fd, int *error_code)
15 {
16 int err;
17 static char myname[] = "ADIOI_GEN_FLUSH";
18
19
20
21 if (fd->is_open > 0) {
22 err = fsync(fd->fd_sys);
23
24 if (err == -1) {
25 *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
26 myname, __LINE__, MPI_ERR_IO,
27 "**io",
28 "**io %s", strerror(errno));
29 return;
30 }
31
32 }
33
34 *error_code = MPI_SUCCESS;
35 }