summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-03-21 15:10:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-03-21 15:10:17 (GMT)
commiteb89d7b53ab95623ab454186a602e1cafc7391f0 (patch)
treeceafe458b3011e38853e765352d3c7e59bbecce1 /bin
parent3e468e6ff65d540a439e99ea568a6bff7add7cea (diff)
downloadhdf5-eb89d7b53ab95623ab454186a602e1cafc7391f0.zip
hdf5-eb89d7b53ab95623ab454186a602e1cafc7391f0.tar.gz
hdf5-eb89d7b53ab95623ab454186a602e1cafc7391f0.tar.bz2
[svn-r22105] Description:
Bring r20557:22085 from trunk to this branch, also fixing some other issues/failures in the branch simultaneously. The h5repack tests are still failing, but Neil will be checking into those, so the branch can be fully functional again. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug
Diffstat (limited to 'bin')
-rwxr-xr-xbin/make_vers80
-rw-r--r--bin/output_filter.sh101
-rwxr-xr-xbin/release3
-rwxr-xr-xbin/trace7
4 files changed, 167 insertions, 24 deletions
diff --git a/bin/make_vers b/bin/make_vers
index 8541501..0bc3b62 100755
--- a/bin/make_vers
+++ b/bin/make_vers
@@ -2,6 +2,10 @@
require 5.003;
# Global settings
+# (The max_idx parameter is the only thing that needs to be changed when adding
+# support for a new major release. If support for a prior major release
+# is added (like support for 1.4, etc), the min_sup_idx parameter will
+# need to be decremented. - QAK)
# Max. library "index" (0 = v1.0, 1 = 1.2, etc)
$max_idx = 5;
@@ -9,6 +13,9 @@ $max_idx = 5;
# Min. supported previous library version "index" (0 = v1.0, 1 = 1.2, etc)
$min_sup_idx = 3;
+# Number of spaces to indent preprocessor commands inside ifdefs
+$indent = 2;
+
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -82,13 +89,34 @@ sub print_startprotect ($$) {
# Print check for conflicting version macro settings
#
sub print_checkoptions ($) {
- my $fh = shift;
+ my $fh = shift; # File handle for output file
+ my $curr_idx; # Current API version index
# Print the option checking
print $fh "\n/* Issue error if contradicting macros have been defined. */\n";
- print $fh "#if (defined(H5_USE_16_API) || defined(H5_USE_18_API)) && defined(H5_NO_DEPRECATED_SYMBOLS)\n";
- print $fh "#error \"Can't choose old API versions when deprecated APIs are disabled\"\n";
- print $fh "#endif /* (defined(H5_USE_16_API) || defined(H5_USE_18_API)) && defined(H5_NO_DEPRECATED_SYMBOLS) */\n";
+
+ # Print the #ifdef
+ print $fh "#if (";
+ for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
+ print $fh "defined(H5_USE_1", ($curr_idx * 2), "_API)";
+ if($curr_idx < ($max_idx - 1)) {
+ print $fh " || ";
+ }
+ }
+ print $fh ") && defined(H5_NO_DEPRECATED_SYMBOLS)\n";
+
+ # Print the error for bad API version chosen
+ print $fh ' ' x $indent, "#error \"Can't choose old API versions when deprecated APIs are disabled\"\n";
+
+ # Print the #endif
+ print $fh "#endif /* (";
+ for $curr_idx ($min_sup_idx .. ($max_idx - 1)) {
+ print $fh "defined(H5_USE_1", ($curr_idx * 2), "_API)";
+ if($curr_idx < ($max_idx - 1)) {
+ print $fh " || ";
+ }
+ }
+ print $fh ") && defined(H5_NO_DEPRECATED_SYMBOLS) */\n";
}
##############################################################################
@@ -110,7 +138,7 @@ sub print_globalapivers ($) {
# Print API version ifdef
print $fh "#if defined(H5_USE_1", ($curr_idx * 2), "_API_DEFAULT) && !defined(H5_USE_1", ($curr_idx * 2), "_API)\n";
# Print API version definition
- print $fh "#define H5_USE_1", ($curr_idx * 2), "_API 1\n";
+ print $fh " " x $indent, "#define H5_USE_1", ($curr_idx * 2), "_API 1\n";
# Print API version endif
print $fh "#endif /* H5_USE_1", ($curr_idx * 2), "_API_DEFAULT && !H5_USE_1", ($curr_idx * 2), "_API */\n\n";
}
@@ -127,7 +155,7 @@ sub print_globalapivers ($) {
print $fh "/*************/\n";
for $name (sort keys %{$func_vers[$curr_idx]}) {
print $fh "\n#if !defined(", $name, "_vers)\n";
- print $fh "#define ", $name, "_vers $func_vers[$curr_idx]{$name}\n";
+ print $fh " " x $indent, "#define ", $name, "_vers $func_vers[$curr_idx]{$name}\n";
print $fh "#endif /* !defined(", $name, "_vers) */\n";
}
@@ -138,7 +166,7 @@ sub print_globalapivers ($) {
print $fh "/************/\n";
for $name (sort keys %{$type_vers[$curr_idx]}) {
print $fh "\n#if !defined(", $name, "_t_vers)\n";
- print $fh "#define ", $name, "_t_vers $type_vers[$curr_idx]{$name}\n";
+ print $fh " " x $indent, "#define ", $name, "_t_vers $type_vers[$curr_idx]{$name}\n";
print $fh "#endif /* !defined(", $name, "_t_vers) */\n";
}
@@ -180,25 +208,25 @@ sub print_defaultapivers ($) {
# Set up default/latest version name mapping
print $fh "\n#if !defined($curr_vers_name) || $curr_vers_name == $curr_vers\n";
- print $fh "#ifndef $curr_vers_name\n";
- print $fh "#define $curr_vers_name $curr_vers\n";
- print $fh "#endif /* $curr_vers_name */\n";
- print $fh "#define $curr_name $curr_name$curr_vers\n";
+ print $fh " " x $indent, "#ifndef $curr_vers_name\n";
+ print $fh " " x ($indent * 2), "#define $curr_vers_name $curr_vers\n";
+ print $fh " " x $indent, "#endif /* $curr_vers_name */\n";
+ print $fh " " x $indent, "#define $curr_name $curr_name$curr_vers\n";
# Print function's dependent parameter types
foreach(sort(@param_list)) {
- print $fh "#define ${_}_t $_${curr_vers}_t\n";
+ print $fh " " x $indent, "#define ${_}_t $_${curr_vers}_t\n";
}
# Loop to print earlier version name mappings
$curr_vers--;
while($curr_vers > 0) {
print $fh "#elif $curr_vers_name == $curr_vers\n";
- print $fh "#define $curr_name $curr_name$curr_vers\n";
+ print $fh " " x $indent, "#define $curr_name $curr_name$curr_vers\n";
# Print function's dependent parameter types
foreach(sort(@param_list)) {
- print $fh "#define ${_}_t $_${curr_vers}_t\n";
+ print $fh " " x $indent, "#define ${_}_t $_${curr_vers}_t\n";
}
$curr_vers--;
@@ -206,7 +234,7 @@ sub print_defaultapivers ($) {
# Finish up with error for unknown version and endif
print $fh "#else /* $curr_vers_name */\n";
- print $fh "#error \"$curr_vers_name set to invalid value\"\n";
+ print $fh " " x $indent, "#error \"$curr_vers_name set to invalid value\"\n";
print $fh "#endif /* $curr_vers_name */\n";
}
@@ -224,22 +252,22 @@ sub print_defaultapivers ($) {
# Set up default/latest version name mapping
print $fh "\n#if !defined($curr_vers_name) || $curr_vers_name == $curr_vers\n";
- print $fh "#ifndef $curr_vers_name\n";
- print $fh "#define $curr_vers_name $curr_vers\n";
- print $fh "#endif /* $curr_vers_name */\n";
- print $fh "#define ${curr_name}_t $curr_name${curr_vers}_t\n";
+ print $fh " " x $indent, "#ifndef $curr_vers_name\n";
+ print $fh " " x ($indent * 2), "#define $curr_vers_name $curr_vers\n";
+ print $fh " " x $indent, "#endif /* $curr_vers_name */\n";
+ print $fh " " x $indent, "#define ${curr_name}_t $curr_name${curr_vers}_t\n";
# Loop to print earlier version name mappings
$curr_vers--;
while($curr_vers > 0) {
print $fh "#elif $curr_vers_name == $curr_vers\n";
- print $fh "#define ${curr_name}_t $curr_name${curr_vers}_t\n";
+ print $fh " " x $indent, "#define ${curr_name}_t $curr_name${curr_vers}_t\n";
$curr_vers--;
}
# Finish up with error for unknown version and endif
print $fh "#else /* $curr_vers_name */\n";
- print $fh "#error \"$curr_vers_name set to invalid value\"\n";
+ print $fh " " x $indent, "#error \"$curr_vers_name set to invalid value\"\n";
print $fh "#endif /* $curr_vers_name */\n\n";
}
}
@@ -436,7 +464,13 @@ for $file (@ARGV) {
my $prefix; # Local prefix for generated files
#print "file = '$file'\n";
- ($prefix) = ($file =~ /(^.*\/)/);
+ # Check for directory prefix on input file
+ if($file =~ /\//) {
+ ($prefix) = ($file =~ /(^.*\/)/);
+ }
+ else {
+ $prefix = "";
+ }
#print "prefix = '$prefix'\n";
# Read in the entire file
open SOURCE, $file or die "$file: $!\n";
@@ -450,7 +484,7 @@ for $file (@ARGV) {
close SOURCE;
# Create header files
- print "Generating 'H5version.h'\n";
+ print "Generating '", $prefix, "H5version.h'\n";
create_public($prefix);
#for $name (sort keys %functions) {
diff --git a/bin/output_filter.sh b/bin/output_filter.sh
new file mode 100644
index 0000000..58f1c48
--- /dev/null
+++ b/bin/output_filter.sh
@@ -0,0 +1,101 @@
+## Copyright by The HDF Group.
+## All rights reserved.
+##
+## This file is part of HDF5. The full HDF5 copyright notice, including
+## terms governing use, modification, and redistribution, is contained in
+## the files COPYING and Copyright.html. COPYING can be found at the root
+## of the source code distribution tree; Copyright.html can be found at the
+## root level of an installed copy of the electronic HDF5 document set and
+## is linked from the top-level documents page. It can also be found at
+## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+## access to either file, you may request a copy from help@hdfgroup.org.
+
+# This contains function definitions of output filtering.
+# This file should only be sourced in by another shell script.
+#
+# Programmer: Albert Cheng
+# Created Date: 2011/5/3
+
+
+# Some systems will dump some messages to stdout for various reasons.
+# Remove them from the stdout result file.
+# $1 is the file name of the file to be filtered.
+# Cases of filter needed:
+# 1. Sandia Red-Storm
+# yod always prints these two lines at the beginning.
+# LibLustre: NAL NID: 0004a605 (5)
+# Lustre: OBD class driver Build Version: 1, info@clusterfs.com
+# 2. LANL Lambda
+# mpijob mirun -np always add an extra line at the end like:
+# P4 procgroup file is /users/acheng/.lsbatch/host10524.l82
+STDOUT_FILTER() {
+ result_file=$1
+ tmp_file=/tmp/h5test_tmp_$$
+ # Filter Sandia Red-Storm yod messages.
+ cp $result_file $tmp_file
+ sed -e '/^LibLustre:/d' -e '/^Lustre:/d' \
+ < $tmp_file > $result_file
+ # Filter LANL Lambda mpirun message.
+ cp $result_file $tmp_file
+ sed -e '/^P4 procgroup file is/d' \
+ < $tmp_file > $result_file
+ # cleanup
+ rm -f $tmp_file
+}
+
+
+# Some systems will dump some messages to stderr for various reasons.
+# Remove them from the stderr result file.
+# $1 is the file name of the file to be filtered.
+# Cases of filter needed:
+# 1. MPE:
+# In parallel mode and if MPE library is used, it prints the following
+# two message lines whether the MPE tracing is used or not.
+# Writing logfile.
+# Finished writing logfile.
+# 2. LANL MPI:
+# The LANL MPI will print some messages like the following,
+# LA-MPI: *** mpirun (1.5.10)
+# LA-MPI: *** 3 process(es) on 2 host(s): 2*fln21 1*fln22
+# LA-MPI: *** libmpi (1.5.10)
+# LA-MPI: *** Copyright 2001-2004, ACL, Los Alamos National Laboratory
+# 3. h5diff debug output:
+# Debug output all have prefix "h5diff debug: ".
+# 4. AIX system prints messages like these when it is aborting:
+# ERROR: 0031-300 Forcing all remote tasks to exit due to exit code 1 in task 0
+# ERROR: 0031-250 task 4: Terminated
+# ERROR: 0031-250 task 3: Terminated
+# ERROR: 0031-250 task 2: Terminated
+# ERROR: 0031-250 task 1: Terminated
+# 5. LLNL Blue-Gene mpirun prints messages like there when it exit non-zero:
+# <Apr 12 15:01:49.075658> BE_MPI (ERROR): The error message in the job record is as follows:
+# <Apr 12 15:01:49.075736> BE_MPI (ERROR): "killed by exit(1) on node 0"
+STDERR_FILTER() {
+ result_file=$1
+ tmp_file=/tmp/h5test_tmp_$$
+ # Filter LLNL Blue-Gene error messages in both serial and parallel modes
+ # since mpirun is used in both modes.
+ cp $result_file $tmp_file
+ sed -e '/ BE_MPI (ERROR): /d' \
+ < $tmp_file > $result_file
+ # Filter MPE messages
+ if test -n "$pmode"; then
+ cp $result_file $tmp_file
+ sed -e '/^Writing logfile./d' -e '/^Finished writing logfile./d' \
+ < $tmp_file > $result_file
+ fi
+ # Filter LANL MPI messages
+ # and LLNL srun messages
+ # and AIX error messages
+ if test -n "$pmode"; then
+ cp $result_file $tmp_file
+ sed -e '/^LA-MPI:/d' -e '/^srun:/d' -e '/^ERROR:/d' \
+ < $tmp_file > $result_file
+ fi
+ # Filter h5diff debug output
+ cp $result_file $tmp_file
+ sed -e '/^h5diff debug: /d' \
+ < $tmp_file > $result_file
+ # clean up temporary files.
+ rm -f $tmp_file
+}
diff --git a/bin/release b/bin/release
index c335028..be8eb14 100755
--- a/bin/release
+++ b/bin/release
@@ -93,6 +93,7 @@ VERS_OLD=
test "$VERS" || exit 1
verbose=yes
check=yes
+release_date=`date +%F`
today=`date +%Y%m%d`
pmode='no'
tmpdir="../#release_tmp.$$" # tmp work directory
@@ -203,7 +204,7 @@ cp -p Makefile.dist Makefile
# Update README.txt and release_docs/RELEASE.txt with release information in
# line 1.
for f in README.txt release_docs/RELEASE.txt; do
- echo "HDF5 version $VERS released on `date`" >$f.x
+ echo "HDF5 version $VERS released on $release_date" >$f.x
sed -e 1d $f >>$f.x
mv $f.x $f
# Make sure new files are of the right access mode
diff --git a/bin/trace b/bin/trace
index e0a4dd0..bfaae19 100755
--- a/bin/trace
+++ b/bin/trace
@@ -36,7 +36,9 @@ $Source = "";
"H5D_fill_time_t" => "Df",
"H5D_fill_value_t" => "DF",
"H5FD_mpio_chunk_opt_t" => "Dh",
+ "H5D_mpio_actual_io_mode_t" => "Di",
"H5D_layout_t" => "Dl",
+ "H5D_mpio_actual_chunk_opt_mode_t" => "Do",
"H5D_space_status_t" => "Ds",
"H5FD_mpio_xfer_t" => "Dt",
"herr_t" => "e",
@@ -86,6 +88,8 @@ $Source = "";
"H5T_sign_t" => "Ts",
"H5T_class_t" => "Tt",
"H5T_str_t" => "Tz",
+ "unsigned long" => "Ul",
+ "unsigned long long" => "UL",
"void" => "x",
"FILE" => "x",
"H5A_operator_t" => "x",
@@ -217,6 +221,9 @@ sub rewrite_func ($$$$$) {
my %names;
for $arg (@args) {
+ if($arg=~/\w*\.{3}\w*/){
+ next;
+ }
unless ($arg=~/^(([a-z_A-Z]\w*\s+)+\**)
([a-z_A-Z]\w*)(\[.*?\])?
(\s*\/\*\s*(in|out|in_out)\s*\*\/)?\s*$/x) {