This source file includes following definitions.
- mca_sharedfp_sm_component_init_query
- mca_sharedfp_sm_component_file_query
- mca_sharedfp_sm_component_file_unquery
- mca_sharedfp_sm_module_init
- mca_sharedfp_sm_module_finalize
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
28 #include "ompi_config.h"
29 #include "mpi.h"
30 #include "ompi/mca/sharedfp/sharedfp.h"
31 #include "ompi/mca/sharedfp/base/base.h"
32 #include "ompi/mca/sharedfp/sm/sharedfp_sm.h"
33
34
35
36
37
38
39
40 static mca_sharedfp_base_module_1_0_0_t sm = {
41 mca_sharedfp_sm_module_init,
42 mca_sharedfp_sm_module_finalize,
43 mca_sharedfp_sm_seek,
44 mca_sharedfp_sm_get_position,
45 mca_sharedfp_sm_read,
46 mca_sharedfp_sm_read_ordered,
47 mca_sharedfp_sm_read_ordered_begin,
48 mca_sharedfp_sm_read_ordered_end,
49 mca_sharedfp_sm_iread,
50 mca_sharedfp_sm_write,
51 mca_sharedfp_sm_write_ordered,
52 mca_sharedfp_sm_write_ordered_begin,
53 mca_sharedfp_sm_write_ordered_end,
54 mca_sharedfp_sm_iwrite,
55 mca_sharedfp_sm_file_open,
56 mca_sharedfp_sm_file_close
57 };
58
59
60
61
62
63
64 int mca_sharedfp_sm_component_init_query(bool enable_progress_threads,
65 bool enable_mpi_threads)
66 {
67
68
69 return OMPI_SUCCESS;
70 }
71
72 struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_sm_component_file_query(ompio_file_t *fh, int *priority)
73 {
74 int i;
75 ompi_proc_t *proc;
76 ompi_communicator_t * comm = fh->f_comm;
77 int size = ompi_comm_size(comm);
78
79 *priority = 0;
80
81
82
83
84
85 ompi_group_t *group = comm->c_local_group;
86
87 for (i = 0; i < size; ++i) {
88 proc = ompi_group_peer_lookup(group,i);
89 if (!OPAL_PROC_ON_LOCAL_NODE(proc->super.proc_flags)){
90 opal_output(ompi_sharedfp_base_framework.framework_output,
91 "mca_sharedfp_sm_component_file_query: Disqualifying myself: (%d/%s) "
92 "not all processes are on the same node.",
93 comm->c_contextid, comm->c_name);
94 return NULL;
95 }
96 }
97
98 *priority = mca_sharedfp_sm_priority;
99 return &sm;
100 }
101
102 int mca_sharedfp_sm_component_file_unquery (ompio_file_t *file)
103 {
104
105
106
107
108 return OMPI_SUCCESS;
109 }
110
111 int mca_sharedfp_sm_module_init (ompio_file_t *file)
112 {
113 return OMPI_SUCCESS;
114 }
115
116
117 int mca_sharedfp_sm_module_finalize (ompio_file_t *file)
118 {
119 return OMPI_SUCCESS;
120 }