Skip to content

Commit f2ccd80

Browse files
ThemosTsikasjsquyres
authored andcommitted
mpi/fortran: use conformant dummy names for Fortran bindings
The MPI spec defines that the "mpi" and "mpi_f08" module Fortran bindings support passing by parameters by name. Hence, we need to use the MPI-spec-defined parameter names ("dummy variables", in Fortran parlance) for the "mpi" and "mpi_f08" modules. Specifically, Fortran allows calls to procedures to be written with keyword arguments, e.g., "call mpi_sizeof(x=x,size=rsize,ierror=ier)" An "explicit interface" for the procedure must be in scope for this to be allowed in a Fortran program unit. Therefore, the explicit interface blocks we provide in the "mpi" and "mpi_f08" modules must match the MPI published standard, including the names of the dummy variables (i.e., parameter names), as that is how Fortran programs may call them. Note that we didn't find this issue previously because even though the MPI spec *allows* for name-based parameter passing, not many people actually use it. I suspect that we might have some more incorrect parameter names -- we should probably do a full "mpi" / "mpi_f08" module parameter name audit someday. Thanks to Themos Tsikas for reporting the issue and supplying the initial fix. Signed-off-by: [email protected] Signed-off-by: Jeff Squyres <[email protected]> Signed-off-by: Gilles Gouaillardet <[email protected]> (cherry picked from commit 4d126c1)
1 parent ec23e9f commit f2ccd80

20 files changed

+217
-201
lines changed

ompi/mpi/fortran/base/attr-fn-int-callback-interfaces.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
! Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
55
! Copyright (c) 2013 Los Alamos National Security, LLC. All rights
66
! reserved.
7-
! Copyright (c) 2015 Research Organization for Information Science
8-
! and Technology (RIST). All rights reserved.
7+
! Copyright (c) 2015-2018 Research Organization for Information Science
8+
! and Technology (RIST). All rights reserved.
99
! $COPYRIGHT$
1010
!
1111
! Additional copyrights may follow
@@ -84,35 +84,35 @@ interface
8484

8585
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8686

