From 083938cc10c409293c4a1f7f81cc5b0a30fae836 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Wed, 8 Aug 2012 13:17:57 +0000 Subject: [PATCH] It is now almost impossible to add a new function to the MPI interface without messing the Fortran part. This commit was SVN r26967. --- ompi/mpi/fortran/base/mpi-f08-interfaces.F90 | 18 +++++ ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 | 18 +++++ ompi/mpi/fortran/mpif-h/Makefile.am | 4 +- ompi/mpi/fortran/mpif-h/profile/Makefile.am | 4 +- ompi/mpi/fortran/mpif-h/profile/defines.h | 4 +- ompi/mpi/fortran/mpif-h/prototypes_mpi.h | 4 +- .../mpif-h/type_create_hindexed_block_f.c | 79 +++++++++++++++++++ ompi/mpi/fortran/use-mpi-f08/Makefile.am | 6 ++ .../use-mpi-f08/mpi-f-interfaces-bind.h | 15 ++++ .../use-mpi-f08/pmpi-f-interfaces-bind.h | 15 ++++ .../ptype_create_hindexed_block_f08.F90 | 25 ++++++ .../type_create_hindexed_block_f08.F90 | 25 ++++++ .../mpi-ignore-tkr-interfaces.h.in | 19 +++++ .../scripts/mpi-f90-interfaces.h.sh | 33 ++++++++ 14 files changed, 265 insertions(+), 4 deletions(-) create mode 100644 ompi/mpi/fortran/mpif-h/type_create_hindexed_block_f.c create mode 100644 ompi/mpi/fortran/use-mpi-f08/profile/ptype_create_hindexed_block_f08.F90 create mode 100644 ompi/mpi/fortran/use-mpi-f08/type_create_hindexed_block_f08.F90 diff --git a/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 b/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 index 24f8da00ea..493dd6619b 100644 --- a/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 @@ -3,6 +3,10 @@ ! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. +! Copyright (c) 2012 The University of Tennessee and The University +! of Tennessee Research Foundation. All rights +! reserved. +! Copyright (c) 2012 Inria. All rights reserved. ! $COPYRIGHT$ ! ! This file provides the interface specifications for the MPI Fortran @@ -723,6 +727,20 @@ subroutine MPI_Type_create_indexed_block_f08(count,blocklength, & end subroutine MPI_Type_create_indexed_block_f08 end interface MPI_Type_create_indexed_block +interface MPI_Type_create_hindexed_block +subroutine MPI_Type_create_hindexed_block_f08(count,blocklength, & + array_of_displacements,oldtype,newtype,ierror & + ) OMPI_F08_INTERFACE_BIND_C("MPI_Type_create_hindexed_block_f08") + use :: mpi_f08_types, only : MPI_Datatype + implicit none + INTEGER, INTENT(IN) :: count, blocklength + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: array_of_displacements(count) + TYPE(MPI_Datatype), INTENT(IN) :: oldtype + TYPE(MPI_Datatype), INTENT(OUT) :: newtype + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Type_create_hindexed_block_f08 +end interface MPI_Type_create_hindexed_block + interface MPI_Type_create_resized subroutine MPI_Type_create_resized_f08(oldtype,lb,extent,newtype,ierror & ) OMPI_F08_INTERFACE_BIND_C("MPI_Type_create_resized_f08") diff --git a/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 b/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 index 9b86e76ff1..e6cb4d23d6 100644 --- a/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 @@ -3,6 +3,10 @@ ! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. +! Copyright (c) 2012 The University of Tennessee and The University +! of Tennessee Research Foundation. All rights +! reserved. +! Copyright (c) 2012 Inria. All rights reserved. ! $COPYRIGHT$ ! ! This file provides the interface specifications for the MPI Fortran @@ -723,6 +727,20 @@ subroutine PMPI_Type_create_indexed_block_f08(count,blocklength, & end subroutine PMPI_Type_create_indexed_block_f08 end interface PMPI_Type_create_indexed_block +interface PMPI_Type_create_hindexed_block +subroutine PMPI_Type_create_hindexed_block_f08(count,blocklength, & + array_of_displacements,oldtype,newtype,ierror & + ) OMPI_F08_INTERFACE_BIND_C("PMPI_Type_create_hindexed_block_f08") + use :: mpi_f08_types, only : MPI_Datatype + implicit none + INTEGER, INTENT(IN) :: count, blocklength + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: array_of_displacements(count) + TYPE(MPI_Datatype), INTENT(IN) :: oldtype + TYPE(MPI_Datatype), INTENT(OUT) :: newtype + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Type_create_hindexed_block_f08 +end interface PMPI_Type_create_hindexed_block + interface PMPI_Type_create_resized subroutine PMPI_Type_create_resized_f08(oldtype,lb,extent,newtype,ierror & ) OMPI_F08_INTERFACE_BIND_C("PMPI_Type_create_resized_f08") diff --git a/ompi/mpi/fortran/mpif-h/Makefile.am b/ompi/mpi/fortran/mpif-h/Makefile.am index d28d81db2a..21e0b4738d 100644 --- a/ompi/mpi/fortran/mpif-h/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/Makefile.am @@ -2,7 +2,7 @@ # Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana # University Research and Technology # Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University +# Copyright (c) 2004-2012 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. # Copyright (c) 2004-2009 High Performance Computing Center Stuttgart, @@ -10,6 +10,7 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012 Inria. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -269,6 +270,7 @@ libmpi_mpifh_la_SOURCES += \ type_create_hindexed_f.c \ type_create_hvector_f.c \ type_create_indexed_block_f.c \ + type_create_hindexed_block_f.c \ type_create_keyval_f.c \ type_create_resized_f.c \ type_create_struct_f.c \ diff --git a/ompi/mpi/fortran/mpif-h/profile/Makefile.am b/ompi/mpi/fortran/mpif-h/profile/Makefile.am index 21387b0343..ba89fd4413 100644 --- a/ompi/mpi/fortran/mpif-h/profile/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/profile/Makefile.am @@ -3,7 +3,7 @@ # Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana # University Research and Technology # Corporation. All rights reserved. -# Copyright (c) 2004-2005 The University of Tennessee and The University +# Copyright (c) 2004-2012 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. # Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -11,6 +11,7 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012 Inria. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -238,6 +239,7 @@ nodist_libmpi_mpifh_pmpi_la_SOURCES = \ ptype_create_hindexed_f.c \ ptype_create_hvector_f.c \ ptype_create_indexed_block_f.c \ + ptype_create_hindexed_block_f.c \ ptype_create_keyval_f.c \ ptype_create_resized_f.c \ ptype_create_struct_f.c \ diff --git a/ompi/mpi/fortran/mpif-h/profile/defines.h b/ompi/mpi/fortran/mpif-h/profile/defines.h index 7e94ebcea9..e4ef078b89 100644 --- a/ompi/mpi/fortran/mpif-h/profile/defines.h +++ b/ompi/mpi/fortran/mpif-h/profile/defines.h @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University + * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -10,6 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2012 Inria. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -275,6 +276,7 @@ #define ompi_type_create_hvector_f pompi_type_create_hvector_f #define ompi_type_create_keyval_f pompi_type_create_keyval_f #define ompi_type_create_indexed_block_f pompi_type_create_indexed_block_f +#define ompi_type_create_hindexed_block_f pompi_type_create_hindexed_block_f #define ompi_type_create_struct_f pompi_type_create_struct_f #define ompi_type_create_subarray_f pompi_type_create_subarray_f #define ompi_type_create_resized_f pompi_type_create_resized_f diff --git a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h index b4a14fb6a3..35972e15c6 100644 --- a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h +++ b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h @@ -2,7 +2,7 @@ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University + * Copyright (c) 2004-2012 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, @@ -10,6 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2012 Inria. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -330,6 +331,7 @@ PN2(void, MPI_Type_create_hindexed, mpi_type_create_hindexed, MPI_TYPE_CREATE_HI PN2(void, MPI_Type_create_hvector, mpi_type_create_hvector, MPI_TYPE_CREATE_HVECTOR, (MPI_Fint *count, MPI_Fint *blocklength, MPI_Aint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr)); PN2(void, MPI_Type_create_keyval, mpi_type_create_keyval, MPI_TYPE_CREATE_KEYVAL, (ompi_mpi2_fortran_copy_attr_function* type_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* type_delete_attr_fn, MPI_Fint *type_keyval, MPI_Aint *extra_state, MPI_Fint *ierr)); PN2(void, MPI_Type_create_indexed_block, mpi_type_create_indexed_block, MPI_TYPE_CREATE_INDEXED_BLOCK, (MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr)); +PN2(void, MPI_Type_create_hindexed_block, mpi_type_create_hindexed_block, MPI_TYPE_CREATE_HINDEXED_BLOCK, (MPI_Fint *count, MPI_Fint *blocklength, MPI_Aint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr)); PN2(void, MPI_Type_create_struct, mpi_type_create_struct, MPI_TYPE_CREATE_STRUCT, (MPI_Fint *count, MPI_Fint *array_of_block_lengths, MPI_Aint *array_of_displacements, MPI_Fint *array_of_types, MPI_Fint *newtype, MPI_Fint *ierr)); PN2(void, MPI_Type_create_subarray, mpi_type_create_subarray, MPI_TYPE_CREATE_SUBARRAY, (MPI_Fint *ndims, MPI_Fint *size_array, MPI_Fint *subsize_array, MPI_Fint *start_array, MPI_Fint *order, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr)); PN2(void, MPI_Type_create_resized, mpi_type_create_resized, MPI_TYPE_CREATE_RESIZED, (MPI_Fint *oldtype, MPI_Aint *lb, MPI_Aint *extent, MPI_Fint *newtype, MPI_Fint *ierr)); diff --git a/ompi/mpi/fortran/mpif-h/type_create_hindexed_block_f.c b/ompi/mpi/fortran/mpif-h/type_create_hindexed_block_f.c new file mode 100644 index 0000000000..8bacef24b3 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/type_create_hindexed_block_f.c @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2012 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2012 Inria. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_TYPE_CREATE_HINDEXED_BLOCK = ompi_type_create_hindexed_block_f +#pragma weak pmpi_type_create_hindexed_block = ompi_type_create_hindexed_block_f +#pragma weak pmpi_type_create_hindexed_block_ = ompi_type_create_hindexed_block_f +#pragma weak pmpi_type_create_hindexed_block__ = ompi_type_create_hindexed_block_f + +#pragma weak PMPI_Type_create_hindexed_block_f = ompi_type_create_hindexed_block_f +#pragma weak PMPI_Type_create_hindexed_block_f08 = ompi_type_create_hindexed_block_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_TYPE_CREATE_HINDEXED_BLOCK, + pmpi_type_create_hindexed_block, + pmpi_type_create_hindexed_block_, + pmpi_type_create_hindexed_block__, + pompi_type_create_hindexed_block_f, + (MPI_Fint *count, MPI_Fint *blocklength, MPI_Aint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr), + (count, blocklength, array_of_displacements, oldtype, newtype, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_TYPE_CREATE_HINDEXED_BLOCK = ompi_type_create_hindexed_block_f +#pragma weak mpi_type_create_hindexed_block = ompi_type_create_hindexed_block_f +#pragma weak mpi_type_create_hindexed_block_ = ompi_type_create_hindexed_block_f +#pragma weak mpi_type_create_hindexed_block__ = ompi_type_create_hindexed_block_f + +#pragma weak MPI_Type_create_hindexed_block_f = ompi_type_create_hindexed_block_f +#pragma weak MPI_Type_create_hindexed_block_f08 = ompi_type_create_hindexed_block_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_CREATE_HINDEXED_BLOCK, + mpi_type_create_hindexed_block, + mpi_type_create_hindexed_block_, + mpi_type_create_hindexed_block__, + ompi_type_create_hindexed_block_f, + (MPI_Fint *count, MPI_Fint *blocklength, MPI_Aint *array_of_displacements, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr), + (count, blocklength, array_of_displacements, oldtype, newtype, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_type_create_hindexed_block_f(MPI_Fint *count, MPI_Fint *blocklength, + MPI_Aint *array_of_displacements, + MPI_Fint *oldtype, MPI_Fint *newtype, + MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_old = MPI_Type_f2c(*oldtype); + MPI_Datatype c_new; + + c_ierr = MPI_Type_create_hindexed_block(OMPI_FINT_2_INT(*count), + OMPI_FINT_2_INT(*blocklength), + array_of_displacements, + c_old, &c_new); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS == c_ierr) { + *newtype = MPI_Type_c2f(c_new); + } +} + diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index a87a4c40fa..3eaf5edc00 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -1,6 +1,10 @@ # -*- makefile -*- # # Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012 The University of Tennessee and The University +# of Tennessee Research Foundation. All rights +# reserved. +# Copyright (c) 2012 Inria. All rights reserved. # # $COPYRIGHT$ # @@ -217,6 +221,7 @@ mpi_api_files = \ type_create_hindexed_f08.F90 \ type_create_hvector_f08.F90 \ type_create_indexed_block_f08.F90 \ + type_create_hindexed_block_f08.F90 \ type_create_keyval_f08.F90 \ type_create_resized_f08.F90 \ type_create_struct_f08.F90 \ @@ -526,6 +531,7 @@ pmpi_api_files = \ profile/ptype_create_hindexed_f08.F90 \ profile/ptype_create_hvector_f08.F90 \ profile/ptype_create_indexed_block_f08.F90 \ + profile/ptype_create_hindexed_block_f08.F90 \ profile/ptype_create_keyval_f08.F90 \ profile/ptype_create_resized_f08.F90 \ profile/ptype_create_struct_f08.F90 \ diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h index 60952bb77c..45582c9f5c 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h @@ -3,6 +3,10 @@ ! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. +! Copyright (c) 2012 The University of Tennessee and The University +! of Tennessee Research Foundation. All rights +! reserved. +! Copyright (c) 2012 Inria. All rights reserved. ! $COPYRIGHT$ ! ! This file provides the interface specifications for the MPI Fortran @@ -521,6 +525,17 @@ subroutine ompi_type_create_indexed_block_f(count,blocklength, & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_type_create_indexed_block_f +subroutine ompi_type_create_hindexed_block_f(count,blocklength, & + array_of_displacements,oldtype,newtype,ierror) & + BIND(C, name="ompi_type_create_hindexed_block_f") + implicit none + INTEGER, INTENT(IN) :: count, blocklength + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: array_of_displacements(count) + INTEGER, INTENT(IN) :: oldtype + INTEGER, INTENT(OUT) :: newtype + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_type_create_hindexed_block_f + subroutine ompi_type_create_resized_f(oldtype,lb,extent,newtype,ierror) & BIND(C, name="ompi_type_create_resized_f") use :: mpi_f08_types, only : MPI_ADDRESS_KIND diff --git a/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h index 97da73daed..e66d878ece 100644 --- a/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h @@ -3,6 +3,10 @@ ! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2009-2012 Los Alamos National Security, LLC. ! All rights reserved. +! Copyright (c) 2012 The University of Tennessee and The University +! of Tennessee Research Foundation. All rights +! reserved. +! Copyright (c) 2012 Inria. All rights reserved. ! $COPYRIGHT$ ! ! This file provides the interface specifications for the MPI Fortran @@ -521,6 +525,17 @@ subroutine pompi_type_create_indexed_block_f(count,blocklength, & INTEGER, INTENT(OUT) :: ierror end subroutine pompi_type_create_indexed_block_f +subroutine pompi_type_create_hindexed_block_f(count,blocklength, & + array_of_displacements,oldtype,newtype,ierror) & + BIND(C, name="pompi_type_create_hindexed_block_f") + implicit none + INTEGER, INTENT(IN) :: count, blocklength + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: array_of_displacements(count) + INTEGER, INTENT(IN) :: oldtype + INTEGER, INTENT(OUT) :: newtype + INTEGER, INTENT(OUT) :: ierror +end subroutine pompi_type_create_hindexed_block_f + subroutine pompi_type_create_resized_f(oldtype,lb,extent,newtype,ierror) & BIND(C, name="pompi_type_create_resized_f") use :: mpi_f08_types, only : MPI_ADDRESS_KIND diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/ptype_create_hindexed_block_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/ptype_create_hindexed_block_f08.F90 new file mode 100644 index 0000000000..863cac1507 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/ptype_create_hindexed_block_f08.F90 @@ -0,0 +1,25 @@ +! -*- f90 -*- +! +! Copyright (c) 2012 The University of Tennessee and The University +! of Tennessee Research Foundation. All rights +! reserved. +! Copyright (c) 2012 Inria. All rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Type_create_hindexed_block_f08(count,blocklength, & + array_of_displacements,oldtype,newtype,ierror) + use :: mpi_f08_types, only : MPI_Datatype + use :: mpi_f08, only : ompi_type_create_hindexed_block_f + implicit none + INTEGER, INTENT(IN) :: count, blocklength + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: array_of_displacements(count) + TYPE(MPI_Datatype), INTENT(IN) :: oldtype + TYPE(MPI_Datatype), INTENT(OUT) :: newtype + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_type_create_hindexed_block_f(count,blocklength,array_of_displacements, & + oldtype%MPI_VAL,newtype%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Type_create_hindexed_block_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/type_create_hindexed_block_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/type_create_hindexed_block_f08.F90 new file mode 100644 index 0000000000..d23180e633 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/type_create_hindexed_block_f08.F90 @@ -0,0 +1,25 @@ +! -*- f90 -*- +! +! Copyright (c) 2012 The University of Tennessee and The University +! of Tennessee Research Foundation. All rights +! reserved. +! Copyright (c) 2012 Inria. All rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Type_create_hindexed_block_f08(count,blocklength, & + array_of_displacements,oldtype,newtype,ierror) + use :: mpi_f08_types, only : MPI_Datatype + use :: mpi_f08, only : ompi_type_create_hindexed_block_f + implicit none + INTEGER, INTENT(IN) :: count, blocklength + INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: array_of_displacements(count) + TYPE(MPI_Datatype), INTENT(IN) :: oldtype + TYPE(MPI_Datatype), INTENT(OUT) :: newtype + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_type_create_hindexed_block_f(count,blocklength,array_of_displacements, & + oldtype%MPI_VAL,newtype%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Type_create_hindexed_block_f08 diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in index 8106dd6e51..1df60a0a62 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h.in @@ -3,6 +3,10 @@ ! Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. ! Copyright (c) 2007 Los Alamos National Security, LLC. All rights ! reserved. +! Copyright (c) 2012 The University of Tennessee and The University +! of Tennessee Research Foundation. All rights +! reserved. +! Copyright (c) 2012 Inria. All rights reserved. ! $COPYRIGHT$ ! ! Additional copyrights may follow @@ -3222,6 +3226,21 @@ end subroutine MPI_Type_create_indexed_block end interface +interface MPI_Type_create_hindexed_block + +subroutine MPI_Type_create_hindexed_block(count, blocklength, array_of_displacements, oldtype, newtype& + , ierr) + integer, intent(in) :: count + integer, intent(in) :: blocklength + integer(kind=MPI_ADDRESS_KIND), dimension(*), intent(in) :: array_of_displacements + integer, intent(in) :: oldtype + integer, intent(out) :: newtype + integer, intent(out) :: ierr +end subroutine MPI_Type_create_hindexed_block + +end interface + + interface MPI_Type_create_keyval subroutine MPI_Type_create_keyval(type_copy_attr_fn, type_delete_attr_fn, type_keyval, extra_state, ierr) diff --git a/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi-f90-interfaces.h.sh b/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi-f90-interfaces.h.sh index d71dbee160..6557a7628e 100755 --- a/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi-f90-interfaces.h.sh +++ b/ompi/mpi/fortran/use-mpi-tkr/scripts/mpi-f90-interfaces.h.sh @@ -3,10 +3,14 @@ # Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana # University Research and Technology # Corporation. All rights reserved. +# Copyright (c) 2012 The University of Tennessee and The University +# of Tennessee Research Foundation. All rights +# reserved. # Copyright (c) 2004-2006 The Regents of the University of California. # All rights reserved. # Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2012 FUJITSU LIMITED. All rights reserved. +# Copyright (c) 2012 Inria. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -10797,3 +10801,32 @@ start MPI_Comm_split_type small output_290 MPI_Comm_split_type end MPI_Comm_split_type +#------------------------------------------------------------------------ + +output_291() { + if test "$output" = "0"; then + return 0 + fi + + procedure=$1 + cat <