diff --git a/config/ompi_setup_mpi_fortran.m4 b/config/ompi_setup_mpi_fortran.m4 index ac808f7a8e..2f7549830e 100644 --- a/config/ompi_setup_mpi_fortran.m4 +++ b/config/ompi_setup_mpi_fortran.m4 @@ -275,6 +275,11 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[ OMPI_MPI_OFFSET_KIND=$OMPI_FORTRAN_C_INT64_T_KIND AC_SUBST(OMPI_MPI_OFFSET_KIND) + # Get the kind value for Fortran MPI_COUNT_KIND (corresponding to + # INTEGER*8) + OMPI_MPI_COUNT_KIND=$OMPI_FORTRAN_C_INT64_T_KIND + AC_SUBST(OMPI_MPI_COUNT_KIND) + #-------------------------------------------------------- # This is all we need for the Fortran mpif.h MPI bindings #-------------------------------------------------------- diff --git a/ompi/include/mpif-config.h.in b/ompi/include/mpif-config.h.in index e512b4d35d..59b2b002dd 100644 --- a/ompi/include/mpif-config.h.in +++ b/ompi/include/mpif-config.h.in @@ -11,6 +11,8 @@ ! 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) 2013 Los Alamos National Security, LLC. All rights +! reserved. ! $COPYRIGHT$ ! ! Additional copyrights may follow @@ -37,9 +39,11 @@ ! Kind parameters ! integer MPI_OFFSET_KIND, MPI_ADDRESS_KIND, MPI_INTEGER_KIND + integer MPI_COUNT_KIND parameter (MPI_INTEGER_KIND=@OMPI_MPI_INTEGER_KIND@) parameter (MPI_ADDRESS_KIND=@OMPI_MPI_ADDRESS_KIND@) parameter (MPI_OFFSET_KIND=@OMPI_MPI_OFFSET_KIND@) + parameter (MPI_COUNT_KIND=@OMPI_MPI_COUNT_KIND@) ! ! Miscellaneous constants ! diff --git a/ompi/include/mpif-values.pl b/ompi/include/mpif-values.pl index 2c99def8f2..ee995b3ff8 100755 --- a/ompi/include/mpif-values.pl +++ b/ompi/include/mpif-values.pl @@ -182,6 +182,7 @@ $handles->{MPI_INT64_T} = 64; $handles->{MPI_UINT64_T} = 65; $handles->{MPI_AINT} = 66; $handles->{MPI_OFFSET} = 67; +$handles->{MPI_COUNT} = 68; $handles->{MPI_MESSAGE_NO_PROC} = 1; diff --git a/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 b/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 index 7e14298fea..bbbbac274c 100644 --- a/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/base/mpi-f08-interfaces.F90 @@ -582,6 +582,18 @@ subroutine MPI_Get_elements_f08(status,datatype,count,ierror & end subroutine MPI_Get_elements_f08 end interface MPI_Get_elements +interface MPI_Get_elements_x +subroutine MPI_Get_elements_x_f08(status,datatype,count,ierror & + ) OMPI_F08_INTERFACE_BIND_C("MPI_Get_elements_x_f08") + use :: mpi_f08_types, only : MPI_Status, MPI_Datatype + implicit none + TYPE(MPI_Status), INTENT(IN) :: status + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: count + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Get_elements_x_f08 +end interface MPI_Get_elements_x + interface MPI_Pack subroutine MPI_Pack_f08(inbuf,incount,datatype,outbuf,outsize,position,comm,ierror & ) OMPI_F08_INTERFACE_BIND_C("MPI_Pack_f08") @@ -843,6 +855,17 @@ subroutine MPI_Type_get_extent_f08(datatype,lb,extent,ierror & end subroutine MPI_Type_get_extent_f08 end interface MPI_Type_get_extent +interface MPI_Type_get_extent_x +subroutine MPI_Type_get_extent_x_f08(datatype,lb,extent,ierror & + ) OMPI_F08_INTERFACE_BIND_C("MPI_Type_get_extent_x_f08") + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: lb, extent + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Type_get_extent_x_f08 +end interface MPI_Type_get_extent_x + interface MPI_Type_get_true_extent subroutine MPI_Type_get_true_extent_f08(datatype,true_lb,true_extent,ierror & ) OMPI_F08_INTERFACE_BIND_C("MPI_Type_get_true_extent_f08") @@ -854,6 +877,17 @@ subroutine MPI_Type_get_true_extent_f08(datatype,true_lb,true_extent,ierror & end subroutine MPI_Type_get_true_extent_f08 end interface MPI_Type_get_true_extent +interface MPI_Type_get_true_extent_x +subroutine MPI_Type_get_true_extent_x_f08(datatype,true_lb,true_extent,ierror & + ) OMPI_F08_INTERFACE_BIND_C("MPI_Type_get_true_extent_x_f08") + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: true_lb, true_extent + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Type_get_true_extent_x_f08 +end interface MPI_Type_get_true_extent_x + interface MPI_Type_indexed subroutine MPI_Type_indexed_f08(count,array_of_blocklengths, & array_of_displacements,oldtype,newtype,ierror & @@ -879,6 +913,17 @@ subroutine MPI_Type_size_f08(datatype,size,ierror & end subroutine MPI_Type_size_f08 end interface MPI_Type_size +interface MPI_Type_size_x +subroutine MPI_Type_size_x_f08(datatype,size,ierror & + ) OMPI_F08_INTERFACE_BIND_C("MPI_Type_size_x_f08") + use :: mpi_f08_types, only : MPI_Datatype + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: size + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Type_size_x_f08 +end interface MPI_Type_size_x + interface MPI_Type_vector subroutine MPI_Type_vector_f08(count,blocklength,stride,oldtype,newtype,ierror & ) OMPI_F08_INTERFACE_BIND_C("MPI_Type_vector_f08") @@ -3234,6 +3279,18 @@ subroutine MPI_Status_set_elements_f08(status,datatype,count,ierror & end subroutine MPI_Status_set_elements_f08 end interface MPI_Status_set_elements +interface MPI_Status_set_elements_x +subroutine MPI_Status_set_elements_x_f08(status,datatype,count,ierror & + ) OMPI_F08_INTERFACE_BIND_C("MPI_Status_set_elements_x_f08") + use :: mpi_f08_types, only : MPI_Status, MPI_Datatype + implicit none + TYPE(MPI_Status), INTENT(INOUT) :: status + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(IN) :: count + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_Status_set_elements_x_f08 +end interface MPI_Status_set_elements_x + #if OMPI_PROVIDE_MPI_FILE_INTERFACE interface MPI_File_close diff --git a/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 b/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 index 73e69d5ef7..f3ea027dc1 100644 --- a/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/base/pmpi-f08-interfaces.F90 @@ -582,6 +582,18 @@ subroutine PMPI_Get_elements_f08(status,datatype,count,ierror & end subroutine PMPI_Get_elements_f08 end interface PMPI_Get_elements +interface PMPI_Get_elements_x +subroutine PMPI_Get_elements_x_f08(status,datatype,count,ierror & + ) OMPI_F08_INTERFACE_BIND_C("PMPI_Get_elements_x_f08") + use :: mpi_f08_types, only : MPI_Status, MPI_Datatype + implicit none + TYPE(MPI_Status), INTENT(IN) :: status + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: count + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Get_elements_x_f08 +end interface PMPI_Get_elements_x + interface PMPI_Pack subroutine PMPI_Pack_f08(inbuf,incount,datatype,outbuf,outsize,position,comm,ierror & ) OMPI_F08_INTERFACE_BIND_C("PMPI_Pack_f08") @@ -843,6 +855,17 @@ subroutine PMPI_Type_get_extent_f08(datatype,lb,extent,ierror & end subroutine PMPI_Type_get_extent_f08 end interface PMPI_Type_get_extent +interface PMPI_Type_get_extent_x +subroutine PMPI_Type_get_extent_x_f08(datatype,lb,extent,ierror & + ) OMPI_F08_INTERFACE_BIND_C("PMPI_Type_get_extent_x_f08") + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: lb, extent + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Type_get_extent_x_f08 +end interface PMPI_Type_get_extent_x + interface PMPI_Type_get_true_extent subroutine PMPI_Type_get_true_extent_f08(datatype,true_lb,true_extent,ierror & ) OMPI_F08_INTERFACE_BIND_C("PMPI_Type_get_true_extent_f08") @@ -854,6 +877,17 @@ subroutine PMPI_Type_get_true_extent_f08(datatype,true_lb,true_extent,ierror & end subroutine PMPI_Type_get_true_extent_f08 end interface PMPI_Type_get_true_extent +interface PMPI_Type_get_true_extent_x +subroutine PMPI_Type_get_true_extent_x_f08(datatype,true_lb,true_extent,ierror & + ) OMPI_F08_INTERFACE_BIND_C("PMPI_Type_get_true_extent_x_f08") + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: true_lb, true_extent + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Type_get_true_extent_x_f08 +end interface PMPI_Type_get_true_extent_x + interface PMPI_Type_indexed subroutine PMPI_Type_indexed_f08(count,array_of_blocklengths, & array_of_displacements,oldtype,newtype,ierror & @@ -879,6 +913,17 @@ subroutine PMPI_Type_size_f08(datatype,size,ierror & end subroutine PMPI_Type_size_f08 end interface PMPI_Type_size +interface PMPI_Type_size_x +subroutine PMPI_Type_size_x_f08(datatype,size,ierror & + ) OMPI_F08_INTERFACE_BIND_C("PMPI_Type_size_x_f08") + use :: mpi_f08_types, only : MPI_Datatype + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: size + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Type_size_x_f08 +end interface PMPI_Type_size_x + interface PMPI_Type_vector subroutine PMPI_Type_vector_f08(count,blocklength,stride,oldtype,newtype,ierror & ) OMPI_F08_INTERFACE_BIND_C("PMPI_Type_vector_f08") @@ -3234,6 +3279,18 @@ subroutine PMPI_Status_set_elements_f08(status,datatype,count,ierror & end subroutine PMPI_Status_set_elements_f08 end interface PMPI_Status_set_elements +interface PMPI_Status_set_elements_x +subroutine PMPI_Status_set_elements_x_f08(status,datatype,count,ierror & + ) OMPI_F08_INTERFACE_BIND_C("PMPI_Status_set_elements_x_f08") + use :: mpi_f08_types, only : MPI_Status, MPI_Datatype + implicit none + TYPE(MPI_Status), INTENT(INOUT) :: status + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(IN) :: count + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_Status_set_elements_x_f08 +end interface PMPI_Status_set_elements_x + #if OMPI_PROVIDE_MPI_FILE_INTERFACE interface PMPI_File_close diff --git a/ompi/mpi/fortran/mpif-h/Makefile.am b/ompi/mpi/fortran/mpif-h/Makefile.am index e2e03d3255..d78c4ad04c 100644 --- a/ompi/mpi/fortran/mpif-h/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/Makefile.am @@ -157,6 +157,7 @@ libmpi_mpifh_la_SOURCES += \ get_address_f.c \ get_count_f.c \ get_elements_f.c \ + get_elements_x_f.c \ get_library_version_f.c \ get_processor_name_f.c \ get_version_f.c \ @@ -260,6 +261,7 @@ libmpi_mpifh_la_SOURCES += \ start_f.c \ status_set_cancelled_f.c \ status_set_elements_f.c \ + status_set_elements_x_f.c \ testall_f.c \ testany_f.c \ test_cancelled_f.c \ @@ -289,8 +291,10 @@ libmpi_mpifh_la_SOURCES += \ type_get_contents_f.c \ type_get_envelope_f.c \ type_get_extent_f.c \ + type_get_extent_x_f.c \ type_get_name_f.c \ type_get_true_extent_f.c \ + type_get_true_extent_x_f.c \ type_hindexed_f.c \ type_hvector_f.c \ type_indexed_f.c \ @@ -299,6 +303,7 @@ libmpi_mpifh_la_SOURCES += \ type_set_attr_f.c \ type_set_name_f.c \ type_size_f.c \ + type_size_x_f.c \ type_struct_f.c \ type_ub_f.c \ type_vector_f.c \ diff --git a/ompi/mpi/fortran/mpif-h/get_elements_x_f.c b/ompi/mpi/fortran/mpif-h/get_elements_x_f.c new file mode 100644 index 0000000000..a97c47330c --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/get_elements_x_f.c @@ -0,0 +1,88 @@ +/* + * 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 + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_GET_ELEMENTS_X = ompi_get_elements_x_f +#pragma weak pmpi_get_elements_x = ompi_get_elements_x_f +#pragma weak pmpi_get_elements_x_ = ompi_get_elements_x_f +#pragma weak pmpi_get_elements_x__ = ompi_get_elements_x_f + +#pragma weak PMPI_get_elements_x_f = ompi_get_elements_x_f +#pragma weak PMPI_get_elements_x_f08 = ompi_get_elements_x_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_GET_ELEMENTS_X, + pmpi_get_elements_x, + pmpi_get_elements_x_, + pmpi_get_elements_x__, + pompi_get_elements_x_f, + (MPI_Fint *status, MPI_Fint *datatype, MPI_Count *count, MPI_Fint *ierr), + (status, datatype, count, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_GET_ELEMENTS_X = ompi_get_elements_x_f +#pragma weak mpi_get_elements_x = ompi_get_elements_x_f +#pragma weak mpi_get_elements_x_ = ompi_get_elements_x_f +#pragma weak mpi_get_elements_x__ = ompi_get_elements_x_f + +#pragma weak MPI_get_elements_x_f = ompi_get_elements_x_f +#pragma weak MPI_get_elements_x_f08 = ompi_get_elements_x_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_GET_ELEMENTS_X, + mpi_get_elements_x, + mpi_get_elements_x_, + mpi_get_elements_x__, + ompi_get_elements_x_f, + (MPI_Fint *status, MPI_Fint *datatype, MPI_Count *count, MPI_Fint *ierr), + (status, datatype, count, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_get_elements_x_f(MPI_Fint *status, MPI_Fint *datatype, MPI_Count *count, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Status c_status; + OMPI_SINGLE_NAME_DECL(count); + + if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) { + *count = OMPI_INT_2_FINT(0); + c_ierr = MPI_SUCCESS; + } else { + c_ierr = MPI_Status_f2c(status, &c_status); + + if (MPI_SUCCESS == c_ierr) { + c_ierr = MPI_Get_elements_x(&c_status, c_type, count); + } + } + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/profile/Makefile.am b/ompi/mpi/fortran/mpif-h/profile/Makefile.am index 5f5a608f62..f3373373c6 100644 --- a/ompi/mpi/fortran/mpif-h/profile/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/profile/Makefile.am @@ -127,6 +127,7 @@ nodist_libmpi_mpifh_pmpi_la_SOURCES = \ pget_address_f.c \ pget_count_f.c \ pget_elements_f.c \ + pget_elements_x_f.c \ pget_library_version_f.c \ pget_processor_name_f.c \ pget_version_f.c \ @@ -230,6 +231,7 @@ nodist_libmpi_mpifh_pmpi_la_SOURCES = \ pstart_f.c \ pstatus_set_cancelled_f.c \ pstatus_set_elements_f.c \ + pstatus_set_elements_x_f.c \ ptestall_f.c \ ptestany_f.c \ ptest_cancelled_f.c \ @@ -259,8 +261,10 @@ nodist_libmpi_mpifh_pmpi_la_SOURCES = \ ptype_get_contents_f.c \ ptype_get_envelope_f.c \ ptype_get_extent_f.c \ + ptype_get_extent_x_f.c \ ptype_get_name_f.c \ ptype_get_true_extent_f.c \ + ptype_get_true_extent_x_f.c \ ptype_hindexed_f.c \ ptype_hvector_f.c \ ptype_indexed_f.c \ @@ -269,6 +273,7 @@ nodist_libmpi_mpifh_pmpi_la_SOURCES = \ ptype_set_attr_f.c \ ptype_set_name_f.c \ ptype_size_f.c \ + ptype_size_x_f.c \ ptype_struct_f.c \ ptype_ub_f.c \ ptype_vector_f.c \ diff --git a/ompi/mpi/fortran/mpif-h/profile/defines.h b/ompi/mpi/fortran/mpif-h/profile/defines.h index 98509e0e82..d483344401 100644 --- a/ompi/mpi/fortran/mpif-h/profile/defines.h +++ b/ompi/mpi/fortran/mpif-h/profile/defines.h @@ -159,6 +159,7 @@ #define ompi_get_address_f pompi_get_address_f #define ompi_get_count_f pompi_get_count_f #define ompi_get_elements_f pompi_get_elements_f +#define ompi_get_elements_x_f pompi_get_elements_x_f #define ompi_get_f pompi_get_f #define ompi_get_library_version_f pompi_get_library_version_f #define ompi_get_processor_name_f pompi_get_processor_name_f @@ -266,6 +267,7 @@ #define ompi_startall_f pompi_startall_f #define ompi_status_set_cancelled_f pompi_status_set_cancelled_f #define ompi_status_set_elements_f pompi_status_set_elements_f +#define ompi_status_set_elements_x_f pompi_status_set_elements_x_f #define ompi_testall_f pompi_testall_f #define ompi_testany_f pompi_testany_f #define ompi_test_f pompi_test_f @@ -295,8 +297,10 @@ #define ompi_type_get_contents_f pompi_type_get_contents_f #define ompi_type_get_envelope_f pompi_type_get_envelope_f #define ompi_type_get_extent_f pompi_type_get_extent_f +#define ompi_type_get_extent_x_f pompi_type_get_extent_x_f #define ompi_type_get_name_f pompi_type_get_name_f #define ompi_type_get_true_extent_f pompi_type_get_true_extent_f +#define ompi_type_get_true_extent_x_f pompi_type_get_true_extent_x_f #define ompi_type_hindexed_f pompi_type_hindexed_f #define ompi_type_hvector_f pompi_type_hvector_f #define ompi_type_indexed_f pompi_type_indexed_f @@ -305,6 +309,7 @@ #define ompi_type_set_attr_f pompi_type_set_attr_f #define ompi_type_set_name_f pompi_type_set_name_f #define ompi_type_size_f pompi_type_size_f +#define ompi_type_size_x_f pompi_type_size_x_f #define ompi_type_struct_f pompi_type_struct_f #define ompi_type_ub_f pompi_type_ub_f #define ompi_type_vector_f pompi_type_vector_f diff --git a/ompi/mpi/fortran/mpif-h/status_set_elements_x_f.c b/ompi/mpi/fortran/mpif-h/status_set_elements_x_f.c new file mode 100644 index 0000000000..af4a1e546e --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/status_set_elements_x_f.c @@ -0,0 +1,93 @@ +/* + * 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 + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_STATUS_SET_ELEMENTS_X = ompi_status_set_elements_x_f +#pragma weak pmpi_status_set_elements_x = ompi_status_set_elements_x_f +#pragma weak pmpi_status_set_elements_x_ = ompi_status_set_elements_x_f +#pragma weak pmpi_status_set_elements_x__ = ompi_status_set_elements_x_f + +#pragma weak PMPI_status_set_elements_x_f = ompi_status_set_elements_x_f +#pragma weak PMPI_status_set_elements_x_f08 = ompi_status_set_elements_x_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_STATUS_SET_ELEMENTS_X, + pmpi_status_set_elements_x, + pmpi_status_set_elements_x_, + pmpi_status_set_elements_x__, + pompi_status_set_elements_x_f, + (MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *count, MPI_Fint *ierr), + (status, datatype, count, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_STATUS_SET_ELEMENTS_X = ompi_status_set_elements_x_f +#pragma weak mpi_status_set_elements_x = ompi_status_set_elements_x_f +#pragma weak mpi_status_set_elements_x_ = ompi_status_set_elements_x_f +#pragma weak mpi_status_set_elements_x__ = ompi_status_set_elements_x_f + +#pragma weak MPI_status_set_elements_x_f = ompi_status_set_elements_x_f +#pragma weak MPI_status_set_elements_x_f08 = ompi_status_set_elements_x_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_STATUS_SET_ELEMENTS_X, + mpi_status_set_elements_x, + mpi_status_set_elements_x_, + mpi_status_set_elements_x__, + ompi_status_set_elements_x_f, + (MPI_Fint *status, MPI_Fint *datatype, MPI_Count *count, MPI_Fint *ierr), + (status, datatype, count, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_status_set_elements_x_f(MPI_Fint *status, MPI_Fint *datatype, + MPI_Fint *count, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Status c_status; + + /* This seems silly, but someone will do it */ + + if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) { + c_ierr = MPI_SUCCESS; + } else { + MPI_Status_f2c( status, &c_status ); + + c_ierr = MPI_Status_set_elements_x(&c_status, c_type, (MPI_Count)*count); + + /* If datatype is really being set, then that needs to be + converted.... */ + if (MPI_SUCCESS == c_ierr) { + MPI_Status_c2f(&c_status, status); + } + } + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/type_get_extent_x_f.c b/ompi/mpi/fortran/mpif-h/type_get_extent_x_f.c new file mode 100644 index 0000000000..750c6fb7a7 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/type_get_extent_x_f.c @@ -0,0 +1,77 @@ +/* + * 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 + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. 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_GET_EXTENT_X = ompi_type_get_extent_x_f +#pragma weak pmpi_type_get_extent_x = ompi_type_get_extent_x_f +#pragma weak pmpi_type_get_extent_x_ = ompi_type_get_extent_x_f +#pragma weak pmpi_type_get_extent_x__ = ompi_type_get_extent_x_f + +#pragma weak PMPI_type_get_extent_x_f = ompi_type_get_extent_x_f +#pragma weak PMPI_type_get_extent_x_f08 = ompi_type_get_extent_x_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_TYPE_GET_EXTENT_X, + pmpi_type_get_extent_x, + pmpi_type_get_extent_x_, + pmpi_type_get_extent_x__, + pompi_type_get_extent_x_f, + (MPI_Fint *type, MPI_Aint *lb, MPI_Aint *extent, MPI_Fint *ierr), + (type, lb, extent, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_TYPE_GET_EXTENT_X = ompi_type_get_extent_x_f +#pragma weak mpi_type_get_extent_x = ompi_type_get_extent_x_f +#pragma weak mpi_type_get_extent_x_ = ompi_type_get_extent_x_f +#pragma weak mpi_type_get_extent_x__ = ompi_type_get_extent_x_f + +#pragma weak MPI_type_get_extent_x_f = ompi_type_get_extent_x_f +#pragma weak MPI_type_get_extent_x_f08 = ompi_type_get_extent_x_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_GET_EXTENT_X, + mpi_type_get_extent_x, + mpi_type_get_extent_x_, + mpi_type_get_extent_x__, + ompi_type_get_extent_x_f, + (MPI_Fint *type, MPI_Count *lb, MPI_Count *extent, MPI_Fint *ierr), + (type, lb, extent, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_type_get_extent_x_f(MPI_Fint *type, MPI_Count *lb, + MPI_Count *extent, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_type = MPI_Type_f2c(*type); + + c_ierr = MPI_Type_get_extent_x(c_type, lb, extent); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/type_get_true_extent_x_f.c b/ompi/mpi/fortran/mpif-h/type_get_true_extent_x_f.c new file mode 100644 index 0000000000..0ba550cd6d --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/type_get_true_extent_x_f.c @@ -0,0 +1,76 @@ +/* + * 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 + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. 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_GET_TRUE_EXTENT_X = ompi_type_get_true_extent_x_f +#pragma weak pmpi_type_get_true_extent_x = ompi_type_get_true_extent_x_f +#pragma weak pmpi_type_get_true_extent_x_ = ompi_type_get_true_extent_x_f +#pragma weak pmpi_type_get_true_extent_x__ = ompi_type_get_true_extent_x_f + +#pragma weak PMPI_type_get_true_extent_x_f = ompi_type_get_true_extent_x_f +#pragma weak PMPI_type_get_true_extent_x_f08 = ompi_type_get_true_extent_x_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_TYPE_GET_TRUE_EXTENT_X, + pmpi_type_get_true_extent_x, + pmpi_type_get_true_extent_x_, + pmpi_type_get_true_extent_x__, + pompi_type_get_true_extent_x_f, + (MPI_Fint *datatype, MPI_Aint *true_lb, MPI_Count *true_extent, MPI_Count *ierr), + (datatype, true_lb, true_extent, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_TYPE_GET_TRUE_EXTENT_X = ompi_type_get_true_extent_x_f +#pragma weak mpi_type_get_true_extent_x = ompi_type_get_true_extent_x_f +#pragma weak mpi_type_get_true_extent_x_ = ompi_type_get_true_extent_x_f +#pragma weak mpi_type_get_true_extent_x__ = ompi_type_get_true_extent_x_f + +#pragma weak MPI_type_get_true_extent_x_f = ompi_type_get_true_extent_x_f +#pragma weak MPI_type_get_true_extent_x_f08 = ompi_type_get_true_extent_x_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_GET_TRUE_EXTENT_X, + mpi_type_get_true_extent_x, + mpi_type_get_true_extent_x_, + mpi_type_get_true_extent_x__, + ompi_type_get_true_extent_x_f, + (MPI_Fint *datatype, MPI_Count *true_lb, MPI_Count *true_extent, MPI_Fint *ierr), + (datatype, true_lb, true_extent, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_type_get_true_extent_x_f(MPI_Fint *datatype, MPI_Count *true_lb, MPI_Count *true_extent, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + + c_ierr = MPI_Type_get_true_extent_x(c_type, true_lb, true_extent); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/mpif-h/type_size_x_f.c b/ompi/mpi/fortran/mpif-h/type_size_x_f.c new file mode 100644 index 0000000000..4f65f1b9d8 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/type_size_x_f.c @@ -0,0 +1,77 @@ +/* + * 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 + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. 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_SIZE_X = ompi_type_size_x_f +#pragma weak pmpi_type_size_x = ompi_type_size_x_f +#pragma weak pmpi_type_size_x_ = ompi_type_size_x_f +#pragma weak pmpi_type_size_x__ = ompi_type_size_x_f + +#pragma weak PMPI_type_size_x_f = ompi_type_size_x_f +#pragma weak PMPI_type_size_x_f08 = ompi_type_size_x_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_TYPE_SIZE_X, + pmpi_type_size_x, + pmpi_type_size_x_, + pmpi_type_size_x__, + pompi_type_size_x_f, + (MPI_Fint *type, MPI_Count *size, MPI_Fint *ierr), + (type, size, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_TYPE_SIZE_X = ompi_type_size_x_f +#pragma weak mpi_type_size_x = ompi_type_size_x_f +#pragma weak mpi_type_size_x_ = ompi_type_size_x_f +#pragma weak mpi_type_size_x__ = ompi_type_size_x_f + +#pragma weak MPI_type_size_x_f = ompi_type_size_x_f +#pragma weak MPI_type_size_x_f08 = ompi_type_size_x_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_TYPE_SIZE_X, + mpi_type_size_x, + mpi_type_size_x_, + mpi_type_size_x__, + ompi_type_size_x_f, + (MPI_Fint *type, MPI_Count *size, MPI_Fint *ierr), + (type, size, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_type_size_x_f(MPI_Fint *type, MPI_Count *size, MPI_Fint *ierr) +{ + int c_ierr; + MPI_Datatype c_type = MPI_Type_f2c(*type); + OMPI_SINGLE_NAME_DECL(size); + + c_ierr = MPI_Type_size_x(c_type, size); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); +} diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index 1aae3a0fde..d258ec52a5 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -5,6 +5,8 @@ # of Tennessee Research Foundation. All rights # reserved. # Copyright (c) 2012 Inria. All rights reserved. +# Copyright (c) 2013 Los Alamos National Security, LLC. All rights +# reserved. # # $COPYRIGHT$ # @@ -107,6 +109,7 @@ mpi_api_files = \ get_address_f08.F90 \ get_count_f08.F90 \ get_elements_f08.F90 \ + get_elements_x_f08.F90 \ get_f08.F90 \ get_library_version_f08.F90 \ get_processor_name_f08.F90 \ @@ -210,6 +213,7 @@ mpi_api_files = \ start_f08.F90 \ status_set_cancelled_f08.F90 \ status_set_elements_f08.F90 \ + status_set_elements_x_f08.F90 \ testall_f08.F90 \ testany_f08.F90 \ test_cancelled_f08.F90 \ @@ -238,8 +242,10 @@ mpi_api_files = \ type_get_contents_f08.F90 \ type_get_envelope_f08.F90 \ type_get_extent_f08.F90 \ + type_get_extent_x_f08.F90 \ type_get_name_f08.F90 \ type_get_true_extent_f08.F90 \ + type_get_true_extent_x_f08.F90 \ type_indexed_f08.F90 \ type_match_size_f08.F90 \ type_set_attr_f08.F90 \ @@ -420,6 +426,7 @@ pmpi_api_files = \ profile/pget_address_f08.F90 \ profile/pget_count_f08.F90 \ profile/pget_elements_f08.F90 \ + profile/pget_elements_x_f08.F90 \ profile/pget_f08.F90 \ profile/pget_processor_name_f08.F90 \ profile/pget_version_f08.F90 \ @@ -522,6 +529,7 @@ pmpi_api_files = \ profile/pstart_f08.F90 \ profile/pstatus_set_cancelled_f08.F90 \ profile/pstatus_set_elements_f08.F90 \ + profile/pstatus_set_elements_x_f08.F90 \ profile/ptestall_f08.F90 \ profile/ptestany_f08.F90 \ profile/ptest_cancelled_f08.F90 \ @@ -550,13 +558,16 @@ pmpi_api_files = \ profile/ptype_get_contents_f08.F90 \ profile/ptype_get_envelope_f08.F90 \ profile/ptype_get_extent_f08.F90 \ + profile/ptype_get_extent_x_f08.F90 \ profile/ptype_get_name_f08.F90 \ profile/ptype_get_true_extent_f08.F90 \ + profile/ptype_get_true_extent_x_f08.F90 \ profile/ptype_indexed_f08.F90 \ profile/ptype_match_size_f08.F90 \ profile/ptype_set_attr_f08.F90 \ profile/ptype_set_name_f08.F90 \ profile/ptype_size_f08.F90 \ + profile/ptype_size_x_f08.F90 \ profile/ptype_vector_f08.F90 \ profile/punpack_external_f08.F90 \ profile/punpack_f08.F90 \ diff --git a/ompi/mpi/fortran/use-mpi-f08/get_elements_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/get_elements_x_f08.F90 new file mode 100644 index 0000000000..f9f6c3e7b1 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/get_elements_x_f08.F90 @@ -0,0 +1,21 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Get_elements_x_f08(status,datatype,count,ierror) + use :: mpi_f08_types, only : MPI_Status, MPI_Datatype + use :: mpi_f08, only : ompi_get_elements_x_f + implicit none + TYPE(MPI_Status), INTENT(IN) :: status + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: count + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_get_elements_x_f(status,datatype%MPI_VAL,count,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Get_elements_x_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pget_elements_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pget_elements_x_f08.F90 new file mode 100644 index 0000000000..6565d786fb --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pget_elements_x_f08.F90 @@ -0,0 +1,21 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Get_elements_x_f08(status,datatype,count,ierror) + use :: mpi_f08_types, only : MPI_Status, MPI_Datatype + use :: mpi_f08, only : ompi_get_elements_x_f + implicit none + TYPE(MPI_Status), INTENT(IN) :: status + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: count + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_get_elements_x_f(status,datatype%MPI_VAL,count,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Get_elements_x_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/pstatus_set_elements_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/pstatus_set_elements_x_f08.F90 new file mode 100644 index 0000000000..2a4b7706aa --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/pstatus_set_elements_x_f08.F90 @@ -0,0 +1,21 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Status_set_elements_x_f08(status,datatype,count,ierror) + use :: mpi_f08_types, only : MPI_Status, MPI_Datatype + use :: mpi_f08, only : ompi_status_set_elements_x_f + implicit none + TYPE(MPI_Status), INTENT(INOUT) :: status + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(IN) :: count + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_status_set_elements_x_f(status,datatype%MPI_VAL,count,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Status_set_elements_x_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/ptype_get_extent_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/ptype_get_extent_x_f08.F90 new file mode 100644 index 0000000000..facca49c28 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/ptype_get_extent_x_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Type_get_extent_x_f08(datatype,lb,extent,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_type_get_extent_x_f + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: lb, extent + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_type_get_extent_x_f(datatype%MPI_VAL,lb,extent,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Type_get_extent_x_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/ptype_get_true_extent_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/ptype_get_true_extent_x_f08.F90 new file mode 100644 index 0000000000..47a0af4621 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/ptype_get_true_extent_x_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Type_get_true_extent_x_f08(datatype,true_lb,true_extent,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_type_get_true_extent_x_f + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: true_lb, true_extent + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_type_get_true_extent_x_f(datatype%MPI_VAL,true_lb,true_extent,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Type_get_true_extent_x_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/profile/ptype_size_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/profile/ptype_size_x_f08.F90 new file mode 100644 index 0000000000..424faae98a --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/profile/ptype_size_x_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ + +subroutine PMPI_Type_size_x_f08(datatype,size,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_type_size_x_f + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: size + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_type_size_x_f(datatype%MPI_VAL,size,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine PMPI_Type_size_x_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/status_set_elements_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/status_set_elements_x_f08.F90 new file mode 100644 index 0000000000..0539edb210 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/status_set_elements_x_f08.F90 @@ -0,0 +1,21 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Status_set_elements_x_f08(status,datatype,count,ierror) + use :: mpi_f08_types, only : MPI_Status, MPI_Datatype + use :: mpi_f08, only : ompi_status_set_elements_x_f + implicit none + TYPE(MPI_Status), INTENT(INOUT) :: status + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(IN) :: count + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_status_set_elements_x_f(status,datatype%MPI_VAL,count,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Status_set_elements_x_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/type_get_extent_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/type_get_extent_x_f08.F90 new file mode 100644 index 0000000000..084a432a25 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/type_get_extent_x_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Type_get_extent_x_f08(datatype,lb,extent,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_type_get_extent_x_f + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: lb, extent + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_type_get_extent_x_f(datatype%MPI_VAL,lb,extent,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Type_get_extent_x_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/type_get_true_extent_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/type_get_true_extent_x_f08.F90 new file mode 100644 index 0000000000..9ac94adbde --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/type_get_true_extent_x_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Type_get_true_extent_x_f08(datatype,true_lb,true_extent,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_type_get_true_extent_x_f + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: true_lb, true_extent + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_type_get_true_extent_x_f(datatype%MPI_VAL,true_lb,true_extent,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Type_get_true_extent_x_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/type_size_x_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/type_size_x_f08.F90 new file mode 100644 index 0000000000..809df0c1dd --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/type_size_x_f08.F90 @@ -0,0 +1,20 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2013 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ + +subroutine MPI_Type_size_x_f08(datatype,size,ierror) + use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND + use :: mpi_f08, only : ompi_type_size_x_f + implicit none + TYPE(MPI_Datatype), INTENT(IN) :: datatype + INTEGER(MPI_COUNT_KIND), INTENT(OUT) :: size + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_type_size_x_f(datatype%MPI_VAL,size,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_Type_size_x_f08 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 a16bbfe561..bf2df22fc7 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 @@ -5275,6 +5275,31 @@ end MPI_Get_elements #------------------------------------------------------------------------ +output_125_x() { + if test "$output" = "0"; then + return 0 + fi + + procedure=$1 + cat <