Skip to content

Commit 5e302f5

Browse files
committed
ompi/mpi: Fix parameter order in mpi_type_create_f90_(real|complex)
Signed-off-by: Joshua Hursey <[email protected]>
1 parent facd6d6 commit 5e302f5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ompi/mpi/c/type_create_f90_complex.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* reserved.
1717
* Copyright (c) 2015 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
19+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -106,8 +107,8 @@ int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype)
106107
snprintf(datatype->name, MPI_MAX_OBJECT_NAME, "COMBINER %s",
107108
(*newtype)->name);
108109

109-
a_i[0] = &r;
110-
a_i[1] = &p;
110+
a_i[0] = &p;
111+
a_i[1] = &r;
111112
ompi_datatype_set_args( datatype, 2, a_i, 0, NULL, 0, NULL, MPI_COMBINER_F90_COMPLEX );
112113

113114
rc = opal_hash_table_set_value_uint64( &ompi_mpi_f90_complex_hashtable, key, datatype );

ompi/mpi/c/type_create_f90_real.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* reserved.
1717
* Copyright (c) 2015 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
19+
* Copyright (c) 2017 IBM Corporation. All rights reserved.
1920
* $COPYRIGHT$
2021
*
2122
* Additional copyrights may follow
@@ -83,7 +84,7 @@ int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype)
8384

8485
if( *newtype != &ompi_mpi_datatype_null.dt ) {
8586
ompi_datatype_t* datatype;
86-
const int* a_i[2] = {&r, &p};
87+
const int* a_i[2] = {&p, &r};
8788
int rc;
8889

8990
key = (((uint64_t)p) << 32) | ((uint64_t)r);

0 commit comments

Comments
 (0)