Fortran: only emit real16 and complex32 if supported
This is the master version of @ggouaillardet's patch from open-mpi/ompi-release#148 (there was a minor conflict to fix and several fuzzings of line numbers).
Этот коммит содержится в:
родитель
ec632001b1
Коммит
cab1379dfb
@ -11,7 +11,7 @@
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
|
||||
# Copyright (c) 2014 Research Organization for Information Science
|
||||
# Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
@ -84,7 +84,9 @@ mpif-sizeof.h:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--header=$@ --ierror=mandatory \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
if WANT_INSTALL_HEADERS
|
||||
ompidir = $(ompiincludedir)
|
||||
|
@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Script to generate the overloaded MPI_SIZEOF interfaces and
|
||||
@ -30,17 +32,21 @@ my $ierror_arg;
|
||||
my $maxrank_arg;
|
||||
my $generate_arg;
|
||||
my $mpi_arg;
|
||||
my $mpi_real16;
|
||||
my $mpi_complex32;
|
||||
my $pmpi_arg;
|
||||
my $help_arg = 0;
|
||||
|
||||
&Getopt::Long::Configure("bundling");
|
||||
my $ok = Getopt::Long::GetOptions("header=s" => \$header_arg,
|
||||
my $ok = Getopt::Long::GetOptions("complex32=i" => \$mpi_complex32,
|
||||
"header=s" => \$header_arg,
|
||||
"impl=s" => \$impl_arg,
|
||||
"ierror=s" => \$ierror_arg,
|
||||
"maxrank=s" => \$maxrank_arg,
|
||||
"generate=i" => \$generate_arg,
|
||||
"mpi" => \$mpi_arg,
|
||||
"pmpi" => \$pmpi_arg,
|
||||
"real16=i" => \$mpi_real16,
|
||||
"help|h" => \$help_arg);
|
||||
|
||||
die "Must specify header and/or impl filenames to output"
|
||||
@ -54,6 +60,8 @@ die "max array rank must be >= 4 and <=15"
|
||||
die "Must specify --pmpi and/or --mpi if --impl is specified"
|
||||
if (defined($generate_arg) && $generate_arg &&
|
||||
(defined($impl_arg) && !defined($mpi_arg) && !defined($pmpi_arg)));
|
||||
die "Must specify real16 and complex32"
|
||||
if (!defined($mpi_real16) || !defined($mpi_complex32));
|
||||
|
||||
#############################################################################
|
||||
|
||||
@ -141,8 +149,12 @@ for my $size (qw/8 16 32 64/) {
|
||||
queue_sub("integer(int${size})", "int${size}", "int${size}");
|
||||
}
|
||||
for my $size (qw/32 64 128/) {
|
||||
queue_sub("real(real${size})", "real${size}", "real${size}");
|
||||
queue_sub("complex(real${size})", "complex${size}", "real${size}");
|
||||
if ($size != 128 || $mpi_real16 == 1) {
|
||||
queue_sub("real(real${size})", "real${size}", "real${size}");
|
||||
}
|
||||
if ($size != 128 || $mpi_complex32 == 1) {
|
||||
queue_sub("complex(real${size})", "complex${size}", "real${size}");
|
||||
}
|
||||
}
|
||||
|
||||
#######################################################
|
||||
|
@ -14,6 +14,8 @@
|
||||
# Copyright (c) 2011-2013 Universite Bordeaux 1
|
||||
# Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -117,7 +119,9 @@ sizeof_f.f90:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--impl=$@ --ierror=mandatory --mpi \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
if BUILD_MPI_FORTRAN_MPIFH_BINDINGS_LAYER
|
||||
libmpi_mpifh_la_SOURCES += \
|
||||
|
@ -15,6 +15,8 @@
|
||||
# Copyright (c) 2011-2013 Universite Bordeaux 1
|
||||
# Copyright (c) 2013-2014 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -426,7 +428,9 @@ psizeof_f.f90:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--impl=$@ --ierror=mandatory --pmpi \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
#
|
||||
# The library itself
|
||||
|
@ -7,6 +7,8 @@
|
||||
# Copyright (c) 2012-2013 Inria. All rights reserved.
|
||||
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
#
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
@ -58,7 +60,9 @@ sizeof_f08.h:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--header=$@ --ierror=optional \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
sizeof_f08.f90: $(top_builddir)/config.status
|
||||
sizeof_f08.f90: $(sizeof_pl)
|
||||
@ -66,7 +70,9 @@ sizeof_f08.f90:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--impl=$@ --ierror=optional --mpi \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
profile/psizeof_f08.f90: $(top_builddir)/config.status
|
||||
profile/psizeof_f08.f90: $(sizeof_pl)
|
||||
@ -74,7 +80,9 @@ profile/psizeof_f08.f90:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--impl=$@ --ierror=optional --pmpi \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
CLEANFILES += sizeof_f08.h sizeof_f08.f90 profile/psizeof_f08.f90
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
#
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
@ -63,7 +65,9 @@ mpi-ignore-tkr-sizeof.h:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--header=$@ --ierror=mandatory \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
mpi-ignore-tkr-sizeof.f90: $(top_builddir)/config.status
|
||||
mpi-ignore-tkr-sizeof.f90: $(sizeof_pl)
|
||||
@ -71,7 +75,9 @@ mpi-ignore-tkr-sizeof.f90:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--impl=$@ --ierror=mandatory --mpi --pmpi \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
#
|
||||
# Clean up generated and module files
|
||||
|
@ -13,7 +13,7 @@
|
||||
# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2014 Research Organization for Information Science
|
||||
# Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
@ -104,7 +104,9 @@ mpi-tkr-sizeof.h:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--header=$@ --ierror=mandatory \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
mpi-tkr-sizeof.f90: $(top_builddir)/config.status
|
||||
mpi-tkr-sizeof.f90: $(sizeof_pl)
|
||||
@ -112,7 +114,9 @@ mpi-tkr-sizeof.f90:
|
||||
$(OMPI_V_GEN) $(sizeof_pl) \
|
||||
--impl=$@ --ierror=mandatory --mpi --pmpi \
|
||||
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
|
||||
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
|
||||
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
|
||||
|
||||
#
|
||||
# Clean up all F90 module files and all generated files
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user