From 5e302f52794f080d7e03da3933f20ed0a5c4a9ef Mon Sep 17 00:00:00 2001 From: Joshua Hursey Date: Tue, 23 May 2017 17:54:33 -0400 Subject: [PATCH] ompi/mpi: Fix parameter order in mpi_type_create_f90_(real|complex) Signed-off-by: Joshua Hursey --- ompi/mpi/c/type_create_f90_complex.c | 5 +++-- ompi/mpi/c/type_create_f90_real.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ompi/mpi/c/type_create_f90_complex.c b/ompi/mpi/c/type_create_f90_complex.c index 133e783711..a6474ef66c 100644 --- a/ompi/mpi/c/type_create_f90_complex.c +++ b/ompi/mpi/c/type_create_f90_complex.c @@ -16,6 +16,7 @@ * 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 @@ -106,8 +107,8 @@ int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype) snprintf(datatype->name, MPI_MAX_OBJECT_NAME, "COMBINER %s", (*newtype)->name); - a_i[0] = &r; - a_i[1] = &p; + a_i[0] = &p; + a_i[1] = &r; ompi_datatype_set_args( datatype, 2, a_i, 0, NULL, 0, NULL, MPI_COMBINER_F90_COMPLEX ); rc = opal_hash_table_set_value_uint64( &ompi_mpi_f90_complex_hashtable, key, datatype ); diff --git a/ompi/mpi/c/type_create_f90_real.c b/ompi/mpi/c/type_create_f90_real.c index a2144a619a..6bc9fe80a3 100644 --- a/ompi/mpi/c/type_create_f90_real.c +++ b/ompi/mpi/c/type_create_f90_real.c @@ -16,6 +16,7 @@ * 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 @@ -83,7 +84,7 @@ int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype) if( *newtype != &ompi_mpi_datatype_null.dt ) { ompi_datatype_t* datatype; - const int* a_i[2] = {&r, &p}; + const int* a_i[2] = {&p, &r}; int rc; key = (((uint64_t)p) << 32) | ((uint64_t)r);