1
1

A bunch of fixes to the f08 bindings:

* Add in a bunch of missinc MPI_Op pre-defined constants
 * Fix a few parameter types
 * Ensure that MPI_Op handles have the same values in all interfaces
   (i.e., add them to the mpif-common.pl generator script)

This commit was SVN r26511.
Этот коммит содержится в:
Jeff Squyres 2012-05-29 17:54:33 +00:00
родитель 197f923ce3
Коммит 91bae49090
9 изменённых файлов: 100 добавлений и 31 удалений

Просмотреть файл

@ -381,25 +381,6 @@
parameter (MPI_COMM_TYPE_SHARED=0)
!
! lookup table indices
!
! Now generated; located at bottom of mpif-common.h file
! Generated input below, located at bottom of mpif-common.h file
!
integer MPI_MAX, MPI_MIN, MPI_SUM, MPI_PROD, MPI_LAND
integer MPI_BAND, MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR
integer MPI_MAXLOC, MPI_MINLOC, MPI_REPLACE
parameter (MPI_MAX=1)
parameter (MPI_MIN=2)
parameter (MPI_SUM=3)
parameter (MPI_PROD=4)
parameter (MPI_LAND=5)
parameter (MPI_BAND=6)
parameter (MPI_LOR=7)
parameter (MPI_BOR=8)
parameter (MPI_LXOR=9)
parameter (MPI_BXOR=10)
parameter (MPI_MAXLOC=11)
parameter (MPI_MINLOC=12)
parameter (MPI_REPLACE=13)

Просмотреть файл

@ -90,6 +90,23 @@ my $MPI_GROUP_EMPTY = 1;
my $MPI_ERRORS_ARE_FATAL = 1;
my $MPI_ERRORS_RETURN = 2;
#
# lookup table indices
#
my $MPI_MAX = 1;
my $MPI_MIN = 2;
my $MPI_SUM = 3;
my $MPI_PROD = 4;
my $MPI_LAND = 5;
my $MPI_BAND = 6;
my $MPI_LOR = 7;
my $MPI_BOR = 8;
my $MPI_LXOR = 9;
my $MPI_BXOR = 10;
my $MPI_MAXLOC = 11;
my $MPI_MINLOC = 12;
my $MPI_REPLACE = 13;
#
# NULL "handles" (indices)
#
@ -209,10 +226,6 @@ $input .= "!
parameter (MPI_WIN_NULL=$MPI_WIN_NULL)
parameter (MPI_MESSAGE_NULL=$MPI_MESSAGE_NULL)
!
! lookup table indices
!
integer MPI_COMM_WORLD, MPI_COMM_SELF
integer MPI_GROUP_EMPTY
integer MPI_ERRORS_ARE_FATAL, MPI_ERRORS_RETURN
@ -226,6 +239,28 @@ $input .= "!
parameter (MPI_ERRORS_ARE_FATAL=$MPI_ERRORS_ARE_FATAL)
parameter (MPI_ERRORS_RETURN=$MPI_ERRORS_RETURN)
!
! lookup table indices
!
integer MPI_MAX, MPI_MIN, MPI_SUM, MPI_PROD, MPI_LAND
integer MPI_BAND, MPI_LOR, MPI_BOR, MPI_LXOR, MPI_BXOR
integer MPI_MAXLOC, MPI_MINLOC, MPI_REPLACE
parameter (MPI_MAX=$MPI_MAX)
parameter (MPI_MIN=$MPI_MIN)
parameter (MPI_SUM=$MPI_SUM)
parameter (MPI_PROD=$MPI_PROD)
parameter (MPI_LAND=$MPI_LAND)
parameter (MPI_BAND=$MPI_BAND)
parameter (MPI_LOR=$MPI_LOR)
parameter (MPI_BOR=$MPI_BOR)
parameter (MPI_LXOR=$MPI_LXOR)
parameter (MPI_BXOR=$MPI_BXOR)
parameter (MPI_MAXLOC=$MPI_MAXLOC)
parameter (MPI_MINLOC=$MPI_MINLOC)
parameter (MPI_REPLACE=$MPI_REPLACE)
integer MPI_BYTE, MPI_PACKED, MPI_UB, MPI_LB
integer MPI_CHARACTER, MPI_LOGICAL
integer MPI_INTEGER, MPI_INTEGER1, MPI_INTEGER2, MPI_INTEGER4
@ -365,6 +400,24 @@ $input .= "
#define OMPI_MPI_ERRORS_ARE_FATAL $MPI_ERRORS_ARE_FATAL
#define OMPI_MPI_ERRORS_RETURN $MPI_ERRORS_RETURN
/*
* lookup table indices
*/
#define OMPI_MPI_MAX $MPI_MAX
#define OMPI_MPI_MIN $MPI_MIN
#define OMPI_MPI_SUM $MPI_SUM
#define OMPI_MPI_PROD $MPI_PROD
#define OMPI_MPI_LAND $MPI_LAND
#define OMPI_MPI_BAND $MPI_BAND
#define OMPI_MPI_LOR $MPI_LOR
#define OMPI_MPI_BOR $MPI_BOR
#define OMPI_MPI_LXOR $MPI_LXOR
#define OMPI_MPI_BXOR $MPI_BXOR
#define OMPI_MPI_MAXLOC $MPI_MAXLOC
#define OMPI_MPI_MINLOC $MPI_MINLOC
#define OMPI_MPI_REPLACE $MPI_REPLACE
/*
* NULL 'handles' (indices)
*/

