Skip to content

Commit 5de3d5d

Browse files
committed
Fix MPI_SIZEOF for gfortran 4.8
Add copyrights. Revise the README to take out the 'most notably' statement about GNU Fortran 4.8 Signed-off-by: Chris Ward <[email protected]>
1 parent 1bc366b commit 5de3d5d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Copyright (c) 2013-2015 Intel, Inc. All rights reserved
1919
Copyright (c) 2015 NVIDIA Corporation. All rights reserved.
2020
Copyright (c) 2017 Los Alamos National Security, LLC. All rights
2121
reserved.
22+
Copyright (c) 2017 IBM Corporation. All rights reserved
2223

2324
$COPYRIGHT$
2425

@@ -365,8 +366,7 @@ Compiler Notes
365366
- All Fortran compilers support the mpif.h/shmem.fh-based bindings,
366367
with one exception: the MPI_SIZEOF interfaces will only be present
367368
when Open MPI is built with a Fortran compiler that support the
368-
INTERFACE keyword and ISO_FORTRAN_ENV. Most notably, this
369-
excludes the GNU Fortran compiler suite before version 4.9.
369+
INTERFACE keyword and ISO_FORTRAN_ENV.
370370

371371
- The level of support provided by the mpi module is based on your
372372
Fortran compiler.

config/ompi_fortran_check_storage_size.m4

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dnl University of Stuttgart. All rights reserved.
1111
dnl Copyright (c) 2004-2005 The Regents of the University of California.
1212
dnl All rights reserved.
1313
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
14+
dnl Copyright (c) 2017 IBM Corporation. All rights reserved.
1415
dnl $COPYRIGHT$
1516
dnl
1617
dnl Additional copyrights may follow
@@ -61,7 +62,7 @@ SUBROUTINE storage_size_complex32_r1(x, size)
6162
COMPLEX(REAL32), DIMENSION(*)::x
6263
INTEGER, INTENT(OUT) :: size
6364

64-
size = storage_size(x) / 8
65+
size = storage_size(x(1)) / 8
6566
END SUBROUTINE storage_size_complex32_r1
6667

6768
SUBROUTINE storage_size_int32_scalar(x, size)
@@ -77,7 +78,7 @@ SUBROUTINE storage_size_int32_r1(x, size)
7778
INTEGER(INT32), DIMENSION(*)::x
7879
INTEGER, INTENT(OUT) :: size
7980

80-
size = storage_size(x) / 8
81+
size = storage_size(x(1)) / 8
8182
END SUBROUTINE storage_size_int32_r1
8283

8384
SUBROUTINE storage_size_real32_scalar(x, size)
@@ -93,7 +94,7 @@ SUBROUTINE storage_size_real32_r1(x, size)
9394
REAL(REAL32), DIMENSION(*)::x
9495
INTEGER, INTENT(OUT) :: size
9596

96-
size = storage_size(x) / 8
97+
size = storage_size(x(1)) / 8
9798
END SUBROUTINE storage_size_real32_r1
9899
]])],
99100
[AS_VAR_SET(fortran_storage_size_var, yes)],

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Copyright (c) 2014-2015 Cisco Systems, Inc. All rights reserved.
44
# Copyright (c) 2015 Research Organization for Information Science
55
# and Technology (RIST). All rights reserved.
6+
# Copyright (c) 2017 IBM Corporation. All rights reserved.
67
# $COPYRIGHT$
78
#
89
# Script to generate the overloaded MPI_SIZEOF interfaces and
@@ -97,7 +98,7 @@ sub queue_sub {
9798
${indent} INTEGER, INTENT(OUT) :: size
9899
${indent} INTEGER$optional_ierror_param, INTENT(OUT) :: ierror";
99100
$subr->{start} = $start;
100-
$subr->{middle} = "${indent} size = storage_size(x) / 8
101+
$subr->{middle} = "${indent} size = storage_size(xSUBSCRIPT) / 8
101102
${indent} ${optional_ierror_statement}ierror = 0";
102103
$subr->{end} = "${indent}END SUBROUTINE ^PREFIX^$sub_name^RANK^";
103104

@@ -126,6 +127,7 @@ sub generate {
126127
if (0 == $rank) {
127128
$str =~ s/\^RANK\^/_scalar/g;
128129
$str =~ s/\^DIMENSION\^//;
130+
$str =~ s/SUBSCRIPT//;
129131
} else {
130132
$str =~ s/\^RANK\^/_r$rank/g;
131133
my $dim;
@@ -135,6 +137,7 @@ sub generate {
135137
--$d;
136138
}
137139
$str =~ s/\^DIMENSION\^/, DIMENSION($dim*)/;
140+
$str =~ s/SUBSCRIPT/($dim 1)/;
138141
}
139142

140143
# All done

0 commit comments

Comments
 (0)