87-
subroutine MPI_TYPE_DUP_FN( oldtype, type_keyval, extra_state, &
87+
subroutine MPI_TYPE_DUP_FN( datatype, type_keyval, extra_state, &
8888
attribute_val_in, attribute_val_out, &
8989
flag, ierr )
9090
implicit none
9191
include 'mpif-config.h'
92-
integer :: oldtype
92+
integer :: datatype
9393
integer :: type_keyval
9494
integer(KIND=MPI_ADDRESS_KIND) :: extra_state, attribute_val_in, attribute_val_out
9595
logical :: flag
9696
integer :: ierr
9797
end subroutine MPI_TYPE_DUP_FN
9898

99-
subroutine MPI_TYPE_NULL_COPY_FN( type, type_keyval, extra_state, &
99+
subroutine MPI_TYPE_NULL_COPY_FN( datatype, type_keyval, extra_state, &
100100
attribute_val_in, attribute_val_out, &
101101
flag, ierr )
102102
implicit none
103103
include 'mpif-config.h'
104-
integer :: type
104+
integer :: datatype
105105
integer :: type_keyval
106106
integer(kind=MPI_ADDRESS_KIND) :: extra_state, attribute_val_in, attribute_val_out
107107
integer :: ierr
108108
logical :: flag
109109
end subroutine MPI_TYPE_NULL_COPY_FN
110110

111-
subroutine MPI_TYPE_NULL_DELETE_FN( type, type_keyval, attribute_val_out, &
111+
subroutine MPI_TYPE_NULL_DELETE_FN( datatype, type_keyval, attribute_val_out, &
112112
extra_state, ierr )
113113
implicit none
114114
include 'mpif-config.h'
115-
integer :: type
115+
integer :: datatype
116116
integer :: type_keyval
117117
integer(kind=MPI_ADDRESS_KIND) :: attribute_val_out, extra_state
118118
integer :: ierr

ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
! of Tennessee Research Foundation. All rights
88
! reserved.
99
! Copyright (c) 2012 Inria. All rights reserved.
10-
! Copyright (c) 2015 Research Organization for Information Science
11-
! and Technology (RIST). All rights reserved.
10+
! Copyright (c) 2015-2018 Research Organization for Information Science
11+
! and Technology (RIST). All rights reserved.
1212
! $COPYRIGHT$
1313
!
1414
! This file provides the interface specifications for the MPI Fortran
@@ -655,10 +655,10 @@ subroutine ompi_type_create_subarray_f(ndims,array_of_sizes, &
655655
INTEGER, INTENT(OUT) :: ierror
656656
end subroutine ompi_type_create_subarray_f
657657

658-
subroutine ompi_type_dup_f(type,newtype,ierror) &
658+
subroutine ompi_type_dup_f(oldtype,newtype,ierror) &
659659
BIND(C, name="ompi_type_dup_f")
660660
implicit none
661-
INTEGER, INTENT(IN) :: type
661+
INTEGER, INTENT(IN) :: oldtype
662662
INTEGER, INTENT(OUT) :: newtype
663663
INTEGER, INTENT(OUT) :: ierror
664664
end subroutine ompi_type_dup_f
@@ -1536,10 +1536,10 @@ subroutine ompi_type_create_keyval_f(type_copy_attr_fn,type_delete_attr_fn, &
15361536
INTEGER, INTENT(OUT) :: ierror
15371537
end subroutine ompi_type_create_keyval_f
15381538

1539-
subroutine ompi_type_delete_attr_f(type,type_keyval,ierror) &
1539+
subroutine ompi_type_delete_attr_f(datatype,type_keyval,ierror) &
15401540
BIND(C, name="ompi_type_delete_attr_f")
15411541
implicit none
1542-
INTEGER, INTENT(IN) :: type
1542+
INTEGER, INTENT(IN) :: datatype
15431543
INTEGER, INTENT(IN) :: type_keyval
15441544
INTEGER, INTENT(OUT) :: ierror
15451545
end subroutine ompi_type_delete_attr_f
@@ -1551,32 +1551,32 @@ subroutine ompi_type_free_keyval_f(type_keyval,ierror) &
15511551
INTEGER, INTENT(OUT) :: ierror
15521552
end subroutine ompi_type_free_keyval_f
15531553

1554-
subroutine ompi_type_get_name_f(type,type_name,resultlen,ierror,type_name_len) &
1554+
subroutine ompi_type_get_name_f(datatype,type_name,resultlen,ierror,type_name_len) &
15551555
BIND(C, name="ompi_type_get_name_f")
15561556
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
15571557
implicit none
1558-
INTEGER, INTENT(IN) :: type
1558+
INTEGER, INTENT(IN) :: datatype
15591559
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: type_name
15601560
INTEGER, INTENT(OUT) :: resultlen
15611561
INTEGER, INTENT(OUT) :: ierror
15621562
INTEGER, VALUE, INTENT(IN) :: type_name_len
15631563
end subroutine ompi_type_get_name_f
15641564

1565-
subroutine ompi_type_set_attr_f(type,type_keyval,attribute_val,ierror) &
1565+
subroutine ompi_type_set_attr_f(datatype,type_keyval,attribute_val,ierror) &
15661566
BIND(C, name="ompi_type_set_attr_f")
15671567
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
15681568
implicit none
1569-
INTEGER, INTENT(IN) :: type
1569+
INTEGER, INTENT(IN) :: datatype
15701570
INTEGER, INTENT(IN) :: type_keyval
15711571
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: attribute_val
15721572
INTEGER, INTENT(OUT) :: ierror
15731573
end subroutine ompi_type_set_attr_f
15741574

1575-
subroutine ompi_type_set_name_f(type,type_name,ierror,type_name_len) &
1575+
subroutine ompi_type_set_name_f(datatype,type_name,ierror,type_name_len) &
15761576
BIND(C, name="ompi_type_set_name_f")
15771577
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
15781578
implicit none
1579-
INTEGER, INTENT(IN) :: type
1579+
INTEGER, INTENT(IN) :: datatype
15801580
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: type_name
15811581
INTEGER, INTENT(OUT) :: ierror
15821582
INTEGER, VALUE, INTENT(IN) :: type_name_len
@@ -3256,11 +3256,11 @@ subroutine ompi_type_create_f90_real_f(p,r,newtype,ierror) &
32563256
INTEGER, INTENT(OUT) :: ierror
32573257
end subroutine ompi_type_create_f90_real_f
32583258

3259-
subroutine ompi_type_match_size_f(typeclass,size,type,ierror) &
3259+
subroutine ompi_type_match_size_f(typeclass,size,datatype,ierror) &
32603260
BIND(C, name="ompi_type_match_size_f")
32613261
implicit none
32623262
INTEGER, INTENT(IN) :: typeclass, size
3263-
INTEGER, INTENT(OUT) :: type
3263+
INTEGER, INTENT(OUT) :: datatype
32643264
INTEGER, INTENT(OUT) :: ierror
32653265
end subroutine ompi_type_match_size_f
32663266

ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces-callbacks.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
33
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
44
! All rights reserved.
5-
! Copyright (c) 2015-2016 Research Organization for Information Science
6-
! and Technology (RIST). All rights reserved.
5+
! Copyright (c) 2015-2018 Research Organization for Information Science
6+
! and Technology (RIST). All rights reserved.
77
! $COPYRIGHT$
88

99
#include "ompi/mpi/fortran/configure-fortran-output.h"
@@ -23,13 +23,13 @@ SUBROUTINE MPI_User_function(invec, inoutvec, len, datatype)
2323

2424
!Example of a user defined callback function
2525
!
26-
! subroutine my_user_function( invec, inoutvec, len, type ) bind(c)
26+
! subroutine my_user_function( invec, inoutvec, len, datatype ) bind(c)
2727
! use, intrinsic :: iso_c_binding, only : c_ptr, c_f_pointer
2828
! type(c_ptr), value :: invec, inoutvec
2929
! integer, intent(in) :: len
30-
! type(MPI_Datatype) :: type
30+
! type(MPI_Datatype) :: datatype
3131
! real, pointer :: invec_r(:), inoutvec_r(:)
32-
! if (type%MPI_VAL == MPI_REAL%MPI_VAL) then
32+
! if (datatype%MPI_VAL == MPI_REAL%MPI_VAL) then
3333
! call c_f_pointer(invec, invec_r, (/ len /) )
3434
! call c_f_pointer(inoutvec, inoutvec_r, (/ len /) )
3535
! inoutvec_r = invec_r + inoutvec_r

ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
! of Tennessee Research Foundation. All rights
88
! reserved.
99
! Copyright (c) 2012 Inria. All rights reserved.
10-
! Copyright (c) 2015 Research Organization for Information Science
11-
! and Technology (RIST). All rights reserved.
10+
! Copyright (c) 2015-2018 Research Organization for Information Science
11+
! and Technology (RIST). All rights reserved.
1212
! $COPYRIGHT$
1313
!
1414
! This file provides the interface specifications for the MPI Fortran
@@ -560,10 +560,10 @@ subroutine pompi_type_create_subarray_f(ndims,array_of_sizes, &
560560
INTEGER, INTENT(OUT) :: ierror
561561
end subroutine pompi_type_create_subarray_f
562562

563-
subroutine pompi_type_dup_f(type,newtype,ierror) &
563+
subroutine pompi_type_dup_f(oldtype,newtype,ierror) &
564564
BIND(C, name="pompi_type_dup_f")
565565
implicit none
566-
INTEGER, INTENT(IN) :: type
566+
INTEGER, INTENT(IN) :: oldtype
567567
INTEGER, INTENT(OUT) :: newtype
568568
INTEGER, INTENT(OUT) :: ierror
569569
end subroutine pompi_type_dup_f
@@ -1370,10 +1370,10 @@ subroutine pompi_type_create_keyval_f(type_copy_attr_fn,type_delete_attr_fn, &
13701370
INTEGER, INTENT(OUT) :: ierror
13711371
end subroutine pompi_type_create_keyval_f
13721372

1373-
subroutine pompi_type_delete_attr_f(type,type_keyval,ierror) &
1373+
subroutine pompi_type_delete_attr_f(datatype,type_keyval,ierror) &
13741374
BIND(C, name="pompi_type_delete_attr_f")
13751375
implicit none
1376-
INTEGER, INTENT(IN) :: type
1376+
INTEGER, INTENT(IN) :: datatype
13771377
INTEGER, INTENT(IN) :: type_keyval
13781378
INTEGER, INTENT(OUT) :: ierror
13791379
end subroutine pompi_type_delete_attr_f
@@ -1385,32 +1385,32 @@ subroutine pompi_type_free_keyval_f(type_keyval,ierror) &
13851385
INTEGER, INTENT(OUT) :: ierror
13861386
end subroutine pompi_type_free_keyval_f
13871387

1388-
subroutine pompi_type_get_name_f(type,type_name,resultlen,ierror,type_name_len) &
1388+
subroutine pompi_type_get_name_f(datatype,type_name,resultlen,ierror,type_name_len) &
13891389
BIND(C, name="pompi_type_get_name_f")
13901390
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
13911391
implicit none
1392-
INTEGER, INTENT(IN) :: type
1392+
INTEGER, INTENT(IN) :: datatype
13931393
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: type_name
13941394
INTEGER, INTENT(OUT) :: resultlen
13951395
INTEGER, INTENT(OUT) :: ierror
13961396
INTEGER, VALUE, INTENT(IN) :: type_name_len
13971397
end subroutine pompi_type_get_name_f
13981398

1399-
subroutine pompi_type_set_attr_f(type,type_keyval,attribute_val,ierror) &
1399+
subroutine pompi_type_set_attr_f(datatype,type_keyval,attribute_val,ierror) &
14001400
BIND(C, name="pompi_type_set_attr_f")
14011401
use :: mpi_f08_types, only : MPI_ADDRESS_KIND
14021402
implicit none
1403-
INTEGER, INTENT(IN) :: type
1403+
INTEGER, INTENT(IN) :: datatype
14041404
INTEGER, INTENT(IN) :: type_keyval
14051405
INTEGER(MPI_ADDRESS_KIND), INTENT(IN) :: attribute_val
14061406
INTEGER, INTENT(OUT) :: ierror
14071407
end subroutine pompi_type_set_attr_f
14081408

1409-
subroutine pompi_type_set_name_f(type,type_name,ierror,type_name_len) &
1409+
subroutine pompi_type_set_name_f(datatype,type_name,ierror,type_name_len) &
14101410
BIND(C, name="pompi_type_set_name_f")
14111411
use, intrinsic :: ISO_C_BINDING, only : C_CHAR
14121412
implicit none
1413-
INTEGER, INTENT(IN) :: type
1413+
INTEGER, INTENT(IN) :: datatype
14141414
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: type_name
14151415
INTEGER, INTENT(OUT) :: ierror
14161416
INTEGER, VALUE, INTENT(IN) :: type_name_len
@@ -3039,11 +3039,11 @@ subroutine pompi_type_create_f90_real_f(p,r,newtype,ierror) &
30393039
INTEGER, INTENT(OUT) :: ierror
30403040
end subroutine pompi_type_create_f90_real_f
30413041

3042-
subroutine pompi_type_match_size_f(typeclass,size,type,ierror) &
3042+
subroutine pompi_type_match_size_f(typeclass,size,datatype,ierror) &
30433043
BIND(C, name="pompi_type_match_size_f")
30443044
implicit none
30453045
INTEGER, INTENT(IN) :: typeclass, size
3046-
INTEGER, INTENT(OUT) :: type
3046+
INTEGER, INTENT(OUT) :: datatype
30473047
INTEGER, INTENT(OUT) :: ierror
30483048
end subroutine pompi_type_match_size_f
30493049

ompi/mpi/fortran/use-mpi-f08/profile/ptype_delete_attr_f08.F90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
44
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
55
! All rights reserved.
6+
! Copyright (c) 2018 Research Organization for Information Science
7+
! and Technology (RIST). All rights reserved.
68
! $COPYRIGHT$
79

8-
subroutine PMPI_Type_delete_attr_f08(type,type_keyval,ierror)
10+
subroutine PMPI_Type_delete_attr_f08(datatype,type_keyval,ierror)
911
use :: mpi_f08_types, only : MPI_Datatype
1012
use :: mpi_f08, only : ompi_type_delete_attr_f
1113
implicit none
12-
TYPE(MPI_Datatype), INTENT(IN) :: type
14+
TYPE(MPI_Datatype), INTENT(IN) :: datatype
1315
INTEGER, INTENT(IN) :: type_keyval
1416
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1517
integer :: c_ierror
1618

17-
call ompi_type_delete_attr_f(type%MPI_VAL,type_keyval,c_ierror)
19+
call ompi_type_delete_attr_f(datatype%MPI_VAL,type_keyval,c_ierror)
1820
if (present(ierror)) ierror = c_ierror
1921

2022
end subroutine PMPI_Type_delete_attr_f08

ompi/mpi/fortran/use-mpi-f08/profile/ptype_dup_f08.F90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
44
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
55
! All rights reserved.
6+
! Copyright (c) 2018 Research Organization for Information Science
7+
! and Technology (RIST). All rights reserved.
68
! $COPYRIGHT$
79

8-
subroutine PMPI_Type_dup_f08(type,newtype,ierror)
10+
subroutine PMPI_Type_dup_f08(oldtype,newtype,ierror)
911
use :: mpi_f08_types, only : MPI_Datatype
1012
use :: mpi_f08, only : ompi_type_dup_f
1113
implicit none
12-
TYPE(MPI_Datatype), INTENT(IN) :: type
14+
TYPE(MPI_Datatype), INTENT(IN) :: oldtype
1315
TYPE(MPI_Datatype), INTENT(OUT) :: newtype
1416
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1517
integer :: c_ierror
1618

17-
call ompi_type_dup_f(type%MPI_VAL,newtype%MPI_VAL,c_ierror)
19+
call ompi_type_dup_f(oldtype%MPI_VAL,newtype%MPI_VAL,c_ierror)
1820
if (present(ierror)) ierror = c_ierror
1921

2022
end subroutine PMPI_Type_dup_f08

ompi/mpi/fortran/use-mpi-f08/profile/ptype_get_attr_f08.F90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@
33
! Copyright (c) 2009-2013 Cisco Systems, Inc. All rights reserved.
44
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
55
! All rights reserved.
6+
! Copyright (c) 2018 Research Organization for Information Science
7+
! and Technology (RIST). All rights reserved.
68
! $COPYRIGHT$
79

8-
subroutine PMPI_Type_get_attr_f08(type,type_keyval,attribute_val,flag,ierror)
10+
subroutine PMPI_Type_get_attr_f08(datatype,type_keyval,attribute_val,flag,ierror)
911
use :: mpi_f08_types, only : MPI_Datatype, MPI_ADDRESS_KIND
1012
! See note in mpi-f-interfaces-bind.h for why we "use mpi" here and
1113
! call a PMPI_* subroutine below.
1214
use :: mpi, only : PMPI_Type_get_attr
1315
implicit none
14-
TYPE(MPI_Datatype), INTENT(IN) :: type
16+
TYPE(MPI_Datatype), INTENT(IN) :: datatype
1517
INTEGER, INTENT(IN) :: type_keyval
1618
INTEGER(MPI_ADDRESS_KIND), INTENT(OUT) :: attribute_val
1719
LOGICAL, INTENT(OUT) :: flag
1820
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1921
integer :: c_ierror
2022

21-
call PMPI_Type_get_attr(type%MPI_VAL,type_keyval,attribute_val,flag,c_ierror)
23+
call PMPI_Type_get_attr(datatype%MPI_VAL,type_keyval,attribute_val,flag,c_ierror)
2224
if (present(ierror)) ierror = c_ierror
2325
end subroutine PMPI_Type_get_attr_f08

ompi/mpi/fortran/use-mpi-f08/profile/ptype_get_name_f08.F90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@
33
! Copyright (c) 2010-2011 Cisco Systems, Inc. All rights reserved.
44
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
55
! All rights reserved.
6+
! Copyright (c) 2018 Research Organization for Information Science
7+
! and Technology (RIST). All rights reserved.
68
! $COPYRIGHT$
79

8-
subroutine PMPI_Type_get_name_f08(type,type_name,resultlen,ierror)
10+
subroutine PMPI_Type_get_name_f08(datatype,type_name,resultlen,ierror)
911
use :: mpi_f08_types, only : MPI_Datatype, MPI_MAX_OBJECT_NAME
1012
use :: mpi_f08, only : ompi_type_get_name_f
1113
implicit none
12-
TYPE(MPI_Datatype), INTENT(IN) :: type
14+
TYPE(MPI_Datatype), INTENT(IN) :: datatype
1315
CHARACTER(LEN=*), INTENT(OUT) :: type_name
1416
INTEGER, INTENT(OUT) :: resultlen
1517
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1618
integer :: c_ierror
1719

18-
call ompi_type_get_name_f(type%MPI_VAL,type_name,resultlen,c_ierror,len(type_name))
20+
call ompi_type_get_name_f(datatype%MPI_VAL,type_name,resultlen,c_ierror,len(type_name))
1921
if (present(ierror)) ierror = c_ierror
2022

2123
end subroutine PMPI_Type_get_name_f08

ompi/mpi/fortran/use-mpi-f08/profile/ptype_match_size_f08.F90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@
33
! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
44
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
55
! All Rights reserved.
6+
! Copyright (c) 2018 Research Organization for Information Science
7+
! and Technology (RIST). All rights reserved.
68
! $COPYRIGHT$
79

8-
subroutine PMPI_Type_match_size_f08(typeclass,size,type,ierror)
10+
subroutine PMPI_Type_match_size_f08(typeclass,size,datatype,ierror)
911
use :: mpi_f08_types, only : MPI_Datatype
1012
use :: mpi_f08, only : ompi_type_match_size_f
1113
implicit none
1214
INTEGER, INTENT(IN) :: typeclass, size
13-
TYPE(MPI_Datatype), INTENT(OUT) :: type
15+
TYPE(MPI_Datatype), INTENT(OUT) :: datatype
1416
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
1517
integer :: c_ierror
1618

17-
call ompi_type_match_size_f(typeclass,size,type%MPI_VAL,c_ierror)
19+
call ompi_type_match_size_f(typeclass,size,datatype%MPI_VAL,c_ierror)
1820
if (present(ierror)) ierror = c_ierror
1921

2022
end subroutine PMPI_Type_match_size_f08

0 commit comments

Comments
 (0)