Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Commit

Permalink
mpi-f08: corrections to new MPI_Aint_* subroutines
Browse files Browse the repository at this point in the history
(cherry picked from commit 8f252e65b02bfe20cacee0ece8c835246eea3bd9)

(cherry picked from open-mpi/ompi@258d1aa)

Signed-off-by: Nathan Hjelm <[email protected]>
  • Loading branch information
jsquyres authored and hjelmn committed Oct 14, 2015
1 parent 12965fb commit d3920a6
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 37 deletions.
4 changes: 4 additions & 0 deletions ompi/mpi/fortran/use-mpi-f08/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ mpi_api_files = \
add_error_class_f08.F90 \
add_error_code_f08.F90 \
add_error_string_f08.F90 \
aint_add_f08.F90 \
aint_diff_f08.F90 \
allgather_f08.F90 \
allgatherv_f08.F90 \
alloc_mem_f08.F90 \
Expand Down Expand Up @@ -448,6 +450,8 @@ pmpi_api_files = \
profile/padd_error_class_f08.F90 \
profile/padd_error_code_f08.F90 \
profile/padd_error_string_f08.F90 \
profile/paint_add_f08.F90 \
profile/paint_diff_f08.F90 \
profile/pallgather_f08.F90 \
profile/pallgatherv_f08.F90 \
profile/palloc_mem_f08.F90 \
Expand Down
11 changes: 6 additions & 5 deletions ompi/mpi/fortran/use-mpi-f08/aint_add_f08.F90
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2015 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$

#include "ompi/mpi/fortran/configure-fortran-output.h"

function MPI_Aint_add_f08(base,diff)
function MPI_Aint_add_f08(addr1, addr2)
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
use :: mpi_f08, only : ompi_aint_add_f
implicit none
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: base
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: diff
call ompi_aint_add_f (base, diff)
INTEGER(MPI_ADDRESS_KIND) :: MPI_Aint_add_f08
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr1
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr2
MPI_Aint_add_f08 = ompi_aint_add_f(addr1, addr2)
end function MPI_Aint_add_f08
9 changes: 5 additions & 4 deletions ompi/mpi/fortran/use-mpi-f08/aint_diff_f08.F90
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2015 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$

#include "ompi/mpi/fortran/configure-fortran-output.h"

function MPI_Aint_diff_f08(addr1,addr2)
function MPI_Aint_diff_f08(addr1, addr2)
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
use :: mpi_f08, only ompi_aint_diff_f
use :: mpi_f08, only : ompi_aint_diff_f
implicit none
INTEGER(MPI_ADDRESS_KIND) :: MPI_Aint_diff_f08
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr1
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr2
call ompi_aint_diff_f (base, diff)
MPI_Aint_diff_f08 = ompi_aint_diff_f(addr1, addr2)
end function MPI_Aint_diff_f08
10 changes: 5 additions & 5 deletions ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2015 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
Expand Down Expand Up @@ -1787,23 +1787,23 @@ function ompi_wtime_f() &
DOUBLE PRECISION :: ompi_wtime_f
end function ompi_wtime_f

