Skip to content

Commit 80a91dc

Browse files
committed
io/romio314: Add work around support for missing MPI_File ops
* Add work around support for the following missing ops in ROMIO 3.1.4 - `MPI_File_iread_at_all` - `MPI_File_iwrite_at_all` - `MPI_File_iread_all` - `MPI_File_iwrite_all` Signed-off-by: Joshua Hursey <[email protected]>
1 parent 2960963 commit 80a91dc

File tree

4 files changed

+133
-5
lines changed

4 files changed

+133
-5
lines changed

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

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

139151
/* Section 9.4.3 */
140152
int mca_io_romio314_file_read (struct ompi_file_t *fh,
@@ -162,11 +174,21 @@ int mca_io_romio314_file_iread (struct ompi_file_t *fh,
162174
int count,
163175
struct ompi_datatype_t *datatype,
164176
ompi_request_t **request);
177+
int mca_io_romio314_file_iread_all (struct ompi_file_t *fh,
178+
void *buf,
179+
int count,
180+
struct ompi_datatype_t *datatype,
181+
ompi_request_t **request);
165182
int mca_io_romio314_file_iwrite (struct ompi_file_t *fh,
166183
const void *buf,
167184
int count,
168185
struct ompi_datatype_t *datatype,
169186
ompi_request_t **request);
187+
int mca_io_romio314_file_iwrite_all (struct ompi_file_t *fh,
188+
const void *buf,
189+
int count,
190+
struct ompi_datatype_t *datatype,
191+
ompi_request_t **request);
170192
int mca_io_romio314_file_seek (struct ompi_file_t *fh,
171193
MPI_Offset offset,
172194
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +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 Corp. All rights reserved.
14+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1515
* $COPYRIGHT$
1616
*
1717
* Additional copyrights may follow
@@ -58,8 +58,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = {
5858
mca_io_romio314_file_write_at_all,
5959
mca_io_romio314_file_iread_at,
6060
mca_io_romio314_file_iwrite_at,
61-
NULL, /* iread_at_all */
62-
NULL, /* iwrite_at_all */
61+
mca_io_romio314_file_iread_at_all,
62+
mca_io_romio314_file_iwrite_at_all,
6363

6464
/* non-indexed IO operations */
6565
mca_io_romio314_file_read,
@@ -68,8 +68,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = {
6868
mca_io_romio314_file_write_all,
6969
mca_io_romio314_file_iread,
7070
mca_io_romio314_file_iwrite,
71-
NULL, /* iread_all */
72-
NULL, /* iwrite_all */
71+
mca_io_romio314_file_iread_all,
72+
mca_io_romio314_file_iwrite_all,
7373

7474
mca_io_romio314_file_seek,
7575
mca_io_romio314_file_get_position,

0 commit comments

Comments
 (0)