1
1

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 <jhursey@us.ibm.com>
Этот коммит содержится в:
Joshua Hursey 2017-06-09 12:24:07 -04:00
родитель 29609631a2
Коммит 80a91dc244
4 изменённых файлов: 133 добавлений и 5 удалений

Просмотреть файл

@ -129,12 +129,24 @@ int mca_io_romio314_file_iread_at (struct ompi_file_t *fh,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request);
int mca_io_romio314_file_iread_at_all (struct ompi_file_t *fh,
MPI_Offset offset,
void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request);
int mca_io_romio314_file_iwrite_at (struct ompi_file_t *fh,
MPI_Offset offset,
const void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request);
int mca_io_romio314_file_iwrite_at_all (struct ompi_file_t *fh,
MPI_Offset offset,
const void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request);
/* Section 9.4.3 */
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,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request);
int mca_io_romio314_file_iread_all (struct ompi_file_t *fh,
void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request);
int mca_io_romio314_file_iwrite (struct ompi_file_t *fh,
const void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request);
int mca_io_romio314_file_iwrite_all (struct ompi_file_t *fh,
const void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request);
int mca_io_romio314_file_seek (struct ompi_file_t *fh,
MPI_Offset offset,
int whence);

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -87,6 +88,33 @@ mca_io_romio314_file_iread_at (ompi_file_t *fh,
return ret;
}
int
mca_io_romio314_file_iread_at_all (ompi_file_t *fh,
MPI_Offset offset,
void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
// ----------------------------------------------------
// NOTE: If you upgrade ROMIO, replace this with the actual ROMIO call.
// ----------------------------------------------------
// No support for non-blocking collective I/O operations.
// Fake it with individual non-blocking I/O operations.
// Similar to OMPIO
ret =
ROMIO_PREFIX(MPI_File_iread_at) (data->romio_fh, offset, buf, count,
datatype, request);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
int
mca_io_romio314_file_read (ompi_file_t *fh,
@ -150,6 +178,31 @@ mca_io_romio314_file_iread (ompi_file_t *fh,
return ret;
}
int
mca_io_romio314_file_iread_all (ompi_file_t *fh,
void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
// ----------------------------------------------------
// NOTE: If you upgrade ROMIO, replace this with the actual ROMIO call.
// ----------------------------------------------------
// No support for non-blocking collective I/O operations.
// Fake it with individual non-blocking I/O operations.
// Similar to OMPIO
ret =
ROMIO_PREFIX(MPI_File_iread) (data->romio_fh, buf, count, datatype,
request);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
int
mca_io_romio314_file_read_shared (ompi_file_t *fh,

Просмотреть файл

@ -11,6 +11,7 @@
* All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -92,6 +93,32 @@ mca_io_romio314_file_iwrite_at (ompi_file_t *fh,
}
int
mca_io_romio314_file_iwrite_at_all (ompi_file_t *fh,
MPI_Offset offset,
const void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
// ----------------------------------------------------
// NOTE: If you upgrade ROMIO, replace this with the actual ROMIO call.
// ----------------------------------------------------
// No support for non-blocking collective I/O operations.
// Fake it with individual non-blocking I/O operations.
// Similar to OMPIO
ret =
ROMIO_PREFIX(MPI_File_iwrite_at) (data->romio_fh, offset, buf, count,
datatype, request);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
@ -155,6 +182,32 @@ mca_io_romio314_file_iwrite (ompi_file_t *fh,
return ret;
}
int
mca_io_romio314_file_iwrite_all (ompi_file_t *fh,
const void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
// ----------------------------------------------------
// NOTE: If you upgrade ROMIO, replace this with the actual ROMIO call.
// ----------------------------------------------------
// No support for non-blocking collective I/O operations.
// Fake it with individual non-blocking I/O operations.
// Similar to OMPIO
ret =
ROMIO_PREFIX(MPI_File_iwrite) (data->romio_fh, buf, count, datatype,
request);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
int
mca_io_romio314_file_write_shared (ompi_file_t *fh,

Просмотреть файл

@ -11,7 +11,7 @@
* All rights reserved.
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2017 IBM Corp. All rights reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -58,8 +58,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = {
mca_io_romio314_file_write_at_all,
mca_io_romio314_file_iread_at,
mca_io_romio314_file_iwrite_at,
NULL, /* iread_at_all */
NULL, /* iwrite_at_all */
mca_io_romio314_file_iread_at_all,
mca_io_romio314_file_iwrite_at_all,
/* non-indexed IO operations */
mca_io_romio314_file_read,
@ -68,8 +68,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = {
mca_io_romio314_file_write_all,
mca_io_romio314_file_iread,
mca_io_romio314_file_iwrite,
NULL, /* iread_all */
NULL, /* iwrite_all */
mca_io_romio314_file_iread_all,
mca_io_romio314_file_iwrite_all,
mca_io_romio314_file_seek,
mca_io_romio314_file_get_position,