Skip to content

Commit e59e6f7

Browse files
authored
Merge pull request #7105 from ggouaillardet/topic/f08_bind_c_constants_revamp
fortran/use-mpi-f08: revamp mpi_f08 constants
2 parents aa8be9c + 51e23f8 commit e59e6f7

File tree

12 files changed

+157
-500
lines changed

12 files changed

+157
-500
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ ompi/mpi/fortran/mpif-h/sizeof_f.f90
213213
ompi/mpi/fortran/mpif-h/profile/p*.c
214214
ompi/mpi/fortran/mpif-h/profile/psizeof_f.f90
215215

216-
ompi/mpi/fortran/use-mpi-f08/constants.h
216+
ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-constants.h
217217
ompi/mpi/fortran/use-mpi-f08/sizeof_f08.f90
218218
ompi/mpi/fortran/use-mpi-f08/sizeof_f08.h
219219
ompi/mpi/fortran/use-mpi-f08/profile/psizeof_f08.f90

config/ompi_fortran_check_protected.m4

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

config/ompi_setup_mpi_fortran.m4

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ dnl Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
1515
dnl Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
1616
dnl reserved.
1717
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
18-
dnl Copyright (c) 2014-2017 Research Organization for Information Science
19-
dnl and Technology (RIST). All rights reserved.
18+
dnl Copyright (c) 2014-2019 Research Organization for Information Science
19+
dnl and Technology (RIST). All rights reserved.
2020
dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
2121
dnl Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
2222
dnl $COPYRIGHT$
@@ -487,14 +487,6 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
487487
[OMPI_FORTRAN_HAVE_PRIVATE=1],
488488
[OMPI_FORTRAN_HAVE_PRIVATE=0])])
489489

490-
OMPI_FORTRAN_HAVE_PROTECTED=0
491-
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
492-
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
493-
[ # Does the compiler support "protected"
494-
OMPI_FORTRAN_CHECK_PROTECTED(
495-
[OMPI_FORTRAN_HAVE_PROTECTED=1],
496-
[OMPI_FORTRAN_HAVE_PROTECTED=0])])
497-
498490
OMPI_FORTRAN_HAVE_ABSTRACT=0
499491
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
500492
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
@@ -754,12 +746,6 @@ end type test_mpi_handle],
754746
[$OMPI_FORTRAN_HAVE_PRIVATE],
755747
[For mpi-f08-types.f90 and ompi_info: whether the compiler supports the "private" keyword or not (used in MPI_Status)])
756748

757-
# For configure-fortran-output.h, mpi-f08-types.F90 (and ompi_info)
758-
AC_SUBST([OMPI_FORTRAN_HAVE_PROTECTED])
759-
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PROTECTED],
760-
[$OMPI_FORTRAN_HAVE_PROTECTED],
761-
[For mpi-f08-types.f90 and .F90 and ompi_info: whether the compiler supports the "protected" keyword or not])
762-
763749
# For configure-fortran-output.h, mpi-f08-interfaces-callbacks.F90
764750
# (and ompi_info)
765751
AC_SUBST([OMPI_FORTRAN_HAVE_ABSTRACT])

