Skip to content

Commit

Permalink
romio: use PMPI_Type_get_extent
Browse files Browse the repository at this point in the history
Replace the usage of deprecated MPI_Type_extent.
  • Loading branch information
hzhou committed May 28, 2021
1 parent 97d5dd0 commit 237be90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mpi/romio/mpi-io/get_extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint * exte

/* FIXME: handle other file data representations */

error_code = MPI_Type_extent(datatype, extent);
MPI_Aint lb;
error_code = PMPI_Type_get_extent(datatype, &lb, extent);

fn_exit:
return error_code;
Expand Down Expand Up @@ -102,8 +103,8 @@ int MPI_File_get_type_extent_c(MPI_File fh, MPI_Datatype datatype, MPI_Count * e

/* FIXME: handle other file data representations */

MPI_Aint extent_i;
error_code = PMPI_Type_extent(datatype, &extent_i);
MPI_Aint lb_i, extent_i;
error_code = PMPI_Type_get_extent(datatype, &lb_i, &extent_i);
*extent = extent_i;

fn_exit:
Expand Down

0 comments on commit 237be90

Please sign in to comment.