This source file includes following definitions.
- mca_sharedfp_lockedfile_get_position
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #include "ompi_config.h"
24 #include "sharedfp_lockedfile.h"
25
26 #include "mpi.h"
27 #include "ompi/constants.h"
28 #include "ompi/mca/sharedfp/sharedfp.h"
29 #include "ompi/mca/sharedfp/base/base.h"
30
31 int
32 mca_sharedfp_lockedfile_get_position(ompio_file_t *fh,
33 OMPI_MPI_OFFSET_TYPE * offset)
34 {
35 int ret = OMPI_SUCCESS;
36 mca_sharedfp_base_module_t * shared_fp_base_module;
37 struct mca_sharedfp_base_data_t *sh = NULL;
38
39 if(fh->f_sharedfp_data==NULL){
40 opal_output(ompi_sharedfp_base_framework.framework_output,
41 "sharedfp_lockedfile_get_position - opening the shared file pointer\n");
42 shared_fp_base_module = fh->f_sharedfp;
43
44 ret = shared_fp_base_module->sharedfp_file_open(fh->f_comm,
45 fh->f_filename,
46 fh->f_amode,
47 fh->f_info,
48 fh);
49 if (ret != OMPI_SUCCESS) {
50 opal_output(0,"sharedfp_lockedfile_write - error opening the shared file pointer\n");
51 return ret;
52 }
53 }
54
55 sh = fh->f_sharedfp_data;
56
57
58
59
60 ret = mca_sharedfp_lockedfile_request_position(sh,0,offset);
61
62 return ret;
63 }