diff --git a/ompi/mpi/c/status_set_elements.c b/ompi/mpi/c/status_set_elements.c index 5bf5399bbe..ecc8aea9c3 100644 --- a/ompi/mpi/c/status_set_elements.c +++ b/ompi/mpi/c/status_set_elements.c @@ -12,6 +12,8 @@ * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -74,12 +76,8 @@ int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, int count return MPI_SUCCESS; } - if( ompi_datatype_is_predefined(datatype) ) { - ompi_datatype_type_size( datatype, &size ); - status->_ucount = count * size; - } else { - ompi_datatype_set_element_count( datatype, count, &size ); - status->_ucount = size; - } + ompi_datatype_type_size( datatype, &size ); + status->_ucount = count * size; + return MPI_SUCCESS; } diff --git a/ompi/mpi/c/status_set_elements_x.c b/ompi/mpi/c/status_set_elements_x.c index 561f5fef8f..d1f7cb15a6 100644 --- a/ompi/mpi/c/status_set_elements_x.c +++ b/ompi/mpi/c/status_set_elements_x.c @@ -12,6 +12,8 @@ * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -74,12 +76,8 @@ int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Cou return MPI_SUCCESS; } - if( ompi_datatype_is_predefined(datatype) ) { - ompi_datatype_type_size( datatype, &size ); - status->_ucount = count * size; - } else { - ompi_datatype_set_element_count( datatype, count, &size ); - status->_ucount = size; - } + ompi_datatype_type_size( datatype, &size ); + status->_ucount = count * size; + return MPI_SUCCESS; }