1
1

Fix MPI_Status_set_elements[_x] for non predefined datatypes

Fixes trac:4896

cmr=v1.8.3:reviewer=bosilca

This commit was SVN r32696.

The following Trac tickets were found above:
  Ticket 4896 --> https://svn.open-mpi.org/trac/ompi/ticket/4896
Этот коммит содержится в:
Gilles Gouaillardet 2014-09-10 02:41:29 +00:00
родитель e671620ac7
Коммит e4c3500166
2 изменённых файлов: 10 добавлений и 14 удалений

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

@ -12,6 +12,8 @@
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights * Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* reserved. * reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -74,12 +76,8 @@ int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, int count
return MPI_SUCCESS; return MPI_SUCCESS;
} }
if( ompi_datatype_is_predefined(datatype) ) { ompi_datatype_type_size( datatype, &size );
ompi_datatype_type_size( datatype, &size ); status->_ucount = count * size;
status->_ucount = count * size;
} else {
ompi_datatype_set_element_count( datatype, count, &size );
status->_ucount = size;
}
return MPI_SUCCESS; return MPI_SUCCESS;
} }

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

@ -12,6 +12,8 @@
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights * Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* reserved. * reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * 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; return MPI_SUCCESS;
} }
if( ompi_datatype_is_predefined(datatype) ) { ompi_datatype_type_size( datatype, &size );
ompi_datatype_type_size( datatype, &size ); status->_ucount = count * size;
status->_ucount = count * size;
} else {
ompi_datatype_set_element_count( datatype, count, &size );
status->_ucount = size;
}
return MPI_SUCCESS; return MPI_SUCCESS;
} }