function ompi_aint_add_f(base,diff) &
function ompi_aint_add_f(base,diff) &
BIND(C, name="ompi_aint_add_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: base
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: diff
INTEGER(MPI_ADDRESS_KIND) :: ompi_aint_add_f
end function ompi_aint_add_f
end function ompi_aint_add_f

function ompi_aint_diff_f(addr1,addr2) &
function ompi_aint_diff_f(addr1,addr2) &
BIND(C, name="ompi_aint_diff_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr1
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr2
INTEGER(MPI_ADDRESS_KIND) :: ompi_aint_diff_f
end function ompi_aint_diff_f
end function ompi_aint_diff_f

subroutine ompi_abort_f(comm,errorcode,ierror) &
BIND(C, name="ompi_abort_f")
Expand Down
10 changes: 5 additions & 5 deletions ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2015 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
Expand Down Expand Up @@ -1623,23 +1623,23 @@ end subroutine pompi_topo_test_f
! DOUBLE PRECISION :: MPI_Wtime_f
!end function MPI_Wtime_f

function pompi_aint_add_f(base,diff) &
function pompi_aint_add_f(base,diff) &
BIND(C, name="pompi_aint_add_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: base
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: diff
INTEGER(MPI_ADDRESS_KIND) :: pompi_aint_add_f
end function pompi_aint_add_f
end function pompi_aint_add_f

function pompi_aint_diff_f(addr1,addr2) &
function pompi_aint_diff_f(addr1,addr2) &
BIND(C, name="pompi_aint_diff_f")
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr1
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr2
INTEGER(MPI_ADDRESS_KIND) :: pompi_aint_diff_f
end function pompi_aint_diff_f
end function pompi_aint_diff_f

subroutine pompi_abort_f(comm,errorcode,ierror) &
BIND(C, name="pompi_abort_f")
Expand Down
12 changes: 5 additions & 7 deletions ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! -*- f90 -*-
!
! Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2013 Los Alamos National Security, LLC.
! All rights reserved.
! Copyright (c) 2012 The University of Tennessee and The University
Expand Down Expand Up @@ -2431,23 +2431,21 @@ end function PMPI_Wtime_f08
end interface PMPI_Wtime

interface PMPI_Aint_add
function PMPI_Aint_add_f08(base,diff)
subroutine PMPI_Aint_add_f08(base,diff)
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER(MPI_ADDRESS_KIND) :: base
INTEGER(MPI_ADDRESS_KIND) :: diff
INTEGER(MPI_ADDRESS_KIND) :: PMPI_Aint_add_f08
end function PMPI_Aint_add_f08
end subroutine PMPI_Aint_add_f08
end interface PMPI_Aint_add

interface PMPI_Aint_diff
function PMPI_Aint_diff_f08(addr1,addr2)
subroutine PMPI_Aint_diff_f08(addr1,addr2)
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
implicit none
INTEGER(MPI_ADDRESS_KIND) :: addr1
INTEGER(MPI_ADDRESS_KIND) :: addr2
INTEGER(MPI_ADDRESS_KIND) :: PMPI_Aint_diff_f08
end function PMPI_Aint_diff_f08
end subroutine PMPI_Aint_diff_f08
end interface PMPI_Aint_diff

interface PMPI_Abort
Expand Down
9 changes: 5 additions & 4 deletions ompi/mpi/fortran/use-mpi-f08/profile/paint_add_f08.F90
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2015 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$

#include "ompi/mpi/fortran/configure-fortran-output.h"

function PMPI_Aint_add_f08(base,diff)
function PMPI_Aint_add_f08(base, diff)
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
use :: mpi_f08, only ompi_aint_add_f
use :: mpi_f08, only : ompi_aint_add_f
implicit none
INTEGER(MPI_ADDRESS_KIND) :: PMPI_Aint_add_f08
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: base
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: diff
call ompi_aint_add_f (base, diff)
PMPI_Aint_add_f08 = ompi_aint_add_f(base, diff)
end function PMPI_Aint_add_f08
15 changes: 8 additions & 7 deletions ompi/mpi/fortran/use-mpi-f08/profile/paint_diff_f08.F90
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
! -*- f90 -*-
!
! Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2015 Los Alamos National Security, LLC.
! All Rights reserved.
! $COPYRIGHT$

#include "ompi/mpi/fortran/configure-fortran-output.h"

function PMPI_Aint_add_f08(base,diff)
function PMPI_Aint_diff_f08(addr1, addr2)
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
use :: mpi_f08, only ompi_aint_add_f
use :: mpi_f08, only : ompi_aint_diff_f
implicit none
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: base
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: diff
call ompi_aint_add_f (base, diff)
end function PMPI_Aint_add_f08
INTEGER(MPI_ADDRESS_KIND) :: PMPI_Aint_diff_f08
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr1
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: addr2
PMPI_Aint_diff_f08 = ompi_aint_diff_f(addr1, addr2)
end function PMPI_Aint_diff_f08

0 comments on commit d3920a6

Please sign in to comment.