[mpich-commits] [mpich] MPICH primary repository branch, release/mpich-3.0.x, updated. v3.0.4-4-g45305a3
mysql vizuser
noreply at mpich.org
Thu May 2 17:46:54 CDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, release/mpich-3.0.x has been updated
via 45305a3a74fe8a4bb4667892ccebc9b2f15fbbc4 (commit)
from 27dfcd8ecbeeb333b39c11ba04e52e26a6e1f58f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/45305a3a74fe8a4bb4667892ccebc9b2f15fbbc4
commit 45305a3a74fe8a4bb4667892ccebc9b2f15fbbc4
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date: Thu May 2 17:41:50 2013 -0500
Revert [8374bd7a] from mpich-3.0.x since that breaks ABI.
No reviewer.
diff --git a/configure.ac b/configure.ac
index 6b7237c..35dc573 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5783,25 +5783,6 @@ if test "$enable_f77" = yes -a -z "$MPI_STATUS_SIZE" ; then
else
AC_MSG_ERROR([MPI_STATUS_SIZE was not defined!])
fi
-
- # Because MPI_Status may contain C integers of different sizes
- # and with different alignments, we determine the maximum element
- # size and then tell Fortran to enforce maximal alignment.
- # A more sophisticated test would determine the required alignment,
- # rather than assuming alignment to maximum size
- if test $MPI_SIZEOF_COUNT -gt $pac_cv_f77_sizeof_integer ; then
- # Alignment test looks at the low address bits, as long
- # as the sizeof(MPI_Count) is 2^j.
- MPIR_COUNT_ALIGNMENT=0
- case $MPI_SIZEOF_COUNT in
- 4) MPIR_COUNT_ALIGNMENT="0x3";;
- 8) MPIR_COUNT_ALIGNMENT="0x7";;
- 16) MPIR_COUNT_ALIGNMENT="0xF";;
- *) MPIR_COUNT_ALIGNMENT=-1 ;;
- esac
-
- AC_DEFINE_UNQUOTED([MPIR_COUNT_ALIGNMENT],[$MPIR_COUNT_ALIGNMENT],[Value that anded with an address will give 0 if the address is properly aligned for MPI_Count])
- fi
fi
AC_SUBST([MPI_STATUS_SIZE])
MPIF_STATUS_SIZE=$MPI_STATUS_SIZE
diff --git a/src/binding/f77/buildiface b/src/binding/f77/buildiface
index f6c6611..66ad07e 100755
--- a/src/binding/f77/buildiface
+++ b/src/binding/f77/buildiface
@@ -46,10 +46,6 @@ $do_fint = 0; # Set to 1 to support C and Fortran integers of a
# different size
$within_fint = 0; # This is set to 1 while generating code for the
# do_fint branch
-$fixStatusAlignment = 1; # Set to 1 to generate code that
- # handles different alignment rules between
- # Fortran (INTEGER) and C (likely MPI_Count)
- # Note set by feature value do_fixstatus .
%fintToHandle = ( 'int' => 1, 'MPI_Request' => 1, 'MPI_Group' => 1,
'MPI_Win' => 1, 'MPI_Info' => 1, 'MPI_Errhandler' => 1,
'MPI_File' => 1, 'MPI_Op' => 1, 'MPI_Message' => 1 );
@@ -72,7 +68,6 @@ $do_logical = 1;
$do_weak = 1;
$do_subdecls = 1;
$do_bufptr = 1;
-$do_fixstatus = 1;
$prototype_file = "../../include/mpi.h.in";
# Global hashes used for definitions and to record the locations of the
@@ -112,8 +107,8 @@ $specialInitString = "\
# Process arguments
#
# Args
-# -feature={logical,fint,subdecls,weak,bufptr,fixstatus},
-# separated by :, value given by =on or =off, eg
+# -feature={logical,fint,subdecls,weak,bufptr}, separated by :, value given
+# by =on or =off, eg
# -feature=logical=on:fint=off
# The feature names mean:
# logical - Fortran logicals are converted to/from C
@@ -122,11 +117,6 @@ $specialInitString = "\
# weak - Use weak symbols
# bufptr - Check for MPI_BOTTOM as a special address. This is
# not needed if a POINTER declaration is available.
-# fixstatus - The alignment of a Fortran STATUS array may not always
-# be what is required in C (particularly with MPI_Count in
-# MPI_Status now). If set, generate code to handle this case.
-# Systems without alignment restrictions can set this to off,
-# which will remove some tests.
foreach $_ (@ARGV) {
if (/-noprototypes/) { $build_prototypes = 0; }
elsif (/-infile=(.*)/) {
@@ -171,8 +161,6 @@ foreach $_ (@ARGV) {
print STDERR "Unrecognized argument $_\n";
}
}
-# For now, make these equal.
-$fixStatusAlignment = $do_fixstatus;
# Note that the code that looks up values strips blanks out of the type name
# No blanks should be used in the key.
@@ -659,18 +647,18 @@ $fixStatusAlignment = $do_fixstatus;
'Testsome-2' => 'inout:handle_array:*v1:MPI_Request',
'Testsome-3' => 'out:fint2int',
'Testsome-4' => 'out:index_array:*v1:*v3',
- 'Testsome-5' => 'out:status_array:*v1:*v3:*v3>0',
+ 'Testsome-5' => 'out:status_array:*v1:*v3:l3>0',
'Get_count' => '1', 'Get_count-1' => 'in:status',
'Request_get_status' => '2:3',
'Request_get_status-2' => 'out:logical',
'Request_get_status-3' => 'out:status',
'Status_set_cancelled' => '1:2',
- 'Status_set_cancelled-1' => 'inout:status',
+ 'Status_set_cancelled-1' => 'in:status',
'Status_set_cancelled-2' => 'in:logical',
'Status_set_elements' => '1',
- 'Status_set_elements-1' => 'inout:status',
+ 'Status_set_elements-1' => 'out:status',
'Status_set_elements_x' => '1',
- 'Status_set_elements_x-1' => 'inout:status',
+ 'Status_set_elements_x-1' => 'out:status',
'Type_contiguous' => '2:3',
'Type_contiguous-2' => 'in:handle::MPI_Datatype',
'Type_contiguous-3' => 'out:handle::MPI_Datatype',
@@ -1756,7 +1744,6 @@ sub bufptr_in_arg {
sub bufptr_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
}
# --------------------------------------------------------------------------
# MPI_IN_PLACE buffer pointers
@@ -1776,7 +1763,6 @@ sub inplace_in_arg {
sub inplace_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
}
# --------------------------------------------------------------------------
# MPI_UNWEIGHTED pointers. Note that unweighted is only used to indicate
@@ -1853,7 +1839,6 @@ sub unweighted_out_arg {
sub unweighted_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
# MPI_WEIGHTS_EMPTY should never be an output value from the MPI library
@@ -1892,7 +1877,6 @@ sub logical_in_arg {
sub logical_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($do_logical) {
print $OUTFD " if ($errparmlval == MPI_SUCCESS) *$outvar = MPIR_TO_FLOG($coutvar);\n";
}
@@ -1956,7 +1940,6 @@ sub logical_array_in_arg {
sub logical_array_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
# Special case if MPI_Fint == int: we use the input variable
# for space.
my $ActSize = $Array_size;
@@ -2001,7 +1984,6 @@ sub index_ftoc {
sub index_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
print $OUTFD " *$outvar = (MPI_Fint)$coutvar;\n";
print $OUTFD " if ($coutvar >= 0) *$outvar = *$outvar + 1;\n";
}
@@ -2028,7 +2010,6 @@ sub index_array_out_ftoc {
sub index_array_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
my $ActSize = $Array_size;
# In the case where the input and out sizes are not the same,
# the output size is in the fourth argument.
@@ -2101,7 +2082,6 @@ sub handle_inout_ftoc {
sub handle_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
print $OUTFD " if ($errparmlval==MPI_SUCCESS) *$outvar = (MPI_Fint)$coutvar;\n";
}
@@ -2224,8 +2204,7 @@ sub handle_array_out_ftoc {
sub handle_array_inout_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
- &handle_array_ctof( $coutvar, $outvar, $count );
+ &handle_array_ctof( $coutvar, $outvar );
}
# Make sure that there is no output processing (other than to free the
@@ -2233,14 +2212,12 @@ sub handle_array_inout_ctof {
sub handle_array_in_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
- #&handle_array_ctof( $coutvar, $outvar, $count );
+ #&handle_array_ctof( $coutvar, $outvar );
}
sub handle_array_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
my $basetype = $nativeType;
$basetype =~ s/MPI_//;
@@ -2251,7 +2228,7 @@ sub handle_array_ctof {
$asize = "_csize";
}
print $OUTFD "\
- /* handle_array_ctof( $coutvar, $outvar, $count ) */
+ /* handle_array_ctof( $coutvar, $outvar ) */
{int li;
for (li=0; li<$asize; li++) {
$outvar\[li\] = $convfunc( $coutvar\[li\] );
@@ -2359,7 +2336,6 @@ sub addrint_in_arg {
sub attrint_ctof {
my $fvar = $_[0];
my $cvar = $_[1];
- my $count = $_[2];
my $flagarg = 4; # get from option
# The strange cast is due to the following:
# The MPICH attribute code returns an int in the void *. In
@@ -2416,7 +2392,6 @@ sub addraint_in_arg {
sub attraint_ctof {
my $fvar = $_[0];
my $cvar = $_[1];
- my $count = $_[2];
my $flagarg = 4; # get from option
print $OUTFD "
if ((int)*ierr || !l$flagarg) {
@@ -2454,7 +2429,6 @@ sub bufaddr_out_arg {
sub bufaddr_ctof {
my $fvar = $_[0];
my $cvar = $_[1];
- my $count = $_[2];
}
# --------------------------------------------------------------------------
#
@@ -2475,10 +2449,6 @@ sub status_out_fnulltoc {
if (v$count == MPI_F_STATUS_IGNORE) { l$count = MPI_STATUS_IGNORE; }
else { l$count->MPI_ERROR = (int)(v$count\[2\]); }\n";
}
- elsif ($fixStatusAlignment) {
- print $OUTFD "\
- if (v$count == MPI_F_STATUS_IGNORE) { l$count = MPI_STATUS_IGNORE; }\n";
- }
else {
print $OUTFD "\
if (v$count == MPI_F_STATUS_IGNORE) { v$count = (MPI_Fint*)MPI_STATUS_IGNORE; }\n";
@@ -2490,26 +2460,11 @@ sub status_in_ftoc {
if ($within_fint) {
print $OUTFD " MPI_Status_f2c( v$count, l$count );\n";
}
- elsif ($fixStatusAlignment) {
- print $OUTFD "\
- if ( l$count != MPI_STATUS_IGNORE &&
- (((MPI_Aint)v$count) & MPIR_COUNT_ALIGNMENT) == 0 )
- l$count = (MPI_Status *)(void*)v$count;
- else {
- MPI_Status_f2c( v$count, l$count );
- }
-";
- }
-}
-sub status_inout_ftoc {
- my $count = $_[0];
- status_in_ftoc( $count );
}
sub status_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
my $testFlag = "";
if (defined($condition) && $condition ne "") {
@@ -2518,50 +2473,24 @@ sub status_out_ctof {
print $OUTFD
" if ($testFlag$coutvar != MPI_STATUS_IGNORE && $errparmlval == MPI_SUCCESS) {
MPI_Status_c2f($coutvar,$outvar);
- }\n";
- }
- elsif ($fixStatusAlignment) {
- # only copy if Fortran is not properly aligned
- print $OUTFD "\
- if ($coutvar != MPI_STATUS_IGNORE && $errparmlval == MPI_SUCCESS && $outvar != (MPI_Fint*)$coutvar) {
- MPI_Status_c2f($coutvar,$outvar);
- }\n";
+ }\n"
}
}
sub status_in_decl {
my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD " MPI_Status vtmp$count, *l$count = &vtmp$count;\n";
}
}
sub status_out_decl {
my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
- print $OUTFD " MPI_Status vtmp$count, *l$count = &vtmp$count;\n";
- }
-}
-sub status_inout_decl {
- my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD " MPI_Status vtmp$count, *l$count = &vtmp$count;\n";
}
}
-sub status_out_ftoc {
- my $count = $_[0];
- if ($fixStatusAlignment) {
- # The first (void *) cast helps suppress compiler warnings about
- # casting to a pointer with greater alignment (and which the
- # specific runtime check is used to ensure the alignments are
- # ok).
- print $OUTFD "\
- if (l$count != MPI_STATUS_IGNORE &&
- (((MPI_Aint)v$count) & MPIR_COUNT_ALIGNMENT) == 0)
- l$count = (MPI_Status*)(void *)v$count;\n";
- }
-}
sub status_out_arg {
my $count = $_[0];
- if ($within_fint|| $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD "l$count";
}
else {
@@ -2570,16 +2499,7 @@ sub status_out_arg {
}
sub status_in_arg {
my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
- print $OUTFD "l$count";
- }
- else {
- print $OUTFD "(MPI_Status *)(v$count)";
- }
-}
-sub status_inout_arg {
- my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD "l$count";
}
else {
@@ -2629,7 +2549,6 @@ sub errcodesignore_out_ftoc {
sub errcodesignore_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
$asize = $Array_size;
@@ -2673,7 +2592,7 @@ sub status_array_out_fnulltoc {
&specialInitStatement( $OUTFD );
my $varname = "v";
my $varcast = "(MPI_Fint *)";
- if ($within_fint || $fixStatusAlignment) { $varname = "l"; $varcast = ""; }
+ if ($within_fint) { $varname = "l"; $varcast = ""; }
print $OUTFD "\
if (v$count == MPI_F_STATUSES_IGNORE) { $varname$count = ${varcast}MPI_STATUSES_IGNORE; }\n";
}
@@ -2683,23 +2602,11 @@ sub status_array_out_ftoc {
if ($within_fint) {
print $OUTFD " if (l$count != MPI_STATUSES_IGNORE) { l$count = (MPI_Status*)$malloc($Array_size * sizeof(MPI_Status)); }\n";
}
- elsif ($fixStatusAlignment) {
- print $OUTFD "\
- if (l$count != MPI_STATUSES_IGNORE) {
- if( (((MPI_Aint)v$count) & MPIR_COUNT_ALIGNMENT) == 0)
- l$count = (MPI_Status*)(void *)v$count;
- else {
- lalloc$count = 1;
- l$count = (MPI_Status*)$malloc($Array_size * sizeof(MPI_Status));
- }
- }\n";
- }
}
sub status_array_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
my $ActSize = $Array_size;
@@ -2719,38 +2626,17 @@ sub status_array_ctof {
}\n";
$clean_up .= " if ($coutvar != MPI_STATUSES_IGNORE) { $free($coutvar); }\n";
}
- elsif ($fixStatusAlignment) {
- my $ActSize = $Array_size;
- if (defined($nativeType) && $nativeType ne "") {
- $ActSize = $nativeType;
- }
- my $testFlag = "";
- if (defined($condition) && $condition ne "") {
- $testFlag = "$condition && "
- }
- print $OUTFD
-" if (${testFlag}lalloc$count) {
- int li;
- for (li=0; li<$ActSize; li++) {
- MPI_Status_c2f($coutvar+li,$outvar+li*5);
- }
- }\n";
- $clean_up .= " if (lalloc$count) { $free($coutvar); }\n";
- }
}
sub status_array_out_decl {
my $count = $_[0];
if ($within_fint) {
print $OUTFD " MPI_Status *l$count=0;\n";
- }
- elsif ($fixStatusAlignment) {
- print $OUTFD " MPI_Status *l$count=0;\n int lalloc$count=0;\n";
}
}
sub status_array_out_arg {
my $count = $_[0];
- if ($within_fint || $fixStatusAlignment) {
+ if ($within_fint) {
print $OUTFD "l$count";
}
else {
@@ -2762,7 +2648,6 @@ sub status_array_out_arg {
sub aintToInt_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
print $OUTFD " if ($errparmlval == MPI_SUCCESS) *$outvar = (MPI_Fint)($coutvar);\n";
}
sub aintToInt_out_decl {
@@ -2800,7 +2685,6 @@ sub fint2int_ftoc {
sub fint2int_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
print $OUTFD " if ($errparmlval == MPI_SUCCESS) *$outvar = (MPI_Fint)$coutvar;\n";
}
@@ -2916,7 +2800,6 @@ sub fint2int_array_out_ftoc {
sub fint2int_array_out_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
if ($within_fint) {
my $asize = $Array_size;
if ($Array_size =~ /_commsize/) {
@@ -3150,16 +3033,16 @@ sub print_post_call {
$processing_routine = "${method}_${direction}_ctof";
# Prefer a specific choice matching the direction
if (defined(&$processing_routine)) {
- &$processing_routine( "l$count", "v$count", $count );
+ &$processing_routine( "l$count", "v$count" );
}
elsif ($direction eq "inout" &&
defined(&$processing_out_routine)) {
- &$processing_out_routine( "l$count", "v$count", $count );
+ &$processing_out_routine( "l$count", "v$count" );
}
else {
$processing_routine = "${method}_ctof";
if (defined(&$processing_routine)) {
- &$processing_routine( "l$count", "v$count", $count );
+ &$processing_routine( "l$count", "v$count" );
}
elsif ($direction ne "in") {
print STDERR "Missing $processing_routine for $routine_name\n";
@@ -3207,7 +3090,6 @@ sub blankpad_out_ftoc {
sub blankpad_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
# find the null character. Replace with blanks from there to the
# end of the string. The declared lenght is given by a variable
@@ -3250,7 +3132,6 @@ sub blankpadonflag_out_ftoc {
sub blankpadonflag_ctof {
my $coutvar = $_[0];
my $outvar = $_[1];
- my $count = $_[2];
# find the null character. Replace with blanks from there to the
# end of the string. The declared lenght is given by a variable
@@ -3574,7 +3455,6 @@ sub intToAintArr_in_arg {
sub intToAintArr_in_ctof {
my $lname = $_[0];
my $vname = $_[1];
- my $count = $_[2];
print $OUTFD "
#ifdef HAVE_AINT_LARGER_THAN_FINT
if ($lname) { $free($lname); }
@@ -3620,7 +3500,6 @@ sub FileToFint_out_decl {
sub FileToFint_ctof {
my $lvar = $_[0];
my $gvar = $_[1];
- my $count = $_[2];
print $OUTFD " *$gvar = MPI_File_c2f($lvar);\n";
}
sub FileToFint_out_arg {
@@ -4636,7 +4515,6 @@ print $OUTFD "\
return MPIR_Err_return_comm( 0, \"MPI_Status_f2c\", mpi_errno );
}\n";
if ($do_fint) {
- #FIXME: Invalid alignment assumptions on MPI_Count field.
print $OUTFD "\
#ifdef HAVE_FINT_IS_INT
*c_status = *(MPI_Status *) f_status;
@@ -4675,11 +4553,7 @@ print $OUTFD "\
#include \"mpi_fortimpl.h\"
/* mpierrs.h and mpierror.h for the error code creation */
#include \"mpierrs.h\"
-#include <stdio.h>\n";
- if ($fixStatusAlignment) {
- print $OUTFD "#include <string.h>\n";
- }
- print $OUTFD "\
+#include <stdio.h>
#include \"mpierror.h\"
/* -- Begin Profiling Symbol Block for routine MPI_Status_c2f */
@@ -4715,8 +4589,6 @@ int MPI_Status_c2f( const MPI_Status *c_status, MPI_Fint *f_status )
return MPIR_Err_return_comm( 0, \"MPI_Status_c2f\", mpi_errno );
}\n";
if ($do_fint) {
- #FIXME: Copy to f_status of MPI_Count data makes invalid alignment
- # data.
print $OUTFD "\
#ifdef HAVE_FINT_IS_INT
*(MPI_Status *)f_status = *c_status;
@@ -4729,24 +4601,14 @@ int MPI_Status_c2f( const MPI_Status *c_status, MPI_Fint *f_status )
#endif\n";
}
else {
- if ($fixStatusAlignment) {
- # Within this routine, MPI_STATUS_IGNORE is invalid
- print $OUTFD "\
- if ( (((MPI_Aint)f_status) & MPIR_COUNT_ALIGNMENT) == 0 )
- *(MPI_Status*)(void *)f_status = *c_status;
- else
- memcpy(f_status,c_status,sizeof(MPI_Status));
- \n";
- }
- else {
- print $OUTFD " *(MPI_Status *)f_status = *c_status;\n";
- }
+ print $OUTFD " *(MPI_Status *)f_status = *c_status;\n";
}
print $OUTFD "
return MPI_SUCCESS;
}\n";
close ($OUTFD);
&ReplaceIfDifferent( $filename, $filename . ".new" );
+
}
sub print_mpif_int {
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 19 -----
src/binding/f77/buildiface | 182 +++++--------------------------------------
2 files changed, 22 insertions(+), 179 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list