Skip to content

Commit 4de6c2a

Browse files
committed
gen-mpi-sizeof: distinguish between mpi and mpi_f08 versions
The mpi and mpi_f08 versions of MPI_Sizeof have a critical difference: ierr is required in the mpi subroutines, but optional in mpi_f08 subroutines. Make sure these specific subroutines therefore have different names. For the mpi_f08 version, add "_opt" in the specific subroutine name. Signed-off-by: Jeff Squyres <[email protected]>
1 parent ae8a549 commit 4de6c2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ompi/mpi/fortran/base/gen-mpi-sizeof.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@
7272

7373
#############################################################################
7474

75+
my $optional_name_modifier;
7576
my $optional_ierror_param;
7677
my $optional_ierror_statement;
7778
if (lc($ierror_arg) eq "optional") {
79+
$optional_name_modifier = "_opt";
7880
$optional_ierror_param = ", OPTIONAL";
7981
$optional_ierror_statement = "IF (present(ierror)) ";
8082
}
@@ -89,7 +91,7 @@ sub queue_sub {
8991
my ($f_type, $suffix, $import_type) = @_;
9092

9193
# Leave off the MPI/PMI prefix; we'll add that when outputting
92-
my $sub_name = "Sizeof_$suffix";
94+
my $sub_name = "Sizeof_$suffix$optional_name_modifier";
9395

9496
# Make a hash for this subroutine
9597
my $subr;

0 commit comments

Comments
 (0)