Skip to content

Commit 667f2d8

Browse files
authored
Merge pull request #3692 from jjhursey/fix/v3.0.x/romio-314-missing-ops
ROMIO 3.1.4 : Add support for missing ops
2 parents b3559a4 + eae64bc commit 667f2d8

8 files changed

+167
-14
lines changed

ompi/mca/io/romio314/src/io_romio314.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,24 @@ int mca_io_romio314_file_iread_at (struct ompi_file_t *fh,
128128
int count,
129129
struct ompi_datatype_t *datatype,
130130
ompi_request_t **request);
131+
int mca_io_romio314_file_iread_at_all (struct ompi_file_t *fh,
132+
MPI_Offset offset,
133+
void *buf,
134+
int count,
135+
struct ompi_datatype_t *datatype,
136+
ompi_request_t **request);
131137
int mca_io_romio314_file_iwrite_at (struct ompi_file_t *fh,
132138
MPI_Offset offset,
133139
const void *buf,
134140
int count,
135141
struct ompi_datatype_t *datatype,
136142
ompi_request_t **request);
143+
int mca_io_romio314_file_iwrite_at_all (struct ompi_file_t *fh,
144+
MPI_Offset offset,
145+
const void *buf,
146+
int count,
147+
struct ompi_datatype_t *datatype,
148+
ompi_request_t **request);
137149

