diff --git a/ompi/mpiext/ftmpi/Makefile.am b/ompi/mpiext/ftmpi/Makefile.am index 0def400a441..14ba08053bc 100644 --- a/ompi/mpiext/ftmpi/Makefile.am +++ b/ompi/mpiext/ftmpi/Makefile.am @@ -9,5 +9,5 @@ # $HEADER$ # -SUBDIRS = c mpif-h use-mpi +SUBDIRS = c mpif-h use-mpi use-mpi-f08 diff --git a/ompi/mpiext/ftmpi/configure.m4 b/ompi/mpiext/ftmpi/configure.m4 index f9c66d4a06d..ef2412df2d5 100644 --- a/ompi/mpiext/ftmpi/configure.m4 +++ b/ompi/mpiext/ftmpi/configure.m4 @@ -20,6 +20,7 @@ AC_DEFUN([OMPI_MPIEXT_ftmpi_CONFIG],[ AC_CONFIG_FILES([ompi/mpiext/ftmpi/mpif-h/Makefile]) AC_CONFIG_FILES([ompi/mpiext/ftmpi/mpif-h/profile/Makefile]) AC_CONFIG_FILES([ompi/mpiext/ftmpi/use-mpi/Makefile]) + AC_CONFIG_FILES([ompi/mpiext/ftmpi/use-mpi-f08/Makefile]) # If we don't want FT, don't compile this component AS_IF([test "$opal_want_ft_mpi" = "1"], diff --git a/ompi/mpiext/ftmpi/mpif-h/comm_agree_f.c b/ompi/mpiext/ftmpi/mpif-h/comm_agree_f.c index 79d572afec6..a74c73c2b56 100644 --- a/ompi/mpiext/ftmpi/mpif-h/comm_agree_f.c +++ b/ompi/mpiext/ftmpi/mpif-h/comm_agree_f.c @@ -14,6 +14,13 @@ #include "ompi/communicator/communicator.h" #include "ompi/mpi/fortran/base/fint_2_int.h" +#if OMPI_PROFILE_LAYER +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPIX_Comm_agree_f = PMPIX_Comm_agree_f +#endif +#define MPIX_Comm_agree_f PMPIX_Comm_agree_f +#endif + #include "ompi/mpiext/ftmpi/mpif-h/f77_mangle.h" F77_STAMP_FN(MPIX_Comm_agree_f, mpix_comm_agree, @@ -26,13 +33,9 @@ F77_STAMP_FN(MPIX_Comm_agree_f, (MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *ierr), (comm, flag, ierr)) -#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS -#include "ompi/mpiext/ftmpi/mpif-h/profile/defines.h" -#endif - #include "ompi/mpiext/ftmpi/c/mpiext_ftmpi_c.h" -static void MPIX_Comm_agree_f(MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *ierr) +void MPIX_Comm_agree_f(MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *ierr) { MPI_Comm c_comm = MPI_Comm_f2c(*comm); OMPI_LOGICAL_NAME_DECL(flag) diff --git a/ompi/mpiext/ftmpi/mpif-h/comm_failure_ack_f.c b/ompi/mpiext/ftmpi/mpif-h/comm_failure_ack_f.c index 2fd195f0552..167967b9ad7 100644 --- a/ompi/mpiext/ftmpi/mpif-h/comm_failure_ack_f.c +++ b/ompi/mpiext/ftmpi/mpif-h/comm_failure_ack_f.c @@ -14,6 +14,13 @@ #include "ompi/communicator/communicator.h" #include "ompi/mpi/fortran/base/fint_2_int.h" +#if OMPI_PROFILE_LAYER +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPIX_Comm_failure_ack_f = PMPIX_Comm_failure_ack_f +#endif +#define MPIX_Comm_failure_ack_f PMPIX_Comm_failure_ack_f +#endif + #include "ompi/mpiext/ftmpi/mpif-h/f77_mangle.h" F77_STAMP_FN(MPIX_Comm_failure_ack_f, mpix_comm_failure_ack, @@ -26,13 +33,9 @@ F77_STAMP_FN(MPIX_Comm_failure_ack_f, (MPI_Fint *comm, MPI_Fint *ierr), (comm, ierr)) -#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS -#include "ompi/mpiext/ftmpi/mpif-h/profile/defines.h" -#endif - #include "ompi/mpiext/ftmpi/c/mpiext_ftmpi_c.h" -static void MPIX_Comm_failure_ack_f(MPI_Fint *comm, MPI_Fint *ierr) +void MPIX_Comm_failure_ack_f(MPI_Fint *comm, MPI_Fint *ierr) { MPI_Comm c_comm = MPI_Comm_f2c(*comm); diff --git a/ompi/mpiext/ftmpi/mpif-h/comm_failure_get_acked_f.c b/ompi/mpiext/ftmpi/mpif-h/comm_failure_get_acked_f.c index 1c16acc90ff..65c428f81f1 100644 --- a/ompi/mpiext/ftmpi/mpif-h/comm_failure_get_acked_f.c +++ b/ompi/mpiext/ftmpi/mpif-h/comm_failure_get_acked_f.c @@ -14,6 +14,13 @@ #include "ompi/communicator/communicator.h" #include "ompi/mpi/fortran/base/fint_2_int.h" +#if OMPI_PROFILE_LAYER +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPIX_Comm_failure_get_acked_f = PMPIX_Comm_failure_get_acked_f +#endif +#define MPIX_Comm_failure_get_acked_f PMPIX_Comm_failure_get_acked_f +#endif + #include "ompi/mpiext/ftmpi/mpif-h/f77_mangle.h" F77_STAMP_FN(MPIX_Comm_failure_get_acked_f, mpix_comm_failure_get_acked, @@ -26,13 +33,9 @@ F77_STAMP_FN(MPIX_Comm_failure_get_acked_f, (MPI_Fint *comm, MPI_Fint *group, MPI_Fint *ierr), (comm, group, ierr)) -#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS -#include "ompi/mpiext/ftmpi/mpif-h/profile/defines.h" -#endif - #include "ompi/mpiext/ftmpi/c/mpiext_ftmpi_c.h" -static void MPIX_Comm_failure_get_acked_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *ierr) +void MPIX_Comm_failure_get_acked_f(MPI_Fint *comm, MPI_Fint *group, MPI_Fint *ierr) { MPI_Group c_group; MPI_Comm c_comm = MPI_Comm_f2c(*comm); diff --git a/ompi/mpiext/ftmpi/mpif-h/comm_iagree_f.c b/ompi/mpiext/ftmpi/mpif-h/comm_iagree_f.c index 676330d6f0b..92c13d4da8a 100644 --- a/ompi/mpiext/ftmpi/mpif-h/comm_iagree_f.c +++ b/ompi/mpiext/ftmpi/mpif-h/comm_iagree_f.c @@ -15,6 +15,13 @@ #include "ompi/request/request.h" #include "ompi/mpi/fortran/base/fint_2_int.h" +#if OMPI_PROFILE_LAYER +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPIX_Comm_iagree_f = PMPIX_Comm_iagree_f +#endif +#define MPIX_Comm_iagree_f PMPIX_Comm_iagree_f +#endif + #include "ompi/mpiext/ftmpi/mpif-h/f77_mangle.h" F77_STAMP_FN(MPIX_Comm_iagree_f, mpix_comm_iagree, @@ -27,13 +34,9 @@ F77_STAMP_FN(MPIX_Comm_iagree_f, (MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *request, MPI_Fint *ierr), (comm, flag, request, ierr)) -#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS -#include "ompi/mpiext/ftmpi/mpif-h/profile/defines.h" -#endif - #include "ompi/mpiext/ftmpi/c/mpiext_ftmpi_c.h" -static void MPIX_Comm_iagree_f(MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *request, MPI_Fint *ierr) +void MPIX_Comm_iagree_f(MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *request, MPI_Fint *ierr) { MPI_Comm c_comm = MPI_Comm_f2c(*comm); MPI_Request c_req; diff --git a/ompi/mpiext/ftmpi/mpif-h/comm_revoke_f.c b/ompi/mpiext/ftmpi/mpif-h/comm_revoke_f.c index 4f9ec3e2211..9571a8222e1 100644 --- a/ompi/mpiext/ftmpi/mpif-h/comm_revoke_f.c +++ b/ompi/mpiext/ftmpi/mpif-h/comm_revoke_f.c @@ -14,6 +14,13 @@ #include "ompi/communicator/communicator.h" #include "ompi/mpi/fortran/base/fint_2_int.h" +#if OMPI_PROFILE_LAYER +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPIX_Comm_revoke_f = PMPIX_Comm_revoke_f +#endif +#define MPIX_Comm_revoke_f PMPIX_Comm_revoke_f +#endif + #include "ompi/mpiext/ftmpi/mpif-h/f77_mangle.h" F77_STAMP_FN(MPIX_Comm_revoke_f, mpix_comm_revoke, @@ -26,13 +33,9 @@ F77_STAMP_FN(MPIX_Comm_revoke_f, (MPI_Fint *comm, MPI_Fint *ierr), (comm, ierr)) -#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS -#include "ompi/mpiext/ftmpi/mpif-h/profile/defines.h" -#endif - #include "ompi/mpiext/ftmpi/c/mpiext_ftmpi_c.h" -static void MPIX_Comm_revoke_f(MPI_Fint *comm, MPI_Fint *ierr) +void MPIX_Comm_revoke_f(MPI_Fint *comm, MPI_Fint *ierr) { MPI_Comm c_comm = MPI_Comm_f2c(*comm); diff --git a/ompi/mpiext/ftmpi/mpif-h/comm_shrink_f.c b/ompi/mpiext/ftmpi/mpif-h/comm_shrink_f.c index a45ae2edef2..57b6ac7eb5d 100644 --- a/ompi/mpiext/ftmpi/mpif-h/comm_shrink_f.c +++ b/ompi/mpiext/ftmpi/mpif-h/comm_shrink_f.c @@ -14,6 +14,13 @@ #include "ompi/communicator/communicator.h" #include "ompi/mpi/fortran/base/fint_2_int.h" +#if OMPI_PROFILE_LAYER +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPIX_Comm_shrink_f = PMPIX_Comm_shrink_f +#endif +#define MPIX_Comm_shrink_f PMPIX_Comm_shrink_f +#endif + #include "ompi/mpiext/ftmpi/mpif-h/f77_mangle.h" F77_STAMP_FN(MPIX_Comm_shrink_f, mpix_comm_shrink, @@ -26,13 +33,9 @@ F77_STAMP_FN(MPIX_Comm_shrink_f, (MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr), (comm, newcomm, ierr)) -#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS -#include "ompi/mpiext/ftmpi/mpif-h/profile/defines.h" -#endif - #include "ompi/mpiext/ftmpi/c/mpiext_ftmpi_c.h" -static void MPIX_Comm_shrink_f(MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr) +void MPIX_Comm_shrink_f(MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr) { MPI_Comm c_newcomm; MPI_Comm c_comm = MPI_Comm_f2c(*comm); diff --git a/ompi/mpiext/ftmpi/mpif-h/f77_mangle.h b/ompi/mpiext/ftmpi/mpif-h/f77_mangle.h index 3660bff71ca..1af3ac9d269 100644 --- a/ompi/mpiext/ftmpi/mpif-h/f77_mangle.h +++ b/ompi/mpiext/ftmpi/mpif-h/f77_mangle.h @@ -11,7 +11,7 @@ */ #if OMPI_PROFILE_LAYER #define F77_STAMP_PROFILE_FN(fn_name_core, fn_name_lower, fn_name_upper, fn_args, pass_args) \ - static void fn_name_core fn_args; \ + void fn_name_core fn_args; \ \ OMPI_DECLSPEC void P##fn_name_upper fn_args; \ OMPI_DECLSPEC void p##fn_name_lower fn_args; \ @@ -35,7 +35,7 @@ #else #define F77_STAMP_FN(fn_name_core, fn_name_lower, fn_name_upper, fn_args, pass_args) \ - static void fn_name_core fn_args; \ + void fn_name_core fn_args; \ \ OMPI_DECLSPEC void fn_name_upper fn_args; \ OMPI_DECLSPEC void fn_name_lower fn_args; \ diff --git a/ompi/mpiext/ftmpi/mpif-h/profile/defines.h b/ompi/mpiext/ftmpi/mpif-h/profile/defines.h deleted file mode 100644 index 9fb608aba3a..00000000000 --- a/ompi/mpiext/ftmpi/mpif-h/profile/defines.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2010-2012 Oak Ridge National Labs. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - */ -#ifndef OMPI_MPIEXT_FTMPI_F77_PROFILE_DEFINES_H -#define OMPI_MPIEXT_FTMPI_F77_PROFILE_DEFINES_H -/* - * This file is included in the top directory only if - * profiling is required. Once profiling is required, - * this file will replace all MPI_* symbols with - * PMPI_* symbols - */ - -#define MPIX_Comm_revoke PMPIX_Comm_revoke - -#define MPIX_Comm_shrink PMPIX_Comm_shrink - -#define MPIX_Comm_failure_ack PMPIX_Comm_failure_ack -#define MPIX_Comm_failure_get_acked PMPIX_Comm_failure_get_acked - -#define MPIX_Comm_agree PMPIX_Comm_agree -#define MPIX_Comm_iagree PMPIX_Comm_iagree - -/* Deprecated functions */ -#define OMPI_Comm_revoke POMPI_Comm_revoke - -#define OMPI_Comm_shrink POMPI_Comm_shrink - -#define OMPI_Comm_failure_ack POMPI_Comm_failure_ack -#define OMPI_Comm_failure_get_acked POMPI_Comm_failure_get_acked - -#define OMPI_Comm_agree POMPI_Comm_agree -#define OMPI_Comm_iagree POMPI_Comm_iagree - -#endif /* OMPI_MPIEXT_FTMPI_F77_PROFILE_DEFINES_H */ diff --git a/ompi/mpiext/ftmpi/use-mpi-f08/Makefile.am b/ompi/mpiext/ftmpi/use-mpi-f08/Makefile.am new file mode 100644 index 00000000000..1c4a0d53887 --- /dev/null +++ b/ompi/mpiext/ftmpi/use-mpi-f08/Makefile.am @@ -0,0 +1,33 @@ +# +# Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2017 Research Organization for Information Science +# and Technology (RIST). All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +AM_FCFLAGS = $(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/use-mpi-f08/mod \ + -I$(top_srcdir) $(FCFLAGS_f90) + +noinst_LTLIBRARIES = + +if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS + +# If we are, build the convenience libtool library that will be +# slurped up into libmpi_usempif08.la. +noinst_LTLIBRARIES += libmpiext_ftmpi_usempif08.la + +noinst_HEADERS = mpiext_ftmpi_usempif08.h + +# Sources for the convenience libtool library. +libmpiext_ftmpi_usempif08_la_SOURCES = comm_agree_f08.F90 \ + comm_failure_ack_f08.F90 \ + comm_failure_get_acked_f08.F90 \ + comm_iagree_f08.F90 \ + comm_revoke_f08.F90 \ + comm_shrink_f08.F90 +libmpiext_ftmpi_usempif08_la_LDFLAGS = -module -avoid-version +endif diff --git a/ompi/mpiext/ftmpi/use-mpi-f08/comm_agree_f08.F90 b/ompi/mpiext/ftmpi/use-mpi-f08/comm_agree_f08.F90 new file mode 100644 index 00000000000..c34015c6098 --- /dev/null +++ b/ompi/mpiext/ftmpi/use-mpi-f08/comm_agree_f08.F90 @@ -0,0 +1,26 @@ +! -*- f90 -*- +! +! $COPYRIGHT$ +! + +subroutine MPIX_Comm_agree_f08(comm, flag, ierror) + use :: mpi_f08_types, only : MPI_Comm + implicit none + interface + subroutine MPIX_Comm_agree_f(comm, flag, ierror) & + BIND(C, name="MPIX_Comm_agree_f") + implicit none + INTEGER, INTENT(IN) :: comm + INTEGER, INTENT(INOUT) :: flag + INTEGER, INTENT(OUT) :: ierror + end subroutine MPIX_Comm_agree_f + end interface + TYPE(MPI_Comm), INTENT(IN) :: comm + INTEGER, INTENT(INOUT) :: flag + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call MPIX_Comm_agree_f(comm%MPI_VAL, flag, c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPIX_Comm_agree_f08 diff --git a/ompi/mpiext/ftmpi/use-mpi-f08/comm_failure_ack_f08.F90 b/ompi/mpiext/ftmpi/use-mpi-f08/comm_failure_ack_f08.F90 new file mode 100644 index 00000000000..1c03a44dc42 --- /dev/null +++ b/ompi/mpiext/ftmpi/use-mpi-f08/comm_failure_ack_f08.F90 @@ -0,0 +1,27 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ +! + +subroutine MPIX_Comm_failure_ack_f08(comm, ierror) + use :: mpi_f08_types, only : MPI_Comm + implicit none + interface + subroutine MPIX_Comm_failure_ack_f(comm, ierror) & + BIND(C, name="MPIX_Comm_failure_ack_f") + implicit none + INTEGER, INTENT(IN) :: comm + INTEGER, INTENT(OUT) :: ierror + end subroutine MPIX_Comm_failure_ack_f + end interface + TYPE(MPI_Comm), INTENT(IN) :: comm + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call MPIX_Comm_failure_ack_f(comm%MPI_VAL, c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPIX_Comm_failure_ack_f08 diff --git a/ompi/mpiext/ftmpi/use-mpi-f08/comm_failure_get_acked_f08.F90 b/ompi/mpiext/ftmpi/use-mpi-f08/comm_failure_get_acked_f08.F90 new file mode 100644 index 00000000000..63ae747b545 --- /dev/null +++ b/ompi/mpiext/ftmpi/use-mpi-f08/comm_failure_get_acked_f08.F90 @@ -0,0 +1,28 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All rights reserved. +! $COPYRIGHT$ +! + +subroutine MPIX_Comm_failure_get_acked_f08(comm, failedgrp, ierror) + use :: mpi_f08_types, only : MPI_Comm, MPI_Group + implicit none + interface + subroutine MPIX_Comm_failure_get_acked_f(comm, failedgrp, ierror) & + BIND(C, name="MPIX_Comm_failure_get_acked_f") + implicit none + INTEGER, INTENT(IN) :: comm + INTEGER, INTENT(OUT) :: failedgrp, ierror + end subroutine MPIX_Comm_failure_get_acked_f + end interface + TYPE(MPI_Comm), INTENT(IN) :: comm + TYPE(MPI_Group), INTENT(OUT) :: failedgrp + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call MPIX_Comm_failure_get_acked_f(comm%MPI_VAL, failedgrp%MPI_VAL, c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPIX_Comm_failure_get_acked_f08 diff --git a/ompi/mpiext/ftmpi/use-mpi-f08/comm_iagree_f08.F90 b/ompi/mpiext/ftmpi/use-mpi-f08/comm_iagree_f08.F90 new file mode 100644 index 00000000000..e4f479ad5d2 --- /dev/null +++ b/ompi/mpiext/ftmpi/use-mpi-f08/comm_iagree_f08.F90 @@ -0,0 +1,30 @@ +! -*- f90 -*- +! +! $COPYRIGHT$ +! + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPIX_Comm_iagree_f08(comm, flag, request, ierror) + use :: mpi_f08_types, only : MPI_Comm, MPI_Request + implicit none + interface + subroutine MPIX_Comm_iagree_f(comm, flag, request, ierror) & + BIND(C, name="MPIX_Comm_iagree_f") + implicit none + INTEGER, INTENT(IN) :: comm + INTEGER, INTENT(INOUT) :: flag + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror + end subroutine MPIX_Comm_iagree_f + end interface + TYPE(MPI_Comm), INTENT(IN) :: comm + INTEGER, INTENT(INOUT) OMPI_ASYNCHRONOUS :: flag + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call MPIX_Comm_iagree_f(comm%MPI_VAL, flag, request%MPI_VAL, c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPIX_Comm_iagree_f08 diff --git a/ompi/mpiext/ftmpi/use-mpi-f08/comm_revoke_f08.F90 b/ompi/mpiext/ftmpi/use-mpi-f08/comm_revoke_f08.F90 new file mode 100644 index 00000000000..4efec5c2870 --- /dev/null +++ b/ompi/mpiext/ftmpi/use-mpi-f08/comm_revoke_f08.F90 @@ -0,0 +1,24 @@ +! -*- f90 -*- +! +! $COPYRIGHT$ +! + +subroutine MPIX_Comm_revoke_f08(comm, ierror) + use :: mpi_f08_types, only : MPI_Comm + implicit none + interface + subroutine MPIX_Comm_revoke_f(comm, ierror) & + BIND(C, name="MPIX_Comm_revoke_f") + implicit none + INTEGER, INTENT(IN) :: comm + INTEGER, INTENT(OUT) :: ierror + end subroutine MPIX_Comm_revoke_f + end interface + TYPE(MPI_Comm), INTENT(IN) :: comm + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call MPIX_Comm_revoke_f(comm%MPI_VAL, c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPIX_Comm_revoke_f08 diff --git a/ompi/mpiext/ftmpi/use-mpi-f08/comm_shrink_f08.F90 b/ompi/mpiext/ftmpi/use-mpi-f08/comm_shrink_f08.F90 new file mode 100644 index 00000000000..241a938ec62 --- /dev/null +++ b/ompi/mpiext/ftmpi/use-mpi-f08/comm_shrink_f08.F90 @@ -0,0 +1,26 @@ +! -*- f90 -*- +! +! $COPYRIGHT$ +! + +subroutine MPIX_Comm_shrink_f08(comm, newcomm, ierror) + use :: mpi_f08_types, only : MPI_Comm + implicit none + interface + subroutine MPIX_Comm_shrink_f(comm, newcomm, ierror) & + BIND(C, name="MPIX_Comm_shrink_f") + implicit none + INTEGER, INTENT(IN) :: comm + INTEGER, INTENT(OUT) :: newcomm + INTEGER, INTENT(OUT) :: ierror + end subroutine MPIX_Comm_shrink_f + end interface + TYPE(MPI_Comm), INTENT(IN) :: comm + TYPE(MPI_Comm), INTENT(OUT) :: newcomm + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call MPIX_Comm_shrink_f(comm%MPI_VAL, newcomm%MPI_VAL, c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPIX_Comm_shrink_f08 diff --git a/ompi/mpiext/ftmpi/use-mpi-f08/mpiext_ftmpi_usempif08.h b/ompi/mpiext/ftmpi/use-mpi-f08/mpiext_ftmpi_usempif08.h new file mode 100644 index 00000000000..de2edd35606 --- /dev/null +++ b/ompi/mpiext/ftmpi/use-mpi-f08/mpiext_ftmpi_usempif08.h @@ -0,0 +1,64 @@ +! -*- f90 -*- +! +! $COPYRIGHT$ + + +interface MPIX_Comm_agree +subroutine MPIX_Comm_agree_f08(comm,flag,ierror) + use :: mpi_f08_types, only : MPI_Comm + implicit none + TYPE(MPI_Comm), INTENT(IN) :: comm + INTEGER, INTENT(INOUT) :: flag + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPIX_Comm_agree_f08 +end interface MPIX_Comm_agree + +interface MPIX_Comm_failure_ack +subroutine MPIX_Comm_failure_ack_f08(comm,ierror) + use :: mpi_f08_types, only : MPI_Comm + implicit none + TYPE(MPI_Comm), INTENT(IN) :: comm + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPIX_Comm_failure_ack_f08 +end interface MPIX_Comm_failure_ack + +interface MPIX_Comm_failure_get_acked +subroutine MPIX_Comm_failure_get_acked_f08(comm,failedgrp,ierror) + use :: mpi_f08_types, only : MPI_Comm, MPI_Group + implicit none + TYPE(MPI_Comm), INTENT(IN) :: comm + TYPE(MPI_Group), INTENT(OUT) :: failedgrp + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPIX_Comm_failure_get_acked_f08 +end interface MPIX_Comm_failure_get_acked + +interface MPIX_Comm_iagree +subroutine MPIX_Comm_iagree_f08(comm,flag,request,ierror) + use :: mpi_f08_types, only : MPI_Comm, MPI_Request + implicit none + TYPE(MPI_Comm), INTENT(IN) :: comm + INTEGER, INTENT(INOUT), ASYNCHRONOUS :: flag ! should use OMPI_ASYNCHRONOUS + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPIX_Comm_iagree_f08 +end interface MPIX_Comm_iagree + +interface MPIX_Comm_revoke +subroutine MPIX_Comm_revoke_f08(comm,ierror) + use :: mpi_f08_types, only : MPI_Comm + implicit none + TYPE(MPI_Comm), INTENT(IN) :: comm + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPIX_Comm_revoke_f08 +end interface MPIX_Comm_revoke + +interface MPIX_Comm_shrink +subroutine MPIX_Comm_shrink_f08(comm,newcomm,ierror) + use :: mpi_f08_types, only : MPI_Comm + implicit none + TYPE(MPI_Comm), INTENT(IN) :: comm + TYPE(MPI_Comm), INTENT(OUT) :: newcomm + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPIX_Comm_shrink_f08 +end interface MPIX_Comm_shrink +