fortran/mpif-h: fix *_create_keyval_f
correctly handle out parameter *_keyval when OMPI_SIZEOF_FORTRAN_INTEGER > SIZEOF_INT
Этот коммит содержится в:
родитель
178dde6a20
Коммит
01c90d4e71
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -75,6 +75,7 @@ void ompi_comm_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* comm_copy_a
|
||||
MPI_Aint *extra_state, MPI_Fint *ierr)
|
||||
{
|
||||
int ret, c_ierr;
|
||||
OMPI_SINGLE_NAME_DECL(comm_keyval);
|
||||
ompi_attribute_fn_ptr_union_t copy_fn;
|
||||
ompi_attribute_fn_ptr_union_t del_fn;
|
||||
|
||||
@ -87,7 +88,7 @@ void ompi_comm_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* comm_copy_a
|
||||
to the old MPI-1 INTEGER-parameter functions). */
|
||||
|
||||
ret = ompi_attr_create_keyval_aint(COMM_ATTR, copy_fn, del_fn,
|
||||
comm_keyval, *extra_state, OMPI_KEYVAL_F77,
|
||||
OMPI_SINGLE_NAME_CONVERT(comm_keyval), *extra_state, OMPI_KEYVAL_F77,
|
||||
NULL);
|
||||
|
||||
if (MPI_SUCCESS != ret) {
|
||||
@ -97,5 +98,6 @@ void ompi_comm_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* comm_copy_a
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
} else {
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
|
||||
OMPI_SINGLE_INT_2_FINT(comm_keyval);
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -74,6 +74,7 @@ void ompi_keyval_create_f(ompi_mpi1_fortran_copy_attr_function* copy_attr_fn,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
int ret, c_ierr;
|
||||
OMPI_SINGLE_NAME_DECL(keyval);
|
||||
ompi_attribute_fn_ptr_union_t copy_fn;
|
||||
ompi_attribute_fn_ptr_union_t del_fn;
|
||||
|
||||
@ -86,7 +87,7 @@ void ompi_keyval_create_f(ompi_mpi1_fortran_copy_attr_function* copy_attr_fn,
|
||||
functions). */
|
||||
|
||||
ret = ompi_attr_create_keyval_fint(COMM_ATTR, copy_fn, del_fn,
|
||||
keyval, *extra_state,
|
||||
OMPI_SINGLE_NAME_CONVERT(keyval), *extra_state,
|
||||
OMPI_KEYVAL_F77 | OMPI_KEYVAL_F77_MPI1,
|
||||
NULL);
|
||||
|
||||
@ -94,8 +95,9 @@ void ompi_keyval_create_f(ompi_mpi1_fortran_copy_attr_function* copy_attr_fn,
|
||||
c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
MPI_ERR_OTHER,
|
||||
FUNC_NAME);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
} else {
|
||||
c_ierr = MPI_SUCCESS;
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
|
||||
OMPI_SINGLE_INT_2_FINT(keyval);
|
||||
}
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -73,6 +73,7 @@ void ompi_type_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* type_copy_a
|
||||
MPI_Fint *type_keyval, MPI_Aint *extra_state, MPI_Fint *ierr)
|
||||
{
|
||||
int ret, c_ierr;
|
||||
OMPI_SINGLE_NAME_DECL(type_keyval);
|
||||
ompi_attribute_fn_ptr_union_t copy_fn;
|
||||
ompi_attribute_fn_ptr_union_t del_fn;
|
||||
|
||||
@ -85,15 +86,16 @@ void ompi_type_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* type_copy_a
|
||||
to the old MPI-1 INTEGER-parameter functions). */
|
||||
|
||||
ret = ompi_attr_create_keyval_aint(TYPE_ATTR, copy_fn, del_fn,
|
||||
type_keyval, *extra_state, OMPI_KEYVAL_F77,
|
||||
OMPI_SINGLE_NAME_CONVERT(type_keyval), *extra_state, OMPI_KEYVAL_F77,
|
||||
NULL);
|
||||
|
||||
if (MPI_SUCCESS != ret) {
|
||||
c_ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
MPI_ERR_OTHER,
|
||||
FUNC_NAME);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
} else {
|
||||
c_ierr = MPI_SUCCESS;
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
|
||||
OMPI_SINGLE_INT_2_FINT(type_keyval);
|
||||
}
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2016 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -73,6 +73,7 @@ void ompi_win_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* win_copy_att
|
||||
MPI_Fint *win_keyval, MPI_Aint *extra_state, MPI_Fint *ierr)
|
||||
{
|
||||
int ret, c_ierr;
|
||||
OMPI_SINGLE_NAME_DECL(win_keyval);
|
||||
ompi_attribute_fn_ptr_union_t copy_fn;
|
||||
ompi_attribute_fn_ptr_union_t del_fn;
|
||||
|
||||
@ -85,7 +86,7 @@ void ompi_win_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* win_copy_att
|
||||
to the old MPI-1 INTEGER-parameter functions). */
|
||||
|
||||
ret = ompi_attr_create_keyval_aint(WIN_ATTR, copy_fn, del_fn,
|
||||
win_keyval, *extra_state, OMPI_KEYVAL_F77,
|
||||
OMPI_SINGLE_NAME_CONVERT(win_keyval), *extra_state, OMPI_KEYVAL_F77,
|
||||
NULL);
|
||||
|
||||
if (MPI_SUCCESS != ret) {
|
||||
@ -94,5 +95,6 @@ void ompi_win_create_keyval_f(ompi_mpi2_fortran_copy_attr_function* win_copy_att
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
} else {
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
|
||||
OMPI_SINGLE_INT_2_FINT(win_keyval);
|
||||
}
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user