Skip to content

Commit 055df6f

Browse files
committed
fortran: correctly defines MPI_DISPLACEMENT_CURRENT with KIND=MPI_OFFSET_KIND
and remove unused ompi/include/mpif-mpi-io.h
1 parent e2769e4 commit 055df6f

File tree

2 files changed

+22
-91
lines changed

2 files changed

+22
-91
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";

0 commit comments

Comments
 (0)