mpi/c: Protect some IO functions not widely implemented
* Protects us from segv when ROMIO 314 is selected and one of the following operations is called: - 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>
Этот коммит содержится в:
родитель
2ffaf5ea9f
Коммит
29609631a2
@ -13,6 +13,7 @@
|
|||||||
* Copyright (c) 2015 University of Houston. All rights reserved.
|
* Copyright (c) 2015 University of Houston. All rights reserved.
|
||||||
* Copyright (c) 2015 Research Organization for Information Science
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
|
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -71,8 +72,13 @@ int MPI_File_iread_all(MPI_File fh, void *buf, int count,
|
|||||||
/* Call the back-end io component function */
|
/* Call the back-end io component function */
|
||||||
switch (fh->f_io_version) {
|
switch (fh->f_io_version) {
|
||||||
case MCA_IO_BASE_V_2_0_0:
|
case MCA_IO_BASE_V_2_0_0:
|
||||||
|
if( OPAL_UNLIKELY(NULL == fh->f_io_selected_module.v2_0_0.io_module_file_iread_all) ) {
|
||||||
|
rc = MPI_ERR_UNSUPPORTED_OPERATION;
|
||||||
|
}
|
||||||
|
else {
|
||||||
rc = fh->f_io_selected_module.v2_0_0.
|
rc = fh->f_io_selected_module.v2_0_0.
|
||||||
io_module_file_iread_all(fh, buf, count, datatype, request);
|
io_module_file_iread_all(fh, buf, count, datatype, request);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
* Copyright (c) 2015 University of Houston. All rights reserved.
|
* Copyright (c) 2015 University of Houston. All rights reserved.
|
||||||
* Copyright (c) 2015 Research Organization for Information Science
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
|
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -71,9 +72,14 @@ int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf,
|
|||||||
/* Call the back-end io component function */
|
/* Call the back-end io component function */
|
||||||
switch (fh->f_io_version) {
|
switch (fh->f_io_version) {
|
||||||
case MCA_IO_BASE_V_2_0_0:
|
case MCA_IO_BASE_V_2_0_0:
|
||||||
|
if( OPAL_UNLIKELY(NULL == fh->f_io_selected_module.v2_0_0.io_module_file_iread_at_all) ) {
|
||||||
|
rc = MPI_ERR_UNSUPPORTED_OPERATION;
|
||||||
|
}
|
||||||
|
else {
|
||||||
rc = fh->f_io_selected_module.v2_0_0.
|
rc = fh->f_io_selected_module.v2_0_0.
|
||||||
io_module_file_iread_at_all(fh, offset, buf, count, datatype,
|
io_module_file_iread_at_all(fh, offset, buf, count, datatype,
|
||||||
request);
|
request);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* Copyright (c) 2015 University of Houston. All rights reserved.
|
* Copyright (c) 2015 University of Houston. All rights reserved.
|
||||||
* Copyright (c) 2015 Research Organization for Information Science
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
|
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -75,8 +76,13 @@ int MPI_File_iwrite_all(MPI_File fh, const void *buf, int count, MPI_Datatype
|
|||||||
/* Call the back-end io component function */
|
/* Call the back-end io component function */
|
||||||
switch (fh->f_io_version) {
|
switch (fh->f_io_version) {
|
||||||
case MCA_IO_BASE_V_2_0_0:
|
case MCA_IO_BASE_V_2_0_0:
|
||||||
|
if( OPAL_UNLIKELY(NULL == fh->f_io_selected_module.v2_0_0.io_module_file_iwrite_all) ) {
|
||||||
|
rc = MPI_ERR_UNSUPPORTED_OPERATION;
|
||||||
|
}
|
||||||
|
else {
|
||||||
rc = fh->f_io_selected_module.v2_0_0.
|
rc = fh->f_io_selected_module.v2_0_0.
|
||||||
io_module_file_iwrite_all(fh, buf, count, datatype, request);
|
io_module_file_iwrite_all(fh, buf, count, datatype, request);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* Copyright (c) 2015 University of Houston. All rights reserved.
|
* Copyright (c) 2015 University of Houston. All rights reserved.
|
||||||
* Copyright (c) 2015 Research Organization for Information Science
|
* Copyright (c) 2015 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
|
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -76,9 +77,14 @@ int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf,
|
|||||||
/* Call the back-end io component function */
|
/* Call the back-end io component function */
|
||||||
switch (fh->f_io_version) {
|
switch (fh->f_io_version) {
|
||||||
case MCA_IO_BASE_V_2_0_0:
|
case MCA_IO_BASE_V_2_0_0:
|
||||||
|
if( OPAL_UNLIKELY(NULL == fh->f_io_selected_module.v2_0_0.io_module_file_iwrite_at_all) ) {
|
||||||
|
rc = MPI_ERR_UNSUPPORTED_OPERATION;
|
||||||
|
}
|
||||||
|
else {
|
||||||
rc = fh->f_io_selected_module.v2_0_0.
|
rc = fh->f_io_selected_module.v2_0_0.
|
||||||
io_module_file_iwrite_at_all(fh, offset, buf, count, datatype,
|
io_module_file_iwrite_at_all(fh, offset, buf, count, datatype,
|
||||||
request);
|
request);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user