Просмотреть файл

@ -2059,7 +2059,7 @@ subroutine MPI_Topo_test_f08(comm,status,ierror &
use :: mpi_f08_types, only : MPI_Comm, MPI_Status
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Status) :: status
INTEGER, INTENT(OUT) :: status
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
end subroutine MPI_Topo_test_f08
end interface MPI_Topo_test

Просмотреть файл

@ -93,12 +93,30 @@ module mpi_f08_types
! Pre-defined communicator bindings
!
type(MPI_Comm), protected, bind(C, name="ompi_f08_mpi_comm_world") :: MPI_COMM_WORLD
type(MPI_Comm), protected, bind(C, name="ompi_f08_mpi_comm_self") :: MPI_COMM_SELF
type(MPI_Comm), protected, bind(C, name="ompi_f08_mpi_comm_world") :: MPI_COMM_WORLD
type(MPI_Comm), protected, bind(C, name="ompi_f08_mpi_comm_self") :: MPI_COMM_SELF
type(MPI_Group), protected, bind(C, name="ompi_f08_mpi_group_empty") :: MPI_GROUP_EMPTY
type(MPI_Errhandler), protected, bind(C, name="ompi_f08_mpi_errors_are_fatal") :: MPI_ERRORS_ARE_FATAL
type(MPI_Errhandler), protected, bind(C, name="ompi_f08_mpi_errors_return") :: MPI_ERRORS_RETURN
!
! lookup table indices
!
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_max" ) :: MPI_MAX
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_min" ) :: MPI_MIN
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_sum" ) :: MPI_SUM
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_prod" ) :: MPI_PROD
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_land" ) :: MPI_LAND
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_band" ) :: MPI_BAND
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_lor" ) :: MPI_LOR
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_bor" ) :: MPI_BOR
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_lxor" ) :: MPI_LXOR
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_bxor" ) :: MPI_BXOR
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_maxloc" ) :: MPI_MAXLOC
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_minloc" ) :: MPI_MINLOC
type(MPI_Op), protected, bind(C, name="ompi_f08_mpi_replace" ) :: MPI_REPLACE
!
! NULL "handles" (indices)
!

Просмотреть файл

@ -26,6 +26,23 @@ OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_group_empty = {OMPI_MPI
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errors_are_fatal = {OMPI_MPI_ERRORS_ARE_FATAL};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_errors_return = {OMPI_MPI_ERRORS_RETURN};
/*
* lookup table indices
*/
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_max = {OMPI_MPI_MAX};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_min = {OMPI_MPI_MIN};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_sum = {OMPI_MPI_SUM};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_prod = {OMPI_MPI_PROD};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_land = {OMPI_MPI_LAND};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_band = {OMPI_MPI_BAND};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_lor = {OMPI_MPI_LOR};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_bor = {OMPI_MPI_BOR};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_lxor = {OMPI_MPI_LXOR};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_bxor = {OMPI_MPI_BXOR};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_maxloc = {OMPI_MPI_MAXLOC};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_minloc = {OMPI_MPI_MINLOC};
OMPI_DECLSPEC ompi_fortran_08_handle_t ompi_f08_mpi_replace = {OMPI_MPI_REPLACE};
/*
* NULL "handles" (indices)
*/

Просмотреть файл

@ -1515,7 +1515,7 @@ subroutine ompi_topo_test_f(comm,status,ierror) &
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: comm
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine ompi_topo_test_f

Просмотреть файл

@ -1515,7 +1515,7 @@ subroutine pompi_topo_test_f(comm,status,ierror) &
use :: mpi_f08_types, only : MPI_Status
implicit none
INTEGER, INTENT(IN) :: comm
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: ierror
end subroutine pompi_topo_test_f

Просмотреть файл

@ -10,7 +10,7 @@ subroutine PMPI_Topo_test_f08(comm,status,ierror)
use :: mpi_f08, only : ompi_topo_test_f
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: status
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror

Просмотреть файл

@ -10,7 +10,7 @@ subroutine MPI_Topo_test_f08(comm,status,ierror)
use :: mpi_f08, only : ompi_topo_test_f
implicit none
TYPE(MPI_Comm), INTENT(IN) :: comm
TYPE(MPI_Status), INTENT(OUT) :: status
INTEGER, INTENT(OUT) :: status
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
integer :: c_ierror