138150
/* Section 9.4.3 */
139151
int mca_io_romio314_file_read (struct ompi_file_t *fh,
@@ -161,11 +173,21 @@ int mca_io_romio314_file_iread (struct ompi_file_t *fh,
161173
int count,
162174
struct ompi_datatype_t *datatype,
163175
ompi_request_t **request);
176+
int mca_io_romio314_file_iread_all (struct ompi_file_t *fh,
177+
void *buf,
178+
int count,
179+
struct ompi_datatype_t *datatype,
180+
ompi_request_t **request);
164181
int mca_io_romio314_file_iwrite (struct ompi_file_t *fh,
165182
const void *buf,
166183
int count,
167184
struct ompi_datatype_t *datatype,
168185
ompi_request_t **request);
186+
int mca_io_romio314_file_iwrite_all (struct ompi_file_t *fh,
187+
const void *buf,
188+
int count,
189+
struct ompi_datatype_t *datatype,
190+
ompi_request_t **request);
169191
int mca_io_romio314_file_seek (struct ompi_file_t *fh,
170192
MPI_Offset offset,
171193
int whence);

ompi/mca/io/romio314/src/io_romio314_file_read.c

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1213
* $COPYRIGHT$
1314
*
1415
* Additional copyrights may follow
@@ -87,6 +88,33 @@ mca_io_romio314_file_iread_at (ompi_file_t *fh,
8788
return ret;
8889
}
8990

91+
int
92+
mca_io_romio314_file_iread_at_all (ompi_file_t *fh,
93+
MPI_Offset offset,
94+
void *buf,
95+
int count,
96+
struct ompi_datatype_t *datatype,
97+
ompi_request_t **request)
98+
{
99+
int ret;
100+
mca_io_romio314_data_t *data;
101+
102+
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
103+
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
104+
// ----------------------------------------------------
105+
// NOTE: If you upgrade ROMIO, replace this with the actual ROMIO call.
106+
// ----------------------------------------------------
107+
// No support for non-blocking collective I/O operations.
108+
// Fake it with individual non-blocking I/O operations.
109+
// Similar to OMPIO
110+
ret =
111+
ROMIO_PREFIX(MPI_File_iread_at) (data->romio_fh, offset, buf, count,
112+
datatype, request);
113+
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
114+
115+
return ret;
116+
}
117+
90118

91119
int
92120
mca_io_romio314_file_read (ompi_file_t *fh,
@@ -150,6 +178,31 @@ mca_io_romio314_file_iread (ompi_file_t *fh,
150178
return ret;
151179
}
152180

181+
int
182+
mca_io_romio314_file_iread_all (ompi_file_t *fh,
183+
void *buf,
184+
int count,
185+
struct ompi_datatype_t *datatype,
186+
ompi_request_t **request)
187+
{
188+
int ret;
189+
mca_io_romio314_data_t *data;
190+
191+
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
192+
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
193+
// ----------------------------------------------------
194+
// NOTE: If you upgrade ROMIO, replace this with the actual ROMIO call.
195+
// ----------------------------------------------------
196+
// No support for non-blocking collective I/O operations.
197+
// Fake it with individual non-blocking I/O operations.
198+
// Similar to OMPIO
199+
ret =
200+
ROMIO_PREFIX(MPI_File_iread) (data->romio_fh, buf, count, datatype,
201+
request);
202+
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
203+
204+
return ret;
205+
}
153206

154207
int
155208
mca_io_romio314_file_read_shared (ompi_file_t *fh,

ompi/mca/io/romio314/src/io_romio314_file_write.c

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2015 Research Organization for Information Science
1313
* and Technology (RIST). All rights reserved.
14+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -92,6 +93,32 @@ mca_io_romio314_file_iwrite_at (ompi_file_t *fh,
9293
}
9394

9495

96+
int
97+
mca_io_romio314_file_iwrite_at_all (ompi_file_t *fh,
98+
MPI_Offset offset,
99+
const void *buf,
100+
int count,
101+
struct ompi_datatype_t *datatype,
102+
ompi_request_t **request)
103+
{
104+
int ret;
105+
mca_io_romio314_data_t *data;
106+
107+
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
108+
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
109+
// ----------------------------------------------------
110+
// NOTE: If you upgrade ROMIO, replace this with the actual ROMIO call.
111+
// ----------------------------------------------------
112+
// No support for non-blocking collective I/O operations.
113+
// Fake it with individual non-blocking I/O operations.
114+
// Similar to OMPIO
115+
ret =
116+
ROMIO_PREFIX(MPI_File_iwrite_at) (data->romio_fh, offset, buf, count,
117+
datatype, request);
118+
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
119+
120+
return ret;
121+
}
95122

96123

97124

@@ -155,6 +182,32 @@ mca_io_romio314_file_iwrite (ompi_file_t *fh,
155182
return ret;
156183
}
157184

185+
int
186+
mca_io_romio314_file_iwrite_all (ompi_file_t *fh,
187+
const void *buf,
188+
int count,
189+
struct ompi_datatype_t *datatype,
190+
ompi_request_t **request)
191+
{
192+
int ret;
193+
mca_io_romio314_data_t *data;
194+
195+
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
196+
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
197+
// ----------------------------------------------------
198+
// NOTE: If you upgrade ROMIO, replace this with the actual ROMIO call.
199+
// ----------------------------------------------------
200+
// No support for non-blocking collective I/O operations.
201+
// Fake it with individual non-blocking I/O operations.
202+
// Similar to OMPIO
203+
ret =
204+
ROMIO_PREFIX(MPI_File_iwrite) (data->romio_fh, buf, count, datatype,
205+
request);
206+
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
207+
208+
return ret;
209+
}
210+
158211

159212
int
160213
mca_io_romio314_file_write_shared (ompi_file_t *fh,

ompi/mca/io/romio314/src/io_romio314_module.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* All rights reserved.
1212
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
1313
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
14+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1415
* $COPYRIGHT$
1516
*
1617
* Additional copyrights may follow
@@ -59,8 +60,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = {
5960
mca_io_romio314_file_write_at_all,
6061
mca_io_romio314_file_iread_at,
6162
mca_io_romio314_file_iwrite_at,
62-
NULL, /* iread_at_all */
63-
NULL, /* iwrite_at_all */
63+
mca_io_romio314_file_iread_at_all,
64+
mca_io_romio314_file_iwrite_at_all,
6465

6566
/* non-indexed IO operations */
6667
mca_io_romio314_file_read,
@@ -69,8 +70,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = {
6970
mca_io_romio314_file_write_all,
7071
mca_io_romio314_file_iread,
7172
mca_io_romio314_file_iwrite,
72-
NULL, /* iread_all */
73-
NULL, /* iwrite_all */
73+
mca_io_romio314_file_iread_all,
74+
mca_io_romio314_file_iwrite_all,
7475

7576
mca_io_romio314_file_seek,
7677
mca_io_romio314_file_get_position,

ompi/mpi/c/file_iread_all.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Copyright (c) 2015 University of Houston. All rights reserved.
1414
* Copyright (c) 2015 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
16+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1617
* $COPYRIGHT$
1718
*
1819
* Additional copyrights may follow
@@ -71,8 +72,13 @@ int MPI_File_iread_all(MPI_File fh, void *buf, int count,
7172
/* Call the back-end io component function */
7273
switch (fh->f_io_version) {
7374
case MCA_IO_BASE_V_2_0_0:
74-
rc = fh->f_io_selected_module.v2_0_0.
75-
io_module_file_iread_all(fh, buf, count, datatype, request);
75+
if( OPAL_UNLIKELY(NULL == fh->f_io_selected_module.v2_0_0.io_module_file_iread_all) ) {
76+
rc = MPI_ERR_UNSUPPORTED_OPERATION;
77+
}
78+
else {
79+
rc = fh->f_io_selected_module.v2_0_0.
80+
io_module_file_iread_all(fh, buf, count, datatype, request);
81+
}
7682
break;
7783

7884
default:

ompi/mpi/c/file_iread_at_all.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Copyright (c) 2015 University of Houston. All rights reserved.
1414
* Copyright (c) 2015 Research Organization for Information Science
1515
* and Technology (RIST). All rights reserved.
16+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1617
* $COPYRIGHT$
1718
*
1819
* Additional copyrights may follow
@@ -71,9 +72,14 @@ int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf,
7172
/* Call the back-end io component function */
7273
switch (fh->f_io_version) {
7374
case MCA_IO_BASE_V_2_0_0:
74-
rc = fh->f_io_selected_module.v2_0_0.
75-
io_module_file_iread_at_all(fh, offset, buf, count, datatype,
76-
request);
75+
if( OPAL_UNLIKELY(NULL == fh->f_io_selected_module.v2_0_0.io_module_file_iread_at_all) ) {
76+
rc = MPI_ERR_UNSUPPORTED_OPERATION;
77+
}
78+
else {
79+
rc = fh->f_io_selected_module.v2_0_0.
80+
io_module_file_iread_at_all(fh, offset, buf, count, datatype,
81+
request);
82+
}
7783
break;
7884

7985
default:

ompi/mpi/c/file_iwrite_all.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Copyright (c) 2015 University of Houston. All rights reserved.
1717
* Copyright (c) 2015 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
19+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -75,8 +76,13 @@ int MPI_File_iwrite_all(MPI_File fh, const void *buf, int count, MPI_Datatype
7576
/* Call the back-end io component function */
7677
switch (fh->f_io_version) {
7778
case MCA_IO_BASE_V_2_0_0:
78-
rc = fh->f_io_selected_module.v2_0_0.
79-
io_module_file_iwrite_all(fh, buf, count, datatype, request);
79+
if( OPAL_UNLIKELY(NULL == fh->f_io_selected_module.v2_0_0.io_module_file_iwrite_all) ) {
80+
rc = MPI_ERR_UNSUPPORTED_OPERATION;
81+
}
82+
else {
83+
rc = fh->f_io_selected_module.v2_0_0.
84+
io_module_file_iwrite_all(fh, buf, count, datatype, request);
85+
}
8086
break;
8187

8288
default:

ompi/mpi/c/file_iwrite_at_all.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* Copyright (c) 2015 University of Houston. All rights reserved.
1717
* Copyright (c) 2015 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
19+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -76,9 +77,14 @@ int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf,
7677
/* Call the back-end io component function */
7778
switch (fh->f_io_version) {
7879
case MCA_IO_BASE_V_2_0_0:
79-
rc = fh->f_io_selected_module.v2_0_0.
80-
io_module_file_iwrite_at_all(fh, offset, buf, count, datatype,
81-
request);
80+
if( OPAL_UNLIKELY(NULL == fh->f_io_selected_module.v2_0_0.io_module_file_iwrite_at_all) ) {
81+
rc = MPI_ERR_UNSUPPORTED_OPERATION;
82+
}
83+
else {
84+
rc = fh->f_io_selected_module.v2_0_0.
85+
io_module_file_iwrite_at_all(fh, offset, buf, count, datatype,
86+
request);
87+
}
8288
break;
8389

8490
default:

0 commit comments

Comments
 (0)