This source file includes following definitions.
- ADIOI_PFS_Flush
1
2
3
4
5
6
7
8 #include "ad_pfs.h"
9
10 void ADIOI_PFS_Flush(ADIO_File fd, int *error_code)
11 {
12 int err, np_total, np_comm;
13 static char myname[] = "ADIOI_PFS_FLUSH";
14
15
16
17 err = fsync(fd->fd_sys);
18 if (err == -1) {
19 *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
20 myname, __LINE__, MPI_ERR_IO,
21 "**io",
22 "**io %s", strerror(errno));
23 }
24 else *error_code = MPI_SUCCESS;
25
26
27
28
29
30
31 MPI_Comm_size(MPI_COMM_WORLD, &np_total);
32 MPI_Comm_size(fd->comm, &np_comm);
33 if ((np_total == np_comm) && (!(fd->atomicity))) {
34 err = _setiomode(fd->fd_sys, M_UNIX);
35 err = _setiomode(fd->fd_sys, M_ASYNC);
36 }
37
38 }