ompi/include/mpif-values.pl

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env perl
22
#
33
# Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
4-
# Copyright (c) 2016-2017 Research Organization for Information Science
5-
# and Technology (RIST). All rights reserved.
4+
# Copyright (c) 2016-2019 Research Organization for Information Science
5+
# and Technology (RIST). All rights reserved.
66
# Copyright (c) 2016-2018 FUJITSU LIMITED. All rights reserved.
77
# $COPYRIGHT$
88
#
@@ -469,35 +469,35 @@ sub write_fortran_file {
469469

470470
# Create preprocessor files
471471

472-
my $output = '/* WARNING! THIS IS A GENERATED FILE!!
473-
* ANY EDITS YOU PUT HERE WILL BE LOST!
474-
* Instead, edit topdir/ompi/include/mpif-values.pl
475-
*/
476-
477-
/*
478-
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
479-
* University Research and Technology
480-
* Corporation. All rights reserved.
481-
* Copyright (c) 2004-2006 The University of Tennessee and The University
482-
* of Tennessee Research Foundation. All rights
483-
* reserved.
484-
* Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
485-
* University of Stuttgart. All rights reserved.
486-
* Copyright (c) 2004-2005 The Regents of the University of California.
487-
* All rights reserved.
488-
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
489-
* Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
490-
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
491-
* Copyright (c) 2009-2012 Los Alamos National Security, LLC.
492-
* All rights reserved.
493-
* Copyright (c) 2016 Research Organization for Information Science
494-
* and Technology (RIST). All rights reserved.
495-
* $COPYRIGHT$
496-
*
497-
* Additional copyrights may follow
498-
*
499-
* $HEADER$
500-
*/
472+
my $output = '! WARNING! THIS IS A GENERATED FILE!!
473+
! ANY EDITS YOU PUT HERE WILL BE LOST!
474+
! Instead, edit topdir/ompi/include/mpif-values.pl
475+
!
476+
477+
!
478+
! Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
479+
! University Research and Technology
480+
! Corporation. All rights reserved.
481+
! Copyright (c) 2004-2006 The University of Tennessee and The University
482+
! of Tennessee Research Foundation. All rights
483+
! reserved.
484+
! Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
485+
! University of Stuttgart. All rights reserved.
486+
! Copyright (c) 2004-2005 The Regents of the University of California.
487+
! All rights reserved.
488+
! Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
489+
! Copyright (c) 2008-2009 Sun Microsystems, Inc. All rights reserved.
490+
! Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
491+
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
492+
! All rights reserved.
493+
! Copyright (c) 2016-2019 Research Organization for Information Science
494+
! and Technology (RIST). All rights reserved.
495+
! $COPYRIGHT$
496+
!
497+
! Additional copyrights may follow
498+
!
499+
! $HEADER$
500+
!
501501
502502
#ifndef USE_MPI_F08_CONSTANTS_H
503503
#define USE_MPI_F08_CONSTANTS_H
@@ -523,8 +523,8 @@ sub write_fortran_file {
523523
$output .= "#define OMPI_$key $io_handles->{$key}\n";
524524
}
525525
$output .= "\n";
526-
$output .= "#endif /* USE_MPI_F08_CONSTANTS_H */\n";
526+
$output .= "#endif\n";
527527

528-
write_file("$topdir/ompi/mpi/fortran/use-mpi-f08/constants.h", $output);
528+
write_file("$topdir/ompi/mpi/fortran/use-mpi-f08/mod/mpi-f08-constants.h", $output);
529529

530530
exit(0);

ompi/mpi/fortran/common_sym_whitelist.txt

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

ompi/mpi/fortran/configure-fortran-output-bottom.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,4 @@
3838
#define OMPI_PRIVATE
3939
#endif
4040
41-
! PROTECTED or not
42-
#if OMPI_FORTRAN_HAVE_PROTECTED
43-
#define OMPI_PROTECTED , PROTECTED
44-
#else
45-
#define OMPI_PROTECTED
46-
#endif
47-
4841
#endif

ompi/mpi/fortran/use-mpi-f08/Makefile.am

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -802,9 +802,7 @@ lib@OMPI_LIBMPI_NAME@_usempif08_la_SOURCES = \
802802
$(mpi_api_files) \
803803
$(pmpi_api_files) \
804804
mpi-f08.F90 \
805-
buffer_detach.c \
806-
constants.h \
807-
constants.c
805+
buffer_detach.c
808806

809807
# These are generated; do not ship them
810808
nodist_lib@OMPI_LIBMPI_NAME@_usempif08_la_SOURCES =

0 commit comments

Comments
 (0)