This source file includes following definitions.
- mca_fs_pvfs2_file_set_size
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 #include "ompi_config.h"
28 #include "fs_pvfs2.h"
29
30 #include "mpi.h"
31 #include "ompi/constants.h"
32 #include "ompi/mca/fs/fs.h"
33
34
35
36
37
38
39
40
41 int
42 mca_fs_pvfs2_file_set_size (ompio_file_t *fh,
43 OMPI_MPI_OFFSET_TYPE size)
44 {
45 int ret;
46 mca_fs_pvfs2 *pvfs2_fs;
47
48 pvfs2_fs = (mca_fs_pvfs2 *)fh->f_fs_ptr;
49
50 if (OMPIO_ROOT == fh->f_rank) {
51 ret = PVFS_sys_truncate(pvfs2_fs->object_ref,
52 size, &(pvfs2_fs->credentials));
53 fh->f_comm->c_coll->coll_bcast (&ret,
54 1,
55 MPI_INT,
56 OMPIO_ROOT,
57 fh->f_comm,
58 fh->f_comm->c_coll->coll_bcast_module);
59 }
60 else {
61 fh->f_comm->c_coll->coll_bcast (&ret,
62 1,
63 MPI_INT,
64 OMPIO_ROOT,
65 fh->f_comm,
66 fh->f_comm->c_coll->coll_bcast_module);
67 }
68
69 if (ret != 0) {
70 return OMPI_ERROR;
71 }
72
73 return OMPI_SUCCESS;
74 }