...
 
Commits (328)
* text=auto !eol
/AUTHORS -text
/COPYING -text
/ChangeLog -text
/GNUmakefile.orig -text
/INSTALL -text
/Makefile.am -text
/Makefile.orig -text
/NEWS -text
/README -text
/autogen.sh -text
/configure-crayxt -text
/configure.ac -text
/depcomp -text
doc/Doxyfile -text
doc/H5X_File_Format.txt -text
doc/Makefile.am -text
doc/doxyfooter -text
examples/core_vfd.c -text
examples/fields.c -text
examples/particles.c -text
examples/simplef.F90 -text
examples/stridedf.F90 -text
examples/write_setview.c -text
/install-sh -text
/license.txt -text
/missing -text
/rules.make -text
src/H5Block.c -text
src/H5Block.f90 -text
src/H5Block.h -text
src/H5BlockErrors.h -text
src/H5BlockF.c -text
src/H5BlockPrivate.h -text
src/H5BlockReadWrite.c -text
src/H5BlockReadWrite.f90 -text
src/H5BlockReadWrite.h -text
src/H5BlockReadWriteF.c -text
src/H5BlockTypes.h -text
src/H5MultiBlock.c -text
src/H5MultiBlock.h -text
src/H5MultiBlockErrors.h -text
src/H5MultiBlockPrivate.h -text
src/H5MultiBlockReadWrite.c -text
src/H5MultiBlockReadWrite.h -text
src/H5MultiBlockTypes.h -text
src/H5Part.c -text
src/H5Part.f90 -text
src/H5Part.h -text
src/H5PartAttrib.c -text
src/H5PartAttrib.f90 -text
src/H5PartAttrib.h -text
src/H5PartAttribF.c -text
src/H5PartErrors.h -text
src/H5PartF.c -text
src/H5PartPrivate.h -text
src/H5PartTypes.h -text
src/Makefile.am -text
src/TestUnderscore.f -text
src/TestUnderscoreC.c -text
src/generate-attr.py -text
src/generate-h5bl-readwrite.py -text
src/generate-h5multi-readwrite.py -text
test/Bench.c -text
test/BlockTestSpecs.txt -text
test/H5BlockDissolveGhosts.c -text
test/H5BlockParTestScalarField.c -text
test/H5BlockParTestScalarField.pbs -text
test/H5BlockParTestScalarFieldF.F90 -text
test/H5BlockTestAttributes.c -text
test/H5BlockTestAttributesF.F90 -text
test/H5ParallelTest.cc -text
test/H5PartAndreasTest.cc -text
test/H5PartTest.cc -text
test/H5PartTestParallel.cc -text
test/H5test.cc -text
test/H5testF.f -text
test/H5testFpar.F90 -text
test/Makefile.am -text
test/coords.F90 -text
test/params.h -text
test/read.c -text
test/test.c -text
test/testf.F90 -text
test/testframe.c -text
test/testframe.h -text
test/write.c -text
tools/H5BlockBench.c -text
tools/H5PartBench.c -text
tools/Makefile.am -text
tools/README -text
tools/h5pAttrib.cc -text
tools/h5pToGNUplot.cc -text
tools/homdynToH5p.cc -text
/Makefile.in
/aclocal.m4
/autom4te.cache
/build
/config.h.in
/configure
doc/Makefile.in
/ltmain.sh
/m4
src/H5PartF.h
src/Makefile.in
test/Makefile.in
tools/Makefile.in
Andreas Adelmann (PSI)
Achim Gsell (PSI)
Benedikt Oswald (PSI)
Wes Bethel (NERSC/LBNL)
John Shalf (NERSC/LBNL)
Cristina Siegerist (NERSC/LBNL)
Mark Howison (NERSC/LBNL)
Please use h5part@lists.psi.ch for communication.
*** Copyright Notice ***
H5Part Copyright (c) 2006-2009, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
Institut (Switzerland). All rights reserved.
If you have questions about your rights to use or distribute this
software, please contact Berkeley Lab's Technology Transfer Department
at TTD@lbl.gov referring to "H5Part (LBNL Ref CR-2255)"
NOTICE. This software was developed under partial funding from the U.S.
Department of Energy. As such, the U.S. Government has been granted for
itself and others acting on its behalf a paid-up, nonexclusive,
irrevocable, worldwide license in the Software to reproduce, prepare
derivative works, and perform publicly and display publicly. Beginning
five (5) years after the date permission to assert copyright is obtained
from the U.S. Department of Energy, and subject to any subsequent five
(5) year renewals, the U.S. Government is granted for itself and others
acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide
license in the Software to reproduce, prepare derivative works,
distribute copies to the public, perform publicly and display publicly,
and to permit others to do so.
*** License agreement ***
H5Part Copyright (c) 2006-2009, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any
required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
Institut (Switzerland). All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
(1) Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
(2) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
(3) Neither the name of the University of California, Lawrence Berkeley
National Laboratory, U.S. Dept. of Energy, Paul Scherrer Institut
(Switzerland) nor the names of its contributors may be used to endorse
or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You are under no obligation whatsoever to provide any bug fixes,
patches, or upgrades to the features, functionality or performance of
the source code ("Enhancements") to anyone; however, if you choose to
make your Enhancements available either publicly, or directly to
Lawrence Berkeley National Laboratory, without imposing a separate
written license agreement for such Enhancements, then you hereby grant
the following license: a non-exclusive, royalty-free perpetual license
to install, use, modify, prepare derivative works, incorporate into
other computer software, distribute, and sublicense such enhancements or
derivative works thereof, in binary and source code form.
UNAME := $(shell uname | perl -pe 's/(sn\d\d\d\d|jsimpson)/UNICOS\/mk/')
# for host specific options
HOST := $(shell hostname)
# for processor-specific options
ifeq ($(UNAME), Linux)
PROC := $(shell uname -p)
endif
CXX = c++
CC = cc
H5HOME = /usr/local/hdf5
CFLAGS = -g -I$(H5HOME)/include
LDFLAGS = -L$(H5HOME)/lib -lhdf5 -lz -lm
# MacOS-X Serial
ifeq ($(UNAME), Darwin)
ifeq ($(PARALLEL), yes)
CXX = g++
CC = mpicc
H5HOME = /usr/local
CFLAGS = -O -g -I$(H5HOME)/include -DPARALLEL_IO
LDFLAGS = -L$(H5HOME)/lib -lmpich -lpmpich -lhdf5 -lz -lm
else
CXX = c++
CC = cc
F90 = xlf
H5HOME = /usr/local
CFLAGS = -O -g -I$(H5HOME)/include
LDFLAGS = -L$(H5HOME)/lib -lhdf5 -lz -lm
endif
endif
# SGI MIPS/Irix
ifeq ($(UNAME), IRIX64)
CXX = CC
CC = cc
F90 = f90
ifeq ($(PARALLEL), yes)
H5HOME = $(HDF5_DIR)
CFLAGS = -64 -O3 -I$(H5HOME)/include -DPARALLEL_IO
LDFLAGS = -64 -O3 -L$(H5HOME)/lib -lhdf5 -lz -lmpi -lm
else
H5HOME = /usr/local
CFLAGS = -O3 -I$(H5HOME)/include
LDFLAGS = -L$(H5HOME)/lib -lhdf5 -lz -lm
endif
endif
# AIX/SP-2 Parallel/serial : Seaborg
ifeq ($(UNAME), AIX)
ifeq ($(PARALLEL), yes) # parallel
CXX = mpCC_r
CC = mpxlc_r
# H5HOME = /usr/common/usg/hdf5_64/1.4.5-post2/parallel
H5HOME = /usr/common/usg/hdf5_64/1.6.1/parallel
# /usr/common/usg/hdf5/1.4.4/parallel
H4HOME = /usr/common/usg/hdf/default
OPT = -qarch=auto -qtune=auto-qcache=auto -O3 -qhot
CFLAGS = -q64 -I$(H5HOME)/include
LDFLAGS = -L$(H5HOME)/lib -lhdf5 -L$(H4HOME)/lib -lz -lsz -lm
else # serial
CXX = xlC
CC = xlc
H5HOME = /usr/common/usg/hdf5/1.4.4/serial
H4HOME = /usr/common/usg/hdf/default
OPT = -qarch=auto -qtune=auto-qcache=auto -O3 -qhot
CFLAGS = -g -bmaxdata:800000000 -bmaxstack:256000000 -I$(H5HOME)/include
LDFLAGS = -L$(H5HOME)/lib -lhdf5 -L$(H4HOME)/lib -lz -lm
endif
endif
# Linux
ifeq ($(UNAME), Linux)
# if this machine is NERSC/Davinci Altix system
ifeq ($(PROC), ia64)
CC = icc
CXX = icc
ifeq ($(PARALLEL), yes)
# IA64 Linux Parallel
ifeq ($(HOST), davinci)
H5HOME = $(HDF5_PAR)
MPILIB = -lmpi
else
H5HOME = /usr/local
HDF5_PAR_LIB = -L$(H5HOME)/lib -lhdf5 -lz -lm
HDF5_PAR_INCLUDE = -I$(H5HOME)/include
MPIHOME = /usr/local
MPILIB = -lmpich
endif # HOST
CFLAGS = -O3 -DPARALLEL_IO -DH5_HAVE_PARALLEL $(HDF5_PAR_INCLUDE)
LDFLAGS = $(HDF5_PAR_LIB) $(MPILIB)
else # IA64 Linux Serial
CFLAGS = -O3 $(HDF5_INCLUDE)
LDFLAGS = $(HDF5_LIB) -lm
endif # PARALLEL
# else this is standard IA32 linux
else
ifeq ($(PARALLEL), yes)
# Linux Parallel
CC = gcc
CXX = g++
H5HOME = /usr/local
MPIHOME = /usr/local
CFLAGS = -O -g -DPARALLEL_IO -DH5_HAVE_PARALLEL -I$(H5HOME)/include
LDFLAGS = -L$(H5HOME)/lib -lhdf5 -lmpich -lrt -lz -lm
else # Linux Serial
CXX = g++
CC = gcc
CFLAGS = -O -g -I$(H5HOME)/include
LDFLAGS = -L$(H5HOME)/lib -lhdf5 -lz -lm
endif # !PARALLEL
endif # PROC!ia64
endif # !Linux
ifeq ($(PARALLEL), yes) #parallel
ifdef F90
all: H5PartTest H5PartTest.o H5Part.o H5PartTestParallel H5PartAndreasTest H5PartF.o
else
all: H5PartTest H5PartTest.o H5Part.o H5PartTestParallel H5PartAndreasTest
endif
else
ifdef F90
all: H5PartTest H5PartTest.o H5Part.o H5PartF.o
else
all: H5PartTest H5PartTest.o H5Part.o
endif
endif
include rules.make
This diff is collapsed.
ACLOCAL_AMFLAGS=-I m4
SUBDIRS = \
doc \
src \
test \
tools
MAINTAINERCLEANFILES = \
config.h \
config.log \
config.status \
stamp-h.in \
stamp-h1
# This is a very rudimentary multiarchitecture makefile
# You need to uncomment the default block of make variables you need
# Some key things to watch for are the following defines
# -DREGRESSIONTEST : enables a main(){} inside of
# the H5Part.cc file that does simple regression testing.
# -DPARALLEL_IO : If you want to use parallel HDF5, you have to
# enable this. Otherwise, you get only the serial
# implementation of the library.
# MacOS-X Serial
#CXX = c++
#CC = cc
#F90 = xlf
#H5HOME = /usr/local
#CFLAGS = -O -g -I$(H5HOME)/include
#LDFLAGS = -L$(H5HOME)/lib -lhdf5 -lz -lm
# AIX/SP-2 Parallel : Seaborg
#CXX = mpCC_r
#CC = mpcc_r
#F90 = mpxlf
#H5HOME = /usr/common/usg/hdf5/1.4.4/parallel
#H4HOME = /usr/common/usg/hdf/default
#OPT = -qarch=auto -qtune=auto-qcache=auto -O3 -qhot
#CFLAGS = -g -bmaxdata:800000000 -bmaxstack:256000000 -I$(H5HOME)/include
#LDFLAGS = -L$(H5HOME)/lib -lhdf5 -L$(H4HOME)/lib -lz -lm
# Linux Serial
#CXX = g++
#CC = gcc
#F90 = g77 # or could be pgif90
#CFLAGS = -O -g -I$(H5HOME)/include
#LDFLAGS = -L$(H5HOME)/lib -lhdf5 -lz -lm
# Linux Jacquard
CC = mpicc
CXX = mpicxx
F90 = mpif90
H5HOME = /usr/common/usg/hdf5/1.6.3/parallel
CFLAGS = -O2 -DPARALLEL_IO -DH5_HAVE_PARALLEL -I$(H5HOME)/include
LDFLAGS = -L$(H5HOME)/lib -lhdf5 -lz -lm
# Linux Parallel
#CC = gcc
#CXX = g++
#F90 = g77
#H5HOME = /usr/local
# /usr/common/usg/hdf5/1.6.3/parallel
#MPIHOME = /usr/local
#CFLAGS = -O -g -DPARALLEL_IO -DH5_HAVE_PARALLEL -I$(H5HOME)/include
#LDFLAGS = -L$(H5HOME)/lib -lhdf5 -lmpich -lrt -lz -lm
all: H5PartTest H5PartTest.o H5Part.o
parallel: H5PartTest H5PartTest.o H5Part.o H5PartTestParallel H5PartAndreasTest # parallel regression tests
fortran: H5PartF.o # fortran bindings
include rules.make
This diff is collapsed.
Website:
http://vis.lbl.gov/Research/AcceleratorSAPP/
Particle based simulations of accelerator beam-lines, especially in six
dimensional phase space, generate vast amounts of data. Even though a subset of
statistical information regarding phase space or analysis needs to be preserved,
reading and writing such enormous restart files on massively parallel
supercomputing systems remains challenging.
H5Part is a very simple data storage schema and provides an API that simplifies
the reading/writing of the data to the HDF5 file format. An important
foundation for a stable visualization and data analysis environment is a stable
and portable file storage format and its associated APIs. The presence of a
"common file storage format," including associated APIs, will help foster a
fundamental level of interoperability across the project's software
infrastructure. It will also help ensure that key data analysis capabilities
are present during the earliest phases of the software development effort.
H5Part is built on top of the HDF5 (Hierarchical Data Format). HDF5 offers a
self-describing machine-independent binary file format that supports scalable
parallel I/O performance for MPI codes on a variety of supercomputing systems,
and works equally well on laptop computers. The API is available for C, C++, and
Fortran codes. The H5Part file format and APIs enable disparate research groups
with different simulation implementations to transparently share datasets and
data analysis tools. For instance, the common file format will enable groups
that depend on completely different simulation implementations to share data
analysis tools.
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
ACLOCAL_FLAGS="-I m4 $ACLOCAL_FLAGS"
LIBTOOLIZE_FLAGS="--force $LIBTOOLIZE_FLAGS"
AUTOMAKE_FLAGS="--add-missing --copy --foreign $AUTOMAKE_FLAGS"
LIBTOOLIZE=`which libtoolize`
if [ "$LIBTOOLIZE" = "" ]; then
LIBTOOLIZE=`which glibtoolize`
fi
if [ "$LIBTOOLIZE" = "" ]; then
echo "libtoolize not found" 1>&2
exit 1
fi
echo "+ making misc files ..."
touch NEWS README AUTHORS ChangeLog
echo
$LIBTOOLIZE $LIBTOOLIZE_FLAGS || {
echo "libtoolize failed"
exit 1
}
echo
echo "+ running aclocal ..."
aclocal $ACLOCAL_FLAGS || {
echo "aclocal failed - check that all needed development files are present on system"
exit 1
}
echo
echo "+ running autoheader ... "
autoheader || {
echo "autoheader failed"
exit 1
}
echo
echo "+ running autoconf ... "
autoconf || {
echo "autoconf failed"
exit 1
}
echo
echo "+ running automake ... "
automake $AUTOMAKE_FLAGS || {
echo "automake failed"
exit 1
}
#!/bin/sh
F90=gfortran
./configure \
$@ \
--enable-parallel \
--enable-fortran \
--enable-tools \
CC=cc CXX=CC FC=$F90 \
MPICC=cc MPICXX=CC MPIFC=ftn
sed -e 's/$F90/ftn/g' <Makefile > newMakefile
mv newMakefile Makefile
sed -e 's/$F90/ftn/g' <src/Makefile > newMakefile
mv newMakefile src/Makefile
sed -e 's/$F90/ftn/g' <test/Makefile > newMakefile
mv newMakefile test/Makefile
sed -e 's/$F90/ftn/g' <tools/Makefile > newMakefile
mv newMakefile tools/Makefile
This diff is collapsed.
This diff is collapsed.
# Doxyfile 1.4.5
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = H5Part
PROJECT_NUMBER = 1.6.6
OUTPUT_DIRECTORY = ./ReferencePages
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = ../src
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = NO
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = YES
SORT_BY_SCOPE_NAME = YES
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = NO
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT += ../src/H5Part.c
INPUT += ../src/H5PartAttrib.c
INPUT += ../src/H5Block.c
INPUT += ../src/H5BlockReadWrite.c
INPUT += ../src/H5MultiBlock.c
INPUT += ../src/H5MultiBlockReadWrite.c
INPUT += ../src/H5Part.f90
INPUT += ../src/H5PartAttrib.f90
INPUT += ../src/H5Block.f90
INPUT += ../src/H5BlockReadWrite.f90
FILE_PATTERNS =
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = NO
REFERENCES_RELATION = NO
USE_HTAGS = NO
VERBATIM_HEADERS = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = .
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER = doxyfooter
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = no
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = PARALLEL_IO
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
HIDE_UNDOC_RELATIONS = NO
HAVE_DOT = NO
CLASS_GRAPH = NO
COLLABORATION_GRAPH = NO
GROUP_GRAPHS = NO
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = NO
INCLUDED_BY_GRAPH = NO
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
Proposal for a more general file format used by H5Part/H5Block
Authors: Achim Gsell
Status: Draft
1. Introduction
H5X is the file format used by H5Part and H5Block. H5X is designed on
top of HDF5: A H5X file is a very special HDF5 file.
+--------------------+
| Application |
+--------------------+
| H5Part/H5Block API |
+--------------------+
| H5X API |
+--------------------+
| HDF5 API |
+--------------------+
| Filesystem of OS |
+--------------------+
2. H5X file format specification
2.1 The root group
2.1.1 File attributes
Attributes of the HDF5 root group are called "file attributes". There
are no restrictions on file attribute names. Names with "__" as prefix and
postfix are intended for internal use. Supported values for file attributes
are scalars and arrays of 64bit integer and 64bit floating point number as
well as string values. Arrays of strings are not supported.
2.1.1.1 Predefined file attributes
__stepname__ (optional)
See below.
__stepnumwidth__ (optional)
See below.
2.1.2 Members of the root group
Members of the root group are special formated HDF5 groups called
"step groups". The name of a step group is "<name>#<number>".
Whereby <name> is either defined by the optional file attribute
__stepname__ or set to "Step" by default. <number> is an
unsigned integer less than 2^63.
/
+- Step#0
+- Step#1
...
+- Step#n
+- StepProperties [NEW]
+- Mesh [NEW]
The optional file attribute __stepnumwidth__ defines the minimum width
of <number> in the name of the step group. The number is padded with
'0'. The minimum width defaults to zero, so that no paddings occurs.
Example: With __stepnumwidth__ := 5 the name of the step group with
number 42 is "Step#00042", with __stepnumwidth__ := 0 the name is
"Step#42".
Step groups may be unsorted in the HDF5 file und needn't be number
consecutively.
2.1.3 Other members of the root group
Other sub-groups of the root group are allowed, but the group names are restricted
to names not matching "Step#.*".
2.2 Format of a step group
2.2.1 Step attributes
Step attributes are HDF5 attributes asigned to a step group. There
are no restrictions on step attribute names. As with file attributes names
enclosed in "__" are intended for internal use. Supported values are the same
as for file attributes:
* 64bit integer value
* arrays of 64bit integer values
* 64bit floating point number
* array of 64bit floating point number
* strings
Note that array of strings are not supported!
2.2.2 Predefined step attributes
No predefined step attributes exists.
2.2.3 Members of a step group
Members of a step group are HDF5 datasets and optional one HDF5 group
with the name "Block". HDF5 datasets in a step group are called "step
datasets". The optional block group is called "block data".
Mesh?!
2.2.4 Step datasets
Step datasets are arrays of rank 1. The dataset size must be the same
for all datasets inside a step. The size of the dataset may vary
from step to step. Array values are 64bit integer or 64bit floating
point numbers. No limitations (other than given by HDF5) are given on
step dataset names.
2.2.5 Block Data
The block data group is a container for an arbitrary number of field
data. A field is a data structure to store arrays of rank m with
n-dimensional vector values. Fields are represented within HDF5
groups. The HDF5 group name is the unique identifier for a field in
the current step.
2.2.5.1 m-rank fields with n-dimensional-vector values
Values are stored per dimension in separate datasets. Thus we have n
datasets for a field with n-dimensional vector values. Each dataset
corresponse to one dimension. The datasets are numbered from '0' to
'n-1'. Arrays are stored in column major order (Fortran indexing
scheme).
/ # HDF5 root group
...
+- Step#<i> # HDF5 group
|
+- Block # HDF5 group
|
+- <field name> # HDF5 group
|
+- 0 # HDF5 dataset, first dim of vector
+- 1 # HDF5 dataset, second dim of vector
...
+- n-1 # HDF5 dataset, last dim of vector
...
2.2.5.2 m-rank fields with scalar values
Fields with scalar values are stored as special case of fields with
n-dimensional vector values with n := 1.
/ # HDF5 root group
...
+- Step#<i> # HDF5 group
|
+- Block # HDF5 group
|
+- <field name> # HDF5 group
|
+- 0 # HDF5 dataset, scalar value
...
2.3 Step properties [NEW]
Why? Much faster than step attributes if you need to access consecutive values
Group of root group with name "StepProperties"
Members are datasets
Supported values are the same as for step attributes
Mapping of value to step via object index of step group
EXTRA_DIST = \
Doxyfile doxyfooter
</BODY>
</HTML>
#include <stdlib.h>
#include <assert.h>
#include <mpi.h>
#include <H5Part.h>
#define DATASIZE 32
int main(int argc, char** argv)
{
int i, rank, nprocs;
h5part_int32_t data[DATASIZE];
h5part_int64_t stat;
H5PartFile *file;
// initialize MPI
MPI_Init (&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
char filename[8];
sprintf (filename, "%d.h5", rank);
file = H5PartOpenFileParallel(
filename,
H5PART_WRITE | H5PART_VFD_CORE,
MPI_COMM_SELF);
assert (file != NULL);
stat = H5PartSetStep(file, 0);
assert (stat == H5PART_SUCCESS);
stat = H5PartSetNumParticles(file, DATASIZE);
assert (stat == H5PART_SUCCESS);
// create fake data
for (i=0; i<DATASIZE; i++) {
data[i] = i + rank * DATASIZE;
}
// write the data
stat = H5PartWriteDataInt32(file, "data", data);
assert (stat == H5PART_SUCCESS);
H5PartCloseFile(file);
MPI_Finalize();
return EXIT_SUCCESS;
}
#include <stdlib.h>
#include <assert.h>
#include <mpi.h>
#include <H5Part.h>
#define XSIZE 8
#define YSIZE 8
#define ZSIZE 8
#define DATASIZE XSIZE*YSIZE*ZSIZE
#define H5OpenFileParallel H5PartOpenFileParallel
#define H5SetStep H5PartSetStep
#define H5Block3dSetLayout H5BlockDefine3DFieldLayout
#define H5CloseFile H5PartCloseFile
int main(int argc, char** argv)
{
int rank, nprocs;
h5part_float64_t ex[DATASIZE];
h5part_float64_t ey[DATASIZE];
h5part_float64_t ez[DATASIZE];
h5part_float64_t q[DATASIZE];
h5part_int64_t nparticles = DATASIZE;
H5PartFile *file;
// initialize MPI
MPI_Init (&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
file = H5OpenFileParallel("fields.h5", H5PART_WRITE, MPI_COMM_WORLD);
H5SetStep(file, 0);
H5Block3dSetLayout(file,
rank*XSIZE, (rank+1)*XSIZE - 1,
0, YSIZE - 1,
0, ZSIZE - 1);
H5Block3dWriteScalarFieldFloat64(file, "Q", q);
H5Block3dWrite3dVectorFieldFloat64(file, "E", ex, ez, ey);
H5CloseFile(file);
MPI_Finalize();
return EXIT_SUCCESS;
}
#include <stdlib.h>
#include <assert.h>
#include <mpi.h>
#include <H5Part.h>
#define DATASIZE 32
int main(int argc, char** argv)
{
int rank, nprocs;
h5part_float64_t x[DATASIZE];
h5part_float64_t y[DATASIZE];
h5part_float64_t z[DATASIZE];
h5part_float64_t px[DATASIZE];
h5part_float64_t py[DATASIZE];
h5part_float64_t pz[DATASIZE];
h5part_int64_t nparticles = DATASIZE;
H5PartFile *file;
// initialize MPI
MPI_Init (&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
file = H5PartOpenFileParallel("particles.h5", H5PART_WRITE, MPI_COMM_WORLD);
H5PartSetStep(file, 0);
H5PartSetNumParticles(file, nparticles);
H5PartWriteDataFloat64(file, "x", x);
H5PartWriteDataFloat64(file, "y", y);
H5PartWriteDataFloat64(file, "z", z);
H5PartWriteDataFloat64(file, "px", px);
H5PartWriteDataFloat64(file, "py", py);
H5PartWriteDataFloat64(file, "pz", pz);
H5PartCloseFile(file);
MPI_Finalize();
return EXIT_SUCCESS;
}
program H5PartTest
implicit none
include 'mpif.h'
include 'H5PartF.h'
integer :: comm, rank, ierr
integer*8 :: file_id, status, npoints, i
real*8, allocatable :: particles(:)
integer*8, allocatable :: id(:)
real*8 :: r8val
integer*8 :: i8val
comm = MPI_COMM_WORLD
call mpi_init(ierr)
call mpi_comm_rank(comm, rank, ierr)
! open the a file for parallel writing
file_id = h5pt_set_verbosity_level(5)
file_id = h5pt_openw_par('test.h5', comm)
! in the Fortran API, time steps start at 1
status = h5pt_setstep(file_id, 1_8)
! write an attribute to the file
status = h5pt_writefileattrib_string(file_id, 'desc', 'This is a test.')
r8val = 0.5
i8val = 1
status = h5pt_writefileattrib_r8(file_id, 'double', r8val, i8val)
! create fake data
npoints = 99
allocate(particles(npoints), id(npoints))
do i=1,npoints
particles(i) = real(i+npoints*rank)
id(i) = i+npoints*rank
enddo
! set the size of the 1D array
status = h5pt_setnpoints(file_id, npoints)
! write the particles
status = h5pt_writedata_r8(file_id, "x", particles)
! write the ids
status = h5pt_writedata_i8(file_id, "id", id)
! close the file
status = h5pt_close(file_id)
deallocate(particles, id)
call mpi_finalize(ierr)
end program H5PartTest
program H5PartTest
implicit none
include 'mpif.h'
include 'H5PartF.h'
integer :: comm, rank, ierr
integer*8 :: file_id, status, npoints, i
real*8, allocatable :: particles(:)
integer*8, allocatable :: id(:)
comm = MPI_COMM_WORLD
call mpi_init(ierr)
call mpi_comm_rank(comm, rank, ierr)
! open the a file for parallel writing
file_id = h5pt_openw_par('test.h5', comm)
! in the Fortran API, steps start at 1
status = h5pt_setstep(file_id, 1_8)
! write an attribute to the file
status = h5pt_writefileattrib_string(file_id, 'desc', 'This is a test.')
! create fake data
npoints = 99
allocate(particles(6*npoints), id(npoints))
do i=0,npoints-1
particles(6*i+1) = 0.0 + real(i+npoints*rank)
particles(6*i+2) = 0.1 + real(i+npoints*rank)
particles(6*i+3) = 0.2 + real(i+npoints*rank)
particles(6*i+4) = 0.3 + real(i+npoints*rank)
particles(6*i+5) = 0.4 + real(i+npoints*rank)
particles(6*i+6) = 0.5 + real(i+npoints*rank)
id(i+1) = i+npoints*rank
enddo
! set the striding to 6
status = h5pt_setnpoints_strided(file_id, npoints, 6_8)
! write the particles
status = h5pt_writedata_r8(file_id, "x", particles(1))
status = h5pt_writedata_r8(file_id, "y", particles(2))
status = h5pt_writedata_r8(file_id, "z", particles(3))
status = h5pt_writedata_r8(file_id, "px", particles(4))
status = h5pt_writedata_r8(file_id, "py", particles(5))
status = h5pt_writedata_r8(file_id, "pz", particles(6))
! disable the striding to write the ids
status = h5pt_setnpoints(file_id, npoints)
status = h5pt_writedata_i8(file_id, "id", id)
! close the file
status = h5pt_close(file_id)
deallocate(particles, id)
call mpi_finalize(ierr)
end program H5PartTest
#include <stdlib.h>
#include <assert.h>
#include <mpi.h>
#include <H5Part.h>
#define DATASIZE 32
#define ITERS 4
int main(int argc, char** argv)
{
int i, rank, nprocs;
h5part_int32_t data[ITERS*DATASIZE];
h5part_int64_t stat;
h5part_int64_t offset;
H5PartFile *file;
// initialize MPI
MPI_Init (&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
file = H5PartOpenFileParallel("test.h5", H5PART_WRITE, MPI_COMM_WORLD);
assert (file != NULL);
stat = H5PartSetStep(file, 0);
assert (stat == H5PART_SUCCESS);
stat = H5PartSetNumParticles(file, ITERS*DATASIZE);
assert (stat == H5PART_SUCCESS);
// create fake data
for (i=0; i<ITERS*DATASIZE; i++) {
data[i] = i + rank * ITERS * DATASIZE;
}
offset = rank * ITERS * DATASIZE;
// iterate over arrays
for (i=0; i<ITERS; i++) {
// set the "view" to select a subset of the dataset
stat = H5PartSetView(file,
offset + i*DATASIZE,
offset + (i+1)*DATASIZE - 1);
assert (stat == H5PART_SUCCESS);
// write the data
stat = H5PartWriteDataInt32(file, "data", data + i*DATASIZE);
assert (stat == H5PART_SUCCESS);
}
H5PartCloseFile(file);
MPI_Finalize();
return EXIT_SUCCESS;
}
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-02-02.21
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&