diff --git a/ompi/mpi/c/file_iread_all.c b/ompi/mpi/c/file_iread_all.c index 46e2c90ff3..9ea72d0b95 100644 --- a/ompi/mpi/c/file_iread_all.c +++ b/ompi/mpi/c/file_iread_all.c @@ -13,6 +13,7 @@ * Copyright (c) 2015 University of Houston. 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 @@ -71,8 +72,13 @@ int MPI_File_iread_all(MPI_File fh, void *buf, int count, /* Call the back-end io component function */ switch (fh->f_io_version) { case MCA_IO_BASE_V_2_0_0: - rc = fh->f_io_selected_module.v2_0_0. - io_module_file_iread_all(fh, buf, count, datatype, request); + 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. + io_module_file_iread_all(fh, buf, count, datatype, request); + } break; default: diff --git a/ompi/mpi/c/file_iread_at_all.c b/ompi/mpi/c/file_iread_at_all.c index a8da5702da..93f646f69d 100644 --- a/ompi/mpi/c/file_iread_at_all.c +++ b/ompi/mpi/c/file_iread_at_all.c @@ -13,6 +13,7 @@ * Copyright (c) 2015 University of Houston. 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 @@ -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 */ switch (fh->f_io_version) { case MCA_IO_BASE_V_2_0_0: - rc = fh->f_io_selected_module.v2_0_0. - io_module_file_iread_at_all(fh, offset, buf, count, datatype, - request); + 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. + io_module_file_iread_at_all(fh, offset, buf, count, datatype, + request); + } break; default: diff --git a/ompi/mpi/c/file_iwrite_all.c b/ompi/mpi/c/file_iwrite_all.c index fc9f013ff8..d48d5af457 100644 --- a/ompi/mpi/c/file_iwrite_all.c +++ b/ompi/mpi/c/file_iwrite_all.c @@ -16,6 +16,7 @@ * Copyright (c) 2015 University of Houston. 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 @@ -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 */ switch (fh->f_io_version) { case MCA_IO_BASE_V_2_0_0: - rc = fh->f_io_selected_module.v2_0_0. - io_module_file_iwrite_all(fh, buf, count, datatype, request); + 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. + io_module_file_iwrite_all(fh, buf, count, datatype, request); + } break; default: diff --git a/ompi/mpi/c/file_iwrite_at_all.c b/ompi/mpi/c/file_iwrite_at_all.c index f2d0198353..017ba96dde 100644 --- a/ompi/mpi/c/file_iwrite_at_all.c +++ b/ompi/mpi/c/file_iwrite_at_all.c @@ -16,6 +16,7 @@ * Copyright (c) 2015 University of Houston. 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 @@ -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 */ switch (fh->f_io_version) { case MCA_IO_BASE_V_2_0_0: - rc = fh->f_io_selected_module.v2_0_0. - io_module_file_iwrite_at_all(fh, offset, buf, count, datatype, - request); + 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. + io_module_file_iwrite_at_all(fh, offset, buf, count, datatype, + request); + } break; default: