Skip to content

Commit 7fbd1af

Browse files
authored
Merge pull request #2279 from ggouaillardet/topic/v2.x/fortran_and_misc_fixes
v2.x: fortran and misc fixes
2 parents 27a6b39 + f27d0db commit 7fbd1af

File tree

5 files changed

+32
-101
lines changed

5 files changed

+32
-101
lines changed

ompi/include/mpif-mpi-io.h

Lines changed: 0 additions & 85 deletions
This file was deleted.

ompi/include/mpif-values.pl

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ sub write_file {
8686
#----------------------------------------------------------------------------
8787

8888
my $handles;
89+
my $lhandles;
8990

9091
$handles->{MPI_COMM_WORLD} = 0;
9192
$handles->{MPI_COMM_SELF} = 1;
@@ -398,7 +399,9 @@ sub write_file {
398399
$io_constants->{MPI_MODE_EXCL} = 64;
399400
$io_constants->{MPI_MODE_APPEND} = 128;
400401
$io_constants->{MPI_MODE_SEQUENTIAL} = 256;
401-
$io_constants->{MPI_DISPLACEMENT_CURRENT} = -54278278;
402+
403+
my $lio_constants;
404+
$lio_constants->{MPI_DISPLACEMENT_CURRENT} = -54278278;
402405

403406
#----------------------------------------------------------------------------
404407

@@ -421,6 +424,8 @@ sub write_file {
421424
! All rights reserved.
422425
! Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
423426
! Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
427+
! Copyright (c) 2016 Research Organization for Information Science
428+
! and Technology (RIST). All rights reserved.
424429
! $COPYRIGHT$
425430
!
426431
! Additional copyrights may follow
@@ -431,26 +436,32 @@ sub write_file {
431436
';
432437

433438
sub write_fortran_file {
434-
my ($header, $vals, $file) = @_;
439+
my ($header, $vals, $lvals, $file) = @_;
435440

436441
foreach my $key (sort(keys(%{$vals}))) {
437442
$header .= " integer $key\n";
438443
}
444+
foreach my $key (sort(keys(%{$lvals}))) {
445+
$header .= " integer(KIND=MPI_OFFSET_KIND) $key\n";
446+
}
439447
$header .= "\n";
440448
foreach my $key (sort(keys(%{$vals}))) {
441449
$header .= " parameter ($key=$vals->{$key})\n";
442450
}
451+
foreach my $key (sort(keys(%{$lvals}))) {
452+
$header .= " parameter ($key=$lvals->{$key})\n";
453+
}
443454

444455
write_file($file, $header);
445456
}
446457

447-
write_fortran_file($header, $handles,
458+
write_fortran_file($header, $handles, {},
448459
"$topdir/ompi/include/mpif-handles.h");
449-
write_fortran_file($header, $constants,
460+
write_fortran_file($header, $constants, {},
450461
"$topdir/ompi/include/mpif-constants.h");
451-
write_fortran_file($header, $io_handles,
462+
write_fortran_file($header, $io_handles, {},
452463
"$topdir/ompi/include/mpif-io-handles.h");
453-
write_fortran_file($header, $io_constants,
464+
write_fortran_file($header, $io_constants, $lio_constants,
454465
"$topdir/ompi/include/mpif-io-constants.h");
455466

456467
#----------------------------------------------------------------------------
@@ -478,6 +489,8 @@ sub write_fortran_file {
478489
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
479490
* Copyright (c) 2009-2012 Los Alamos National Security, LLC.
480491
* All rights reserved.
492+
* Copyright (c) 2016 Research Organization for Information Science
493+
* and Technology (RIST). All rights reserved.
481494
* $COPYRIGHT$
482495
*
483496
* Additional copyrights may follow
@@ -502,6 +515,9 @@ sub write_fortran_file {
502515
foreach my $key (sort(keys(%{$io_constants}))) {
503516
$output .= "#define OMPI_$key $io_constants->{$key}\n";
504517
}
518+
foreach my $key (sort(keys(%{$lio_constants}))) {
519+
$output .= "#define OMPI_$key $lio_constants->{$key}\n";
520+
}
505521
$output .= "\n";
506522
foreach my $key (sort(keys(%{$io_handles}))) {
507523
$output .= "#define OMPI_$key $io_handles->{$key}\n";

ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h.in

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,27 +1002,27 @@ end interface
10021002

10031003
interface MPI_File_read_ordered_begin
10041004

1005-
subroutine MPI_File_read_ord_begin(fh, buf, count, datatype, ierror)
1005+
subroutine MPI_File_read_ordered_begin(fh, buf, count, datatype, ierror)
10061006
integer, intent(in) :: fh
10071007
@OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf
10081008
@OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf
10091009
integer, intent(in) :: count
10101010
integer, intent(in) :: datatype
10111011
integer, intent(out) :: ierror
1012-
end subroutine MPI_File_read_ord_begin
1012+
end subroutine MPI_File_read_ordered_begin
10131013

10141014
end interface
10151015

10161016
interface PMPI_File_read_ordered_begin
10171017

1018-
subroutine PMPI_File_read_ord_begin(fh, buf, count, datatype, ierror)
1018+
subroutine PMPI_File_read_ordered_begin(fh, buf, count, datatype, ierror)
10191019
integer, intent(in) :: fh
10201020
@OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf
10211021
@OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf
10221022
integer, intent(in) :: count
10231023
integer, intent(in) :: datatype
10241024
integer, intent(out) :: ierror
1025-
end subroutine PMPI_File_read_ord_begin
1025+
end subroutine PMPI_File_read_ordered_begin
10261026

10271027
end interface
10281028

@@ -1467,7 +1467,7 @@ end interface
14671467

14681468
interface MPI_File_write_at_all_begin
14691469

1470-
subroutine MPI_File_wr_at_all_begin(fh, offset, buf, count, datatype&
1470+
subroutine MPI_File_write_at_all_begin(fh, offset, buf, count, datatype&
14711471
, ierror)
14721472
include 'mpif-config.h'
14731473
integer, intent(in) :: fh
@@ -1477,13 +1477,13 @@ subroutine MPI_File_wr_at_all_begin(fh, offset, buf, count, datatype&
14771477
integer, intent(in) :: count
14781478
integer, intent(in) :: datatype
14791479
integer, intent(out) :: ierror
1480-
end subroutine MPI_File_wr_at_all_begin
1480+
end subroutine MPI_File_write_at_all_begin
14811481

14821482
end interface
14831483

14841484
interface PMPI_File_write_at_all_begin
14851485

1486-
subroutine PMPI_File_wr_at_all_begin(fh, offset, buf, count, datatype&
1486+
subroutine PMPI_File_write_at_all_begin(fh, offset, buf, count, datatype&
14871487
, ierror)
14881488
include 'mpif-config.h'
14891489
integer, intent(in) :: fh
@@ -1493,7 +1493,7 @@ subroutine PMPI_File_wr_at_all_begin(fh, offset, buf, count, datatype&
14931493
integer, intent(in) :: count
14941494
integer, intent(in) :: datatype
14951495
integer, intent(out) :: ierror
1496-
end subroutine PMPI_File_wr_at_all_begin
1496+
end subroutine PMPI_File_write_at_all_begin
14971497

14981498
end interface
14991499

ompi/mpi/man/man3/MPI_Info_get_nkeys.3in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ MPI_Info_get
6060
.br
6161
MPI_Info_get_nthkey
6262
.br
63-
MPI_Info_get_valueln
63+
MPI_Info_get_valuelen
6464
.br
6565

ompi/mpi/man/man3/MPI_Info_get_nthkey.3in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ MPI_Info_get
6565
.br
6666
MPI_Info_get_nkeys
6767
.br
68-
MPI_Info_get_valueln
68+
MPI_Info_get_valuelen
6969
.br
7070

0 commit comments

Comments
 (0)