repo migration

This commit is contained in:
2006-09-11 20:19:10 +00:00
commit 41511462f9
167 changed files with 64535 additions and 0 deletions
+167
View File
@@ -0,0 +1,167 @@
* text=auto !eol
/AUTHORS -text
/COPYRIGHT -text
/ChangeLog -text
/GNUmakefile.orig -text
/Makefile.am -text
/Makefile.orig -text
/NEWS -text
/README -text
/autogen.sh -text
/config.guess -text
/config.h.in -text
/config.sub -text
/configure.ac -text
/depcomp -text
doc/2006-Berkeley-Visit/BethelSAP_1page-4.doc -text
doc/2006-Berkeley-Visit/H5Part.ppt -text
doc/2006-Berkeley-Visit/H5xxx.ppt -text
doc/2006-Berkeley-Visit/H5xxxVisIt.fig -text
doc/2006-Berkeley-Visit/SAP-Combined-v6.doc -text
doc/2006-Berkeley-Visit/aqpsi2006mar22.pdf -text
doc/2006-Berkeley-Visit/hdf.ps -text
doc/Building.html -text
doc/BuildingHDF5.html -text
doc/Downloading.html -text
doc/Doxyfile -text
doc/H5PartExpress.html -text
doc/H5PartIDL.html -text
doc/H5PartParaview.html -text
doc/H5PartTools.html -text
doc/H5PartVisIt.html -text
doc/H5PartVisIt/cloud_visit.png -text
doc/H5PartVisIt/cloud_visit.s.png -text
doc/H5PartVisIt/cloud_visit_2D.png -text
doc/H5PartVisIt/cloud_visit_2D.s.png -text
doc/H5PartVisIt/visit_query1.png -text
doc/H5PartVisIt/visit_query1.s.png -text
doc/H5tools/H5tools.htm -text
doc/H5tools/H5tools_files/snapshot1.jpg -text
doc/H5xxx/H5xxx.tex -text
doc/H5xxx/JAC2003.cls -text
doc/H5xxx/makefile -text
doc/InternalLayout.html -text
doc/ReferencePages/H5PartF_8c.html -text
doc/ReferencePages/H5Part_8c.html -text
doc/ReferencePages/H5Part_8h-source.html -text
doc/ReferencePages/H5Part_8h.html -text
doc/ReferencePages/annotated.html -text
doc/ReferencePages/doxygen.css -text
doc/ReferencePages/doxygen.png -text
doc/ReferencePages/files.html -text
doc/ReferencePages/functions.html -text
doc/ReferencePages/functions_vars.html -text
doc/ReferencePages/globals.html -text
doc/ReferencePages/globals_defs.html -text
doc/ReferencePages/globals_func.html -text
doc/ReferencePages/globals_type.html -text
doc/ReferencePages/index.html -text
doc/ReferencePages/structH5IO__getname__t-members.html -text
doc/ReferencePages/structH5IO__getname__t.html -text
doc/ReferencePages/structH5PartFile-members.html -text
doc/ReferencePages/structH5PartFile.html -text
doc/UsingC.html -text
doc/UsingF.html -text
doc/collision_6.png -text
doc/collision_6.s.png -text
doc/h5part.html -text
doc/hdf5.pdf -text
doc/layout.png -text
/install-sh -text
/license.txt -text
/missing -text
/rules.make -text
src/H5Block.c -text
src/H5Block.h -text
src/H5BlockErrors.h -text
src/H5BlockF90.inc -text
src/H5BlockPrivate.h -text
src/H5BlockTypes.h -text
src/H5Part++.cc -text
src/H5Part++.hh -text
src/H5Part.c -text
src/H5Part.cc -text
src/H5Part.h -text
src/H5Part.hh -text
src/H5PartErrors.h -text
src/H5PartF.c -text
src/H5PartF90.inc -text
src/H5PartPrivate.h -text
src/H5PartTypes.h -text
src/H5Units.h -text
src/Makefile.am -text
src/TestUnderscore.f -text
src/TestUnderscoreC.c -text
src/addToDoxygenMainPage.h -text
test/Bench.c -text
test/H5BlockParallelTest1.c -text
test/H5BlockReadParallel1.c -text
test/H5BlockTest1.c -text
test/H5BlockWrite1.c -text
test/H5ParallelTest.cc -text
test/H5PartAndreasTest.cc -text
test/H5PartTest.cc -text
test/H5PartTestParallel.cc -text
test/H5ecloudExample.cc -text
test/H5test.cc -text
test/H5testF.f -text
test/H5testFpar.f -text
test/Makefile.am -text
tools/Makefile.am -text
tools/README -text
tools/h5pAttrib.cc -text
tools/h5pToGNUplot.cc -text
tools/h5pToGNUplot.py -text
visit_plugins/databases/H5Part/.depend -text
visit_plugins/databases/H5Part/Makefile -text
visit_plugins/databases/H5Part/README.txt -text
visit_plugins/databases/H5Part/avth5partFileFormat.C -text
visit_plugins/databases/H5Part/avth5partFileFormat.h -text
visit_plugins/databases/H5Part/h5part.xml -text
visit_plugins/databases/H5Part/h5partCommonPluginInfo.C -text
visit_plugins/databases/H5Part/h5partEnginePluginInfo.C -text
visit_plugins/databases/H5Part/h5partMDServerPluginInfo.C -text
visit_plugins/databases/H5Part/h5partPluginInfo.C -text
visit_plugins/databases/H5Part/h5partPluginInfo.h -text
visit_plugins/operators/BinnerFilter/.depend -text
visit_plugins/operators/BinnerFilter/Binner.xml -text
visit_plugins/operators/BinnerFilter/BinnerCommonPluginInfo.C -text
visit_plugins/operators/BinnerFilter/BinnerEnginePluginInfo.C -text
visit_plugins/operators/BinnerFilter/BinnerFilter.C -text
visit_plugins/operators/BinnerFilter/BinnerFilter.h -text
visit_plugins/operators/BinnerFilter/BinnerFilter.java -text
visit_plugins/operators/BinnerFilter/BinnerGUIPluginInfo.C -text
visit_plugins/operators/BinnerFilter/BinnerMakefile -text
visit_plugins/operators/BinnerFilter/BinnerPluginInfo.C -text
visit_plugins/operators/BinnerFilter/BinnerPluginInfo.h -text
visit_plugins/operators/BinnerFilter/BinnerScriptingPluginInfo.C -text
visit_plugins/operators/BinnerFilter/BinnerViewerPluginInfo.C -text
visit_plugins/operators/BinnerFilter/Binnerreplace.txt -text
visit_plugins/operators/BinnerFilter/Makefile -text
visit_plugins/operators/BinnerFilter/PyBinner.C -text
visit_plugins/operators/BinnerFilter/PyBinner.h -text
visit_plugins/operators/BinnerFilter/QvisBinnerWindow.C -text
visit_plugins/operators/BinnerFilter/QvisBinnerWindow.h -text
visit_plugins/operators/BinnerFilter/avtBinnerFilter.C -text
visit_plugins/operators/BinnerFilter/avtBinnerFilter.h -text
visit_plugins/operators/BinnerFilter/icon.xpm -text
visit_plugins/operators/RandomSample/.depend -text
visit_plugins/operators/RandomSample/H5PartRandomSampleAttributes.C -text
visit_plugins/operators/RandomSample/H5PartRandomSampleAttributes.h -text
visit_plugins/operators/RandomSample/H5PartRandomSampleAttributes.java -text
visit_plugins/operators/RandomSample/H5PartRandomSampleCommonPluginInfo.C -text
visit_plugins/operators/RandomSample/H5PartRandomSampleEnginePluginInfo.C -text
visit_plugins/operators/RandomSample/H5PartRandomSampleGUIPluginInfo.C -text
visit_plugins/operators/RandomSample/H5PartRandomSamplePluginInfo.C -text
visit_plugins/operators/RandomSample/H5PartRandomSamplePluginInfo.h -text
visit_plugins/operators/RandomSample/H5PartRandomSampleScriptingPluginInfo.C -text
visit_plugins/operators/RandomSample/H5PartRandomSampleViewerPluginInfo.C -text
visit_plugins/operators/RandomSample/Makefile -text
visit_plugins/operators/RandomSample/PyH5PartRandomSampleAttributes.C -text
visit_plugins/operators/RandomSample/PyH5PartRandomSampleAttributes.h -text
visit_plugins/operators/RandomSample/QvisH5PartRandomSampleWindow.C -text
visit_plugins/operators/RandomSample/QvisH5PartRandomSampleWindow.h -text
visit_plugins/operators/RandomSample/RandomSample.xml -text
visit_plugins/operators/RandomSample/avtH5PartRandomSampleFilter.C -text
visit_plugins/operators/RandomSample/avtH5PartRandomSampleFilter.h -text
visit_plugins/operators/RandomSample/icon.xpm -text
+10
View File
@@ -0,0 +1,10 @@
Andreas Adelmann (PSI)
Achim Gsell (PSI)
Benedikt Oswald (PSI)
Wes Bethel (NERSC/LBNL)
John Shalf (NERSC/LBNL)
Cristina Siegerist (NERSC/LBNL)
Please use h5part@lists.psi.ch for communicaion.
+7
View File
@@ -0,0 +1,7 @@
*** Copyright Notice ***
H5Part Copyright (c) 2006, 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.
View File
+133
View File
@@ -0,0 +1,133 @@
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
+14
View File
@@ -0,0 +1,14 @@
# Trial by Antino Kim
# Top level Makefile.am
SUBDIRS = \
src \
test \
tools
MAINTAINERCLEANFILES = \
config.h \
config.log \
config.status \
stamp-h.in \
stamp-h1
Executable
+59
View File
@@ -0,0 +1,59 @@
# 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
+147
View File
@@ -0,0 +1,147 @@
Error Handling
--------------
Now all functions, in which an error could occure, are returning a
value. This value is either a 64bit integer or a pointer.
A negative 64bit integer as result indicates an error. Values >= 0
indicates successfull execution. This is similiar to the convention
used in UNIX system calls, but we do not return -1 but the error
number (which is always negative).
For functions returning a pointer the NULL-pointer is used to indicate
an error. You can call the function H5PartGetErrno() to get the error
number. For the time being there is no strerror(3) or perror(3)
equivalent.
API Changes
-----------
There are several changes in the API of H5Part. The biggest change is
a side-effect of the implementation of strict error handling. The
impact to the existing C/C++ code is very small. But now you *can*
and *should* implement some kind of error handling. The simplest
error handling is to set an error handler which aborts the program as
soon as an error occured.
The next "biggest" change is the use of H5Part types instead of "long
long" and "double". The replacement of "long long" is "h5part_int64_t"
and for "double" "h5part_float64_t". This change has now effect in
Fortran.
In some functions the argument type changed from "int" to
"h5part_int64_t". Since on most systems "int" is a 32bit integer,
calls to these functions must be adapted to the new API. In C/C++ the
compiler will complain about it. But in Fortran you will *not* get an
error message.So, you must check your Fortran code carefully.
Changes in detail (not listed are functions where only the return
type changed from any to "h5part_int64_t"):
New API Changes to old API
h5part_int64_t void
H5PartSetNumParticles (
H5PartFile *f,
h5part_int64_t nparticles long long
);
h5part_int64_t int
H5PartWriteDataFloat64 (
H5PartFile *f,
char *name,
h5part_float64_t *dta double
);
h5part_int64_t int
H5PartWriteDataInt64 (
H5PartFile *f,
char *name,
h5part_int64_t *dta long long
);
h5part_int64_t void
H5PartSetStep (
H5PartFile *f,
h5part_int64_t step int
);
h5part_int64_t void
H5PartSetView (
H5PartFile *f,
h5part_int64_t start, long long
h5part_int64_t end long long
);
h5part_int64_t int
H5PartGetView (
H5PartFile *f,
h5part_int64_t *start, long long
h5part_int64_t *end long long
);
h5part_int64_t int
H5PartReadDataFloat64 (
H5PartFile *f,
char *name,
h5part_float64_t *dta double
);
h5part_int64_t int
H5PartReadDataInt64 (
H5PartFile *f,
char *name,
h5part_int64_t *dta long long
);
h5part_int64_t void
H5PartReadParticleStep (
H5PartFile *f,
h5part_int64_t step, int
h5part_float64_t *x, double
h5part_float64_t *y, double
h5part_float64_t *z, double
h5part_float64_t *px, double
h5part_float64_t *py, double
h5part_float64_t *pz, double
h5part_int64_t *id long long
);
New functions:
h5part_int64_t
H5PartSetVerbosityLevel (
unsigned int
);
h5part_int64_t
H5PartSetErrorHandler (
h5part_error_handler handler
);
h5part_int64_t
H5PartGetErrno (
void
);
h5part_int64_t
H5PartDefaultErrorHandler (
const char *funcname,
const h5part_int64_t eno,
const char *fmt,
...
);
h5part_int64_t
H5PartAbortErrorHandler (
const char *funcname,
const h5part_int64_t eno,
const char *fmt,
...
);
Removed functions:
int
H5PartFileIsValid (
H5PartFile *f
);
+393
View File
@@ -0,0 +1,393 @@
==============================================================================
README file for H5Part configure
==============================================================================
+ 0. HDF5 library
-----------------
Make sure you have a working version of the HDF5 library in your computer. If you plan
to use parallel I/O you need to use a parallel HDF5 version. If you don't have the
library download the sources from http://hdf.ncsa.uiuc.edu/HDF5/
+ 1. Quick start (If you feel lucky...)
----------------------------------------
For many platforms, where compilers are installed in the "default" location
and all the environment variables are set correctly, it should be sufficient
to type:
./configure [OPTIONS] && make [install]
to have the libraries and test program compiled.
==============================================================================
+ 2. configure line options
----------------------------
(1) Enable options
--enable-fortran
--enable-parallel
--enable-tools
--enable-python
--enable-64 (only for AIX and Irix)
(2) Setting compilers related variables manually
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Compiler environment variables:
CC C compiler command
CXX C++ compiler command
FC Fortran compiler command
(3) Setting prefix for installation manually
--prefix=PREFIX install files in PREFIX
For more information, type:
./configure --help
==============================================================================
+ 3. Platform specific settings for compiling libraries & test programs
------------------------------------------------------------------------
Building
make : builds the libraries and test programs
make install: builds and installs
make clean : removes extraneous object files
make distclean : returns configuration to unconfigured state
As tested on hosts:
(1) Davinci <davinci.nersc.gov> (Linux"SUSE"-ia64)
---------------------------------------------------
FIRST THING FIRST!! Type:
module load intel
to have the proper compilers set up for use.
module load hdf5_par
[NOTE: module load hdf5 does not work at this moment.
Possible installation error of HDF5 on Davinci.]
Brief profile:
CC = icc
CXX = icc
FC = ifort
MPICC = icc
MPICXX = icc
MPIFC = ifort
If default doesn't work, try:
For C shell:
env CC=icc CXX=icc FC=ifort MPICC=icc MPICXX=icc MPIFC=ifort ./configure && make install
For Korn or Bourne shell:
CC=icc CXX=icc FC=ifort MPICC=icc MPICXX=icc MPIFC=ifort ./configure && make install
And, of course, you should add configure options, such as --enable-fortran --enable-parallel.
On this host, executing:
For C shell:
env CC=icc CXX=icc FC=ifort MPICC=icc MPICXX=icc MPIFC=ifort ./configure --enable-fortran --enable-parallel && make install
For Korn or Bourne shell:
CC=icc CXX=icc FC=ifort MPICC=icc MPICXX=icc MPIFC=ifort ./configure --enable-fortran --enable-parallel && make install
has functioned correctly.
To run test program, go to test directory:
(i) Serial test
run:
./H5testF
./H5PartTest
(ii) Parallel test
run:
mpirun 2 H5testFpar
mpirun 2 H5PartTestP
NOTE: Number 2 above is a arbitrary number that indicates the number of processes.
(2) Jacquard <jacquard.nersc.gov> (Linux"SUSE"-x86_64)
-------------------------------------------------------
Brief profile:
CC = pathcc
CXX = pathCC
FC = pathf90
MPICC = mpicc
MPICXX = mpicxx
MPIFC = mpif90
If default doesn't work, try:
For C shell:
env CC=pathcc CXX=pathCC FC=pathf90 MPICC=mpicc MPICXX=mpicxx MPIFC=mpif90 ./configure && make install
For Korn or Bourne shell:
CC=pathcc CXX=pathCC FC=pathf90 MPICC=mpicc MPICXX=mpicxx MPIFC=mpif90 ./configure && make install
And, of course, you should add configure options, such as --enable-fortran --enable-parallel.
On this host, executing:
For C shell:
env CC=pathcc CXX=pathCC FC=pathf90 MPICC=mpicc MPICXX=mpicxx MPIFC=mpif90 ./configure --enable-fortran --enable-parallel && make install
For Korn or Bourne shell:
CC=pathcc CXX=pathCC FC=pathf90 MPICC=mpicc MPICXX=mpicxx MPIFC=mpif90 ./configure --enable-fortran --enable-parallel && make install
has functioned correctly.
To run test program, go to test directory:
(i) Serial test
run:
./H5testF
./H5PartTest
(ii) Parallel test
In Jacquard, we need a script to run parallel programs, since Jacquard does not support interactive parallel processing. Instead, we need to submit the task to a queue. A sample script (run_H5testFpar.scr) may look like below:
+++++++++++++++++++++++++++++++++++++++
#!/bin/csh
#PBS -l nodes=1:ppn=2,walltime=00:05:00
#PBS -N H5testFpar
#PBS -o H5testFpar.out
#PBS -e H5testFpar.err
#PBS -q debug
#PBS -A mpccc
#PBS -V
setenv PBS_OWORKDIR /home/H5Part/test
cd $PBS_O_WORKDIR
mpirun -np 2 ./H5testFpar
+++++++++++++++++++++++++++++++++++++++
Then, we need to submit the task to a queue by running:
qsub run_H5testFpar.scr
After processed, the result will appear in H5testFpar.out, and error messages will appear in H5testFpar.err.
(3) Bassi <bassi.nersc.ogv> (AIX5.3.0.0-Power 3)
-------------------------------------------------
FIRST THING FIRST!! Type:
module load gcc
to have the proper compilers set up for use.
Brief profile:
CC = cc_r
CXX = cc_r
FC = xlf_r
MPICC = mpcc_r
MPICXX = mpcc_r
MPIFC = mpxlf_r
If default doesn't work, try:
For C shell:
env CC=cc_r CXX=cc_r FC=xlf_r MPICC=mpcc_r MPICXX=mpcc_r MPIFC=mpxlf_r ./configure && make install
For Korn or Bourne shell:
CC=cc_r CXX=cc_r FC=xlf_r MPICC=mpcc_r MPICXX=mpcc_r MPIFC=mpxlf_r ./configure && make install
And, of course, you should add configure options, such as --enable-fortran --enable-parallel.
On this host, executing:
For C shell:
env CC=cc_r CXX=cc_r FC=xlf_r MPICC=mpcc_r MPICXX=mpcc_r MPIFC=mpxlf_r ./configure --enable-fortran --enable-parallel && make install
For Korn or Bourne shell:
CC=cc_r CXX=cc_r FC=xlf_r MPICC=mpcc_r MPICXX=mpcc_r MPIFC=mpxlf_r ./configure --enable-fortran --enable-parallel && make install
has functioned correctly.
To run test program, go to test directory:
(i) Serial test
run:
./H5testF
./H5PartTest
(ii) Parallel test
run:
unsetenv MP_SINGLE_THREAD
poe ./H5PartTestP -procs 2 -nodes 1
poe ./H5testFpar -procs 2 -nodes 1
For more details on how to run parallel programs on Bassi, go to:
http://www.nersc.gov/nusers/resources/bassi/running_jobs/
(4) Starsky <starsky.lbl.gov> (Darwin8.5.0-PowerPC)
----------------------------------------------------
FIRST THING FIRST!! Set environment variables: (in tcsh)
setenv LD_LIBRARY_PATH /usr/local/g95/lib/gcc-lib/powerpc-apple-darwin8.5.0/4.0.3/
setenv PATH ${PATH}:/usr/local/g95/bin
NOTE: This environment variable setting is specifit to Starsky. It is to make configure find the fortran compiler.
Brief profile:
CC = gcc
CXX = g++
FC = g95
If default doesn't work, try:
For C shell:
env CC=gcc CXX=g++ FC=g95 ./configure && make install
For Korn or Bourne shell:
CC=gcc CXX=g++ FC=g95 ./configure && make install
And, of course, you should add configure options, such as --enable-fortran --enable-parallel.
On this host, executing:
For C shell:
env CC=gcc CXX=g++ FC=g95 ./configure --enable-fortran && make install
For Korn or Bourne shell:
CC=gcc CXX=g++ FC=g95 ./configure --enable-fortran && make install
has functioned correctly.
To run test program, go to test directory:
(i) Serial test
run:
./H5testF
./H5PartTest
(5) Linux AMD64 Visualization group workstations (Linux"SUSE"-x86_64)
---------------------------------------------------------
Brief profile:
CC = gcc
CXX = g++
FC = g95
If default doesn't work, try:
For C shell:
env CC=gcc CXX=g++ FC=g95 ./configure && make install
For Korn or Bourne shell:
CC=gcc CXX=g++ FC=g95 ./configure && make install
And, of course, you should add configure options, such as --enable-fortran --enable-parallel.
On this host, executing:
For C shell:
env CC=gcc CXX=g++ FC=g95 ./configure --enable-fortran && make install
For Korn or Bourne shell:
CC=gcc CXX=g++ FC=g95 ./configure --enable-fortran && make install
has functioned correctly.
To run test program, go to test directory:
(i) Serial test
run:
./H5testF
./H5PartTest
==============================================================================
+ 4. Trouble shooting (Things to check for...)
--------------------------------------------
(0) Have you set the LD_LIBRARY_PATH?
---Some systems require the user to manually set the environment variable, LD_LIBRARY_PATH. To do so:
set the environment variable HDF5ROOT or PHDF5ROOT to point to your installation of HDF5 (serial and/or parallel respectively).
For Korn or Bourne shell:
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HDF5ROOT}/lib;export LD_LIBRARY_PATH
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:{PHDF5ROOT}/lib;export LD_LIBRARY_PATH
For C shell:
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${HDF5ROOT}/lib
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${PHDF5ROOT}/lib
Note that the values of HDF5ROOT & PHDF5ROOT will be in the "summary" section when you run configure.
Not properly set LD_LIBRARY_PATH value may result in a runtime error:
./H5PartTest: error while loading shared libraries: libhdf5.so.0: cannot open shared object file: No such file or directory
(1) Are the compilers set correctly?
---Check with: which COMPILER
(2) Have you installed HDF5?
---You can get it at: http://vis.lbl.gov/Research/AcceleratorSAPP/index.html
(3) Have you loaded the proper modules?
---It is necessary in Davinci & Bassi, and configure && make install may not work without it.
Executable
+46
View File
@@ -0,0 +1,46 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
echo "+ making misc files ..."
touch NEWS README AUTHORS ChangeLog
echo
echo
echo
echo "+ running aclocal ..."
aclocal $ACLOCAL_FLAGS || {
echo
echo "aclocal failed - check that all needed development files are present on system"
exit 1
}
echo
echo
echo
echo
echo "+ running autoheader ... "
autoheader || {
echo
echo "autoheader failed"
exit 1
}
echo
echo
echo
echo "+ running autoconf ... "
autoconf || {
echo
echo "autoconf failed"
exit 1
}
echo
echo
echo
echo "+ running automake ... "
automake -a -c --foreign || {
echo
echo "automake failed"
exit 1
}
echo
echo
echo
Vendored Executable
+1469
View File
File diff suppressed because it is too large Load Diff
Executable
+44
View File
@@ -0,0 +1,44 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* "" */
#undef MY_BUILD_CPU
/* "" */
#undef MY_BUILD_OS
/* "" */
#undef MY_BUILD_VENDOR
/* "" */
#undef MY_GNUNAME
/* "" */
#undef MY_UNAME
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Version number of package */
#undef VERSION
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
Vendored Executable
+1563
View File
File diff suppressed because it is too large Load Diff
+616
View File
@@ -0,0 +1,616 @@
# Every configure script must call AC_INIT before doing anything else.
# AC_INIT (package, version, [bug-report], [tarname])
AC_INIT([H5Part], [Ver.1.0], [vis@hpcrdm.lbl.gov])
# Ensure that a recent enough version of Autoconf is being used.
# If the version of Autoconf being used to create configure is earlier than version,
# print an error message to the standard error output and do not create configure.
#AC_PREREQ(2.59)
# should be called right after AC_INIT.
# configure scripts can create a C header file containing `#define' directives.
# The AC_CONFIG_HEADERS macro selects this kind of output.
AC_CONFIG_HEADER(config.h)
##################################################################################
#################### A SIMPLE WORK AROUND TO USE ENV. VARS #######################
##################################################################################
SAVE_CC=$CC
SAVE_CXX=$CXX
SAVE_FC=$FC
SAVE_MPICC=$MPICC
SAVE_MPICXX=$MPICXX
SAVE_MPIFC=$MPIFC
SAVE_MPILIB=$MPILIB
SAVE_MPIINC=$MPIINC
SAVE_CFLAGS=$CFLAGS
SAVE_FFLAGS=$FFLAGS
SAVE_MPIROOT=$MPIROOT
SAVE_HDF5ROOT=$HDF5ROOT
SAVE_PHDF5ROOT=$PHDF5ROOT
SAVE_LDFLAGS=$LDFLAGS
##################################################################################
################## PATH SERACH FUNCTION - to be used later... ####################
##################################################################################
# /*@@
# @routine CCTK_Search
# @date Wed Jul 21 11:16:35 1999
# @author Tom Goodale
# @desc
# Used to search for something in various directories
# @enddesc
#@@*/
PATH_Search()
{
eval $1=""
if test $# -lt 4 ; then
h5part_basedir=""
else
h5part_basedir="$4/"
fi
for h5part_place in $2
do
echo -n "Looking in $h5part_place ... $ac_c" #1>&6
if test -r "$h5part_basedir$h5part_place/$3" ; then
echo "$ac_t"" Found" #1>&6
eval $1="$h5part_place"
break
fi
if test -d "$h5part_basedir$h5part_place/$3" ; then
echo "$ac_t"" Found" #1>&6
eval $1="$h5part_place"
break
fi
echo "$ac_t"" No" #1>&6
done
return
}
##################################################################################
################ MISC SETTINGS INCLUDING C & C++ COMPILER SETTING ################
##################################################################################
# Compute the canonical host-system type variable, host, and its three individual
# parts host_cpu, host_vendor, and host_os.
AC_CANONICAL_HOST
uname=`uname -s`
if test $uname = "AIX"; then
# Notify the user that configure is checking for a particular feature.
# This macro prints a message that starts with `checking ' and ends with `...' and no newline.
# It must be (?) followed by a call to AC_MSG_RESULT to print the result of the check and the newline.
AC_MSG_CHECKING([if system is AIX])
# AC_MSG_RESULT (result-description)
# Notify the user of the results of a check
AC_MSG_RESULT([OK])
# If on AIX, define _ALL_SOURCE. Allows the use of some BSD functions.
# Should be called before any macros that run the C compiler.
AC_AIX
fi
# DAVINCI SPECIFIC!!!
if test `uname -n` = "davinci"; then
echo "DAVINCI SPECIFIC TESTING FOR STDC++ LIBRARY!"
PATH_Search STDCXX_CHECK '/usr/lib64 /usr/lib' libstdc++.a
# if STDCXX_CHECK is set...
if test "$STDCXX_CHECK" = "/usr/lib64"; then
echo "STDCXX setting ..."
echo "STDCXX_CHECK = $STDCXX_CHECK ..."
STDCXX="-L/usr/lib64 -lstdc++"
echo "STDCXX = $STDCXX ..."
elif test "$STDCXX_CHECK" = "/usr/lib"; then
echo "STDCXX setting ..."
echo "STDCXX_CHECK = $STDCXX_CHECK ..."
STDCXX="-L/usr/lib -lstdc++"
echo "STDCXX = $STDCXX ..."
fi
fi
# Determine a C compiler to use.
# If CC is not already set in the environment, check for gcc and cc, then for other C compilers.
# Set output variable CC to the name of the compiler found.
# Look for mpicc first, then icc, mpcc_r
AC_PROG_CC(pathcc icc cc_r gcc cc)
# AC_PROG_CC doesn't pick up cc_r in Bassi. The following AC_PATH_PROGS is the fix.
AC_PATH_PROGS([BAS_CC], [cc_r], [], [$PATH])
# if BAS_CC not empty
if test -n "$BAS_CC"; then
echo "CC setting for Bassi ..."
CC=$BAS_CC
echo "CC = $CC ..."
fi
# Determine a C++ compiler to use.
# Check if the environment variable CXX or CCC (in that order) is set;
# if so, then set output variable CXX to its value.
# Otherwise, if the macro is invoked without an argument,
# then search for a C++ compiler under the likely names (first g++ and c++ then other names).
# If none of those checks succeed, then as a last resort set CXX to g++.
AC_PROG_CXX(pathCC icc cc_r g++ gcc cc)
# Set output variable INSTALL to the path of a BSD-compatible install program, if one is
# found in the current PATH.
# Otherwise, set INSTALL to `dir/install-sh -c`
AC_PROG_INSTALL
# AM_INIT_AUTOMAKE is required to use autoconf with automake
AM_INIT_AUTOMAKE()
AC_PROG_RANLIB
# Default prefix for bindir, etc... (eg >> ./build/bin)
AC_PREFIX_DEFAULT(`pwd`/build)
# AC_DEFINE_UNQUOTED (variable, value, [description])
# Define the C preprocessor variable variable to value
# Use this macro instead of AC_DEFINE when variable or value is a shell variable.
AC_DEFINE_UNQUOTED(MY_BUILD_VENDOR, "$host_vendor", "")
AC_DEFINE_UNQUOTED(MY_BUILD_CPU, "$host_cpu", "")
AC_DEFINE_UNQUOTED(MY_BUILD_OS, "$host_os", "")
AC_DEFINE_UNQUOTED(MY_GNUNAME, "${host_cpu}-${host_vendor}-${host_os}", "")
AC_DEFINE_UNQUOTED(MY_UNAME, "$uname", "")
##################################################################################
########################### CONFIGURE LINE OPTIONS ###############################
##################################################################################
######################### 64-bit compilation enabled #############################
AC_MSG_CHECKING([if 64-bit compilation is enabled])
# AC_ARG_ENABLE (feature, help-string, [action-if-given], [action-if-not-given])
# If the user gave configure the option `--enable-feature' or `--disable-feature',
# run shell commands action-if-given.
# You should format your help-string with the macro AC_HELP_STRING.
AC_ARG_ENABLE([64],
[AC_HELP_STRING([--enable-64],[Compile using 64-bit flags [default=no]])],
[USE_64=$enableval])
# If --enable-64 is set in the configure line
if test "X$USE_64" = "Xyes"; then
echo "YES, 64-BIT ENABLED"
if test $uname = "AIX"; then
CFLAGS="$CFLAGS -q64"
FFLAGS="$FFLAGS -q64"
fi
if test $uname = "IRIX64"; then
CFLAGS="$CFLAGS -64"
FFLAGS="$FFLAGS -64 -fPIC -fno-second-underscore"
fi
else
echo "NO, 64-BIT NOT ENABLED"
fi
############################### fortran enabled ##################################
AC_MSG_CHECKING([if fortran interface enabled])
AC_MSG_RESULT([])
AC_ARG_ENABLE([fortran],
[AC_HELP_STRING([--enable-fortran], [Compile the Fortran interface [default=no]])],
[USE_FORTRAN=$enableval])
if test "X$USE_FORTRAN" = "Xyes"; then
echo "YES, FORTRAN ENABLED"
# Start looking for ifort first
AC_PROG_FC(ifort xlf_r pathf90 g95 g90 ftn)
if test -n "$FC" ; then
if test "X$FC" = "Xg95"; then
FFLAGS="${FFLAGS} -fno-second-underscore"
fi
AC_MSG_CHECKING([Test Number of FC Underscores])
AC_MSG_RESULT([OK])
`cd src && rm -f TestUnderscore.o TestUnderscoreC.o TestUnderscore`
`cd src && ${FC} ${FFLAGS} -c TestUnderscore.f`
`cd src && ${CC} ${CFLAGS} -c TestUnderscoreC.c`
`cd src && ${FC} ${FFLAGS} -o TestUnderscore TestUnderscore.o TestUnderscoreC.o -lc`
if test -f src/TestUnderscore ; then
UNDERSCORE_H=Underscore.h
`cd src && cat COPYRIGHT > Underscore.h`
`cd src && ./TestUnderscore >> Underscore.h`
echo "==== Underscore.h contains ============="
cat src/Underscore.h
echo "========================================"
else
AC_MSG_ERROR(could not build fortran executable)
USE_FORTRAN = "no"
fi
else
AC_MSG_ERROR(could not find a fortran compiler)
USE_FORTRAN = "no"
exit 1
fi
else
echo "NO, FORTRAN NOT ENABLED"
fi
########################### parallel interface enabled ###########################
AC_MSG_CHECKING([if parallel interface enabled])
AC_ARG_ENABLE([parallel],
[AC_HELP_STRING([--enable-parallel], [Compile the MPI/IO interface [default=no]])],
[USE_PARALLEL=$enableval])
if test "X$USE_PARALLEL" = "Xyes"; then
AC_MSG_RESULT([YES, PARALLEL ENABLED])
AC_MSG_CHECKING([if we can compile MPI code without setting flags])
AC_TRY_LINK([#include "mpi.h"], [
MPI_Comm comm;
int n;
MPI_Comm_size( comm, &n ); ],
[echo 'yes'; r='yes'], [echo "no"; r='no'] )
if test "X$r" = "Xyes"; then
MPICC=$CC
set -x
if test -z "$MPICXX"; then
# we should add a test whether this C++ wrapper exists or not
MPICXX=${MPICC%/*}/mpicxx
fi
set +x
else
AC_PATH_PROGS([MPICC], [mpicc mpcc_r], [], [$PATH])
AC_PATH_PROGS([MPICXX], [mpicxx mpcc_r], [], [$PATH])
if test -z "$MPICC" -o -z "$MPICXX"; then
AC_ARG_ENABLE([mpipath],
[AC_HELP_STRING([--enable-mpipath], [path to MPI installation [default=""]])],
[MPIROOT=$enableval], [MPIROOT=""])
if test -z "$MPIROOT"; then
AC_MSG_CHECKING([for MPI root ])
echo
P=''
P="$P /usr"
P="$P /usr/local"
P="$P /usr/local/mpi"
P="$P /usr/local/packages/mpi"
P="$P /usr/local/mpich2"
P="$P /usr/local/mpich"
P="$P /opt/xt-mpt/default/mpich2-64/P2"
PATH_Search MPIROOT "$P" include/mpi.h
fi
if test ! -n "$MPIROOT"; then
AC_MSG_RESULT([Cannot determine MPIROOT])
exit 1
fi
if test ! -n "$MPICC"; then
AC_MSG_CHECKING([No MPICC detected. Setting MPICC to CC.])
MPICC=$CC
echo "MPICC = $MPICC"
fi
# if MPICXX empty
if test ! -n "$MPICXX"; then
MPICXX=$CXX
AC_MSG_CHECKING([No MPICXX detected. Setting MPICXX = CXX = $MPICXX ])
echo
fi
MPIINC="${MPIINC} -I${MPIROOT}/include"
FFLAGS="${FFLAGS} -I${MPIROOT}/include"
AC_MSG_CHECKING([for name of MPI lib ])
if test -e ${MPIROOT}/lib/libmpi.a; then
MPILIB="-L${MPIROOT}/lib -lmpi"
elif test -e ${MPIROOT}/lib/libmpi.so; then
MPILIB="-L${MPIROOT}/lib -lmpi"
elif test -e ${MPIROOT}/lib/libmpich.a; then
MPILIB="-L${MPIROOT}/lib -lmpich"
elif test -e ${MPIROOT}/lib/libmpich.so; then
MPILIB="-L${MPIROOT}/lib -lmpich"
else
AC_MSG_RESULT([not found])
exit 1
fi
AC_MSG_RESULT([${MPILIB}])
fi
fi
# parallel + fortran
if test "X$USE_FORTRAN" = "Xyes"; then
echo "PARALLEL ENABLED WITH FORTRAN"
AC_PATH_PROGS([MPIFC], [mpxlf_r mpif90], [], [$PATH])
# if MPIFC empty
if test ! -n "$MPIFC"; then
AC_MSG_CHECKING([ No MPIFC detected. Setting MPIFC to FC.])
MPIFC=$FC
echo "MPIFC = $MPIFC ..."
fi
MTARGET="libpH5Part.a libpH5PartF.a"
TTARGET="H5PartTestP H5PartAndreasTest H5testFpar Bench"
else
echo "PARALLEL ENABLED WITHOUT FORTRAN"
MTARGET="libpH5Part.a"
TTARGET="H5PartTestP H5PartAndreasTest Bench"
fi
else
echo "NO, PARALLEL NOT ENABLED"
if test "X$USE_FORTRAN" = "Xyes"; then
echo "PARALLEL NOT ENABLED WITH FORTRAN ENABLED"
MTARGET="libH5Part.a libH5PartF.a"
TTARGET="H5PartTest H5testF H5test"
else
echo "BOTH PARALLEL & FORTRAN NOT ENABLED"
MTARGET="libH5Part.a"
TTARGET="H5PartTest H5test H5BlockTest1"
fi
fi
AC_MSG_CHECKING([for h5pTools file: ])
AC_MSG_RESULT([OK])
AC_ARG_ENABLE([tools],
[AC_HELP_STRING([--enable-tools], [Compile h5part tools [default=no]])],
[USE_TOOLS=$enableval])
if test "X$USE_TOOLS" = "Xyes"; then
BUILD_TOOLS="h5pAttrib h5pToGNUplot"
fi
##################################################################################
############################ PATH CHECKING & SETTING #############################
##################################################################################
AC_ARG_ENABLE([hdf5path],
[AC_HELP_STRING([--enable-hdf5path], [path to HDF5 installation [default=""]])],
[XROOT=$enableval], [XROOT=""])
if test "X$USE_PARALLEL" = "Xyes"; then
PHDF5ROOT=$XROOT
if test -z "$PHDF5ROOT"; then
AC_MSG_CHECKING([for Parallel HDF5 root ])
AC_MSG_RESULT([])
P=''
P="$P /usr"
P="$P /usr/local"
P="$P /usr/local/phdf5"
P="$P /usr/local/hdf5"
P="$P /usr/local/packages/hdf5"
P="$P /usr/local/hdf5/hdf5_par"
P="$P /apps/hdf5"
if test "X$USE_64" = "Xyes"; then
P="$P /usr/common/usg/hdf5/64/default/parallel"
else
P="$P /usr/common/usg/hdf5/32/default/parallel"
fi
PATH_Search PHDF5ROOT "$P" include/hdf5.h
XROOT=$HDF5ROOT
fi
else
HDF5ROOT=$XROOT
if test -z "$HDF5ROOT"; then
AC_MSG_CHECKING([for HDF5 library location ])
AC_MSG_RESULT([])
P=''
P="$P /usr"
P="$P /usr/local"
P="$P /usr/local/hdf5"
P="$P /usr/local/packages/hdf5"
P="$P /usr/local/hdf5/hdf5_serial"
P="$P /apps/hdf5"
if test "X$USE_64" = "Xyes"; then
P="$P /usr/common/usg/hdf5/64/default/serial"
else
P="$P /usr/common/usg/hdf5/32/default/serial"
fi
PATH_Search HDF5ROOT "$P" include/hdf5.h
XROOT=$HDF5ROOT
fi
fi
AC_MSG_CHECKING([if we need to link to libsz ])
if test -n "$XROOT"; then
if test -f $XROOT/lib/libsz.a; then
AC_MSG_RESULT([yes])
SZLIB="-L$XROOT/lib/ -lsz"
else
AC_MSG_RESULT([no])
SZLIB=""
fi
fi
AC_MSG_CHECKING([for static zlib root ])
echo
PATH_Search ZLIBROOT '/apps/zlib' lib/libz.a
if test -n "$ZLIBROOT"; then
LDFLAGS="$LDFLAGS -L$ZLIBROOT/lib"
fi
##################################################################################
####################### MISC SETTINGS - path, flags, etc #########################
##################################################################################
# if not AIX
if test ! $uname = "AIX"; then
# Additional flags
echo "SETTING ADDITIONAL FLAGS"
ADDFLAGS="-fPIC -fno-second-underscore"
fi
H5P_LIB_LOC=`pwd`/src
##################################################################################
#################### A SIMPLE WORK AROUND TO USE ENV. VARS #######################
##################################################################################
#if there was an external input for the variable...
if test -n "$SAVE_CC"; then
CC=$SAVE_CC
fi
if test -n "$SAVE_CXX"; then
CXX=$SAVE_CXX
fi
if test -n "$SAVE_FC"; then
FC=$SAVE_FC
fi
if test -n "$SAVE_MPICC"; then
MPICC=$SAVE_MPICC
fi
if test -n "$SAVE_MPICXX"; then
MPICXX=$SAVE_MPICXX
fi
if test -n "$SAVE_MPIFC"; then
MPIFC=$SAVE_MPIFC
fi
if test -n "$SAVE_MPILIB"; then
MPILIB=$SAVE_MPILIB
fi
if test -n "$SAVE_MPIINC"; then
MPIINC=$SAVE_MPIINC
fi
if test -n "$SAVE_CFLAGS"; then
CFLAGS=$SAVE_CFLAGS
fi
if test -n "$SAVE_FFLAGS"; then
FFLAGS=$SAVE_FFLAGS
fi
if test -n "$SAVE_MPIROOT"; then
MPIROOT=$SAVE_MPIROOT
fi
if test -n "$SAVE_HDF5ROOT"; then
HDF5ROOT=$SAVE_HDF5ROOT
fi
if test -n "$SAVE_PHDF5ROOT"; then
PHDF5ROOT=$SAVE_PHDF5ROOT
fi
if test -n "$SAVE_LDFLAGS"; then
LDFLAGS=$SAVE_LDFLAGS
fi
if test -n "$MPICXX"; then
TOOLS_CXX=$MPICXX
TOOLS_H5PART_LIB="-lpH5Part"
TOOLS_HDFLIB="-L$PHDF5ROOT/lib -lhdf5"
else
TOOLS_CXX=$CXX
TOOLS_H5PART_LIB="-lH5Part"
TOOLS_HDFLIB="-L$HDF5ROOT/lib -lhdf5"
fi
##################################################################################
############################# PRINTING SUMMARY ###################################
##################################################################################
echo "+++++++++++++++++++++++++++++++"
echo "+++++++++ SUMMARY for `(hostname || uname -n) 2>/dev/null | sed 1q` +++++++++"
echo "CC = $CC"
echo "CXX = $CXX"
echo "FC = $FC"
echo "MPICC = $MPICC"
echo "MPICXX = $MPICXX"
echo "MPIFC = $MPIFC"
echo "CFLAGS = $CFLAGS"
echo "FFLAGS = $FFLAGS"
echo "MPILIB = $MPILIB"
echo "MPIINC = $MPIINC"
echo "MPIROOT = $MPIROOT"
echo "HDF5ROOT = $HDF5ROOT"
echo "PHDF5ROOT = $PHDF5ROOT"
echo "LDFLAGS = $LDFLAGS"
echo "host_os = $host_os"
echo "host_cpu = $host_cpu"
echo "host_vendor = $host_vendor"
echo "Will Be Building Libraries ... : $MTARGET"
echo "Will Be Building Test Programs ... : $TTARGET"
echo "TOOLS_CXX = $TOOLS_CXX"
echo "TOOLS_H5PART_LIB = $TOOLS_H5PART_LIB"
echo "TOOLS_HDFLIB = $TOOLS_HDFLIB"
echo "BUILD_TOOLS = $BUILD_TOOLS"
echo "+++++++++++++++++++++++++++++++"
##################################################################################
################# EXPORTING VARIABLES & CREATING OUTPUT FILES ####################
##################################################################################
# AC_SUBST (variable, [value])
# Create an output variable from a shell variable.
# Make AC_OUTPUT substitute the variable variable into output files (typically one or more `Makefile's).
# This means that AC_OUTPUT will replace instances of `@variable@' in input files with the value that
# the shell variable variable has when AC_OUTPUT is called.
# This value of variable should not contain literal newlines.
# If value is given, in addition assign it to variable.
AC_SUBST(MPIROOT)
AC_SUBST(HDF5ROOT)
AC_SUBST(PHDF5ROOT)
AC_SUBST(MPIINC)
AC_SUBST(MPILIB)
AC_SUBST(MPICC)
AC_SUBST(MPICXX)
AC_SUBST(MPIFC)
AC_SUBST(MTARGET)
AC_SUBST(TTARGET)
AC_SUBST(SZLIB)
AC_SUBST(CFLAGS)
AC_SUBST(FFLAGS)
AC_SUBST(ADDFLAGS)
AC_SUBST(STDCXX)
AC_SUBST(H5P_LIB_LOC)
AC_SUBST(UNDERSCORE_H)
AC_SUBST(BUILD_TOOLS)
AC_SUBST(LDFLAGS)
AC_SUBST(TOOLS_CXX)
AC_SUBST(TOOLS_H5PART_LIB)
AC_SUBST(TOOLS_HDFLIB)
# Make AC_OUTPUT create each `file' by copying an input file (by default `file.in'),
# substituting the output variable values.
AC_CONFIG_FILES([
Makefile
src/Makefile
test/Makefile
tools/Makefile
])
AC_OUTPUT
Executable
+529
View File
@@ -0,0 +1,529 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-02-09.22
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
Binary file not shown.
Binary file not shown.
Binary file not shown.
+294
View File
@@ -0,0 +1,294 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
0 32 #c6b797
0 33 #eff8ff
0 34 #dccba6
0 35 #404040
0 36 #808080
0 37 #c0c0c0
0 38 #e0e0e0
0 39 #8e8f8e
0 40 #aaaaaa
0 41 #555555
0 42 #bebebe
0 43 #515151
0 44 #e7e3e7
0 45 #000049
0 46 #797979
0 47 #303430
0 48 #414141
0 49 #c7b696
0 50 #8e8e8e
0 51 #414541
0 52 #8e8e8e
0 53 #000079
0 54 #ff8200
0 55 #007d00
0 56 #0000be
# Desktop computer
6 375 2400 2025 4050
6 1575 3825 2025 4050
2 3 0 1 -1 7 2 0 20 0.000 0 0 -1 0 0 8
1615 3916 1719 3874 1908 3874 1950 3853 1972 3853 1846 3937
1615 3937 1615 3916
2 3 0 1 -1 7 2 0 20 0.000 0 0 -1 0 0 6
1888 3853 1846 3874 1908 3874 1950 3853 1908 3853 1888 3853
2 3 0 1 -1 7 2 0 20 0.000 0 0 -1 0 0 5
1846 3874 1888 3853 1846 3853 1803 3874 1846 3874
2 3 0 1 -1 7 2 0 20 0.000 0 0 -1 0 0 5
1803 3874 1740 3874 1803 3853 1824 3853 1803 3874
2 3 0 1 -1 7 2 0 20 0.000 0 0 -1 0 0 6
1846 3958 1866 3916 1972 3853 1992 3895 1846 3979 1846 3958
2 3 0 1 -1 7 2 0 20 0.000 0 0 -1 0 0 5
1615 3937 1866 3937 1846 3958 1615 3958 1615 3937
2 3 0 1 -1 7 2 0 20 0.000 0 0 -1 0 0 9
1615 3958 1594 4000 1719 4000 1846 4000 1866 4000 1992 3916
1992 3895 1846 3958 1615 3958
-6
6 600 2400 1950 3675
2 3 0 1 -1 7 2 0 15 0.000 0 0 -1 0 0 6
669 2530 648 3307 1594 3307 1615 2468 1594 2468 669 2530
2 3 0 1 -1 7 0 0 10 0.000 0 0 -1 0 0 5
1615 2468 1594 3307 1719 3307 1719 2509 1615 2468
2 3 0 1 -1 7 0 0 15 0.000 0 0 -1 0 0 5
1762 2677 1908 2719 1908 3139 1762 3203 1762 2677
2 3 0 1 -1 7 2 0 15 0.000 0 0 -1 0 0 6
732 3349 732 3412 1594 3454 1594 3371 753 3349 732 3349
2 3 0 1 -1 7 1 0 15 0.000 0 0 -1 0 0 5
1594 3371 1846 3280 1846 3348 1594 3454 1594 3371
2 3 0 1 -1 7 2 0 15 0.000 0 0 -1 0 0 5
732 3433 732 3559 1594 3601 1594 3454 732 3433
2 3 0 1 -1 0 2 0 20 0.000 0 0 -1 0 0 5
1594 3454 732 3412 753 3433 1572 3454 1594 3454
2 3 0 1 -1 7 2 0 8 0.000 0 0 -1 0 0 5
1594 3454 1594 3601 1635 3580 1635 3433 1594 3454
2 3 0 1 -1 7 2 0 8 0.000 0 0 -1 0 0 5
1719 3538 1846 3475 1846 3349 1719 3391 1719 3538
2 3 0 1 -1 7 2 0 10 0.000 0 0 -1 0 0 5
1635 3496 1719 3454 1719 3391 1635 3433 1635 3496
2 3 0 1 -1 7 2 0 10 0.000 0 0 -1 0 0 5
1635 3580 1719 3538 1719 3475 1635 3517 1635 3580
2 1 0 2 -1 7 2 0 8 0.000 0 0 -1 0 0 2
1635 3496 1719 3454
2 1 0 2 -1 7 2 0 8 0.000 0 0 -1 0 0 2
1635 3517 1719 3475
2 3 0 1 -1 7 3 0 10 0.000 0 0 -1 0 0 7
732 3559 732 3601 816 3601 963 3559 963 3538 816 3559
732 3559
2 3 0 1 -1 7 3 0 10 0.000 1 0 -1 0 0 5
1490 3596 1490 3641 1594 3643 1594 3601 1490 3596
2 3 0 1 -1 7 3 0 10 0.000 1 0 -1 0 0 5
1594 3643 1635 3601 1635 3580 1594 3601 1594 3643
2 3 0 1 -1 7 3 0 10 0.000 0 0 -1 0 0 5
1846 3475 1846 3496 1803 3517 1803 3496 1846 3475
2 3 0 1 -1 7 3 0 10 0.000 0 0 -1 0 0 4
1803 3517 1740 3517 1803 3496 1803 3517
2 3 0 1 -1 7 4 0 15 0.000 1 0 -1 0 0 6
879 3307 732 3349 1594 3371 1846 3279 1762 3265 879 3307
2 3 0 1 -1 7 0 0 10 0.000 1 0 -1 0 0 5
1719 2509 1719 3307 1762 3265 1762 2552 1719 2509
3 1 0 1 -1 7 1 0 20 0.000 0 0 0 11
774 2656 816 2614 1488 2572 1510 2593 1530 2636 1530 3139
1510 3181 1467 3203 837 3203 795 3181 774 3160
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000
-6
6 375 3675 1650 4050
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 8
1207 3935 1205 3897 1229 3888 1265 3890 1264 3922 1244 3937
1212 3937 1207 3935
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 8
1264 3939 1261 3900 1285 3892 1320 3893 1319 3925 1300 3940
1268 3940 1264 3939
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 8
1318 3950 1315 3912 1339 3904 1374 3905 1374 3937 1355 3953
1322 3953 1318 3950
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 8
1151 3935 1150 3897 1173 3888 1209 3890 1207 3922 1188 3937
1157 3937 1151 3935
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
1169 3900 1166 3861 1190 3853 1226 3854 1224 3886 1205 3901
1173 3901 1169 3900
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
1225 3904 1223 3865 1247 3857 1282 3858 1281 3891 1262 3906
1230 3906 1225 3904
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
1281 3908 1279 3869 1303 3860 1338 3862 1337 3893 1318 3909
1286 3909 1281 3908
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
1344 3909 1342 3870 1366 3862 1401 3863 1399 3895 1381 3911
1349 3911 1344 3909
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
1214 3854 1214 3835 1233 3822 1272 3825 1272 3831 1260 3839
1258 3856 1211 3854 1214 3854
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
1258 3855 1258 3836 1277 3823 1315 3826 1315 3831 1304 3839
1302 3857 1255 3855 1258 3855
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
1300 3862 1300 3843 1319 3830 1359 3833 1359 3838 1346 3846
1344 3863 1297 3862 1300 3862
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
1344 3863 1344 3845 1363 3831 1402 3835 1402 3839 1390 3848
1389 3865 1341 3863 1344 3863
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
1387 3869 1387 3850 1406 3836 1444 3839 1444 3845 1436 3871
1417 3882 1383 3869 1387 3869
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
708 3798 708 3779 727 3766 766 3769 766 3774 755 3783
752 3800 705 3798 708 3798
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
747 3803 747 3784 766 3771 805 3775 805 3780 793 3788
791 3805 744 3803 747 3803
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
794 3805 794 3787 813 3773 852 3777 852 3781 840 3790
839 3807 791 3805 794 3805
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
832 3810 832 3792 850 3778 889 3781 889 3787 878 3795
876 3812 828 3810 832 3810
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
876 3812 876 3793 894 3780 934 3784 934 3788 921 3797
919 3814 872 3812 876 3812
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
919 3816 919 3797 938 3784 977 3787 977 3792 965 3800
964 3817 916 3816 919 3816
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
962 3816 962 3797 981 3784 1019 3787 1019 3792 1008 3800
1006 3817 959 3816 962 3816
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
1001 3819 1001 3800 1019 3787 1058 3790 1058 3795 1047 3803
1045 3820 997 3819 1001 3819
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
1049 3819 1049 3800 1067 3787 1106 3790 1106 3795 1094 3803
1092 3820 1045 3819 1049 3819
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
661 3822 661 3803 679 3790 718 3793 718 3799 706 3807
704 3824 658 3822 661 3822
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
704 3831 704 3812 724 3799 762 3802 762 3807 750 3816
748 3832 702 3831 704 3831
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
748 3834 748 3816 768 3802 806 3805 806 3810 794 3819
793 3835 746 3834 748 3834
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
789 3838 789 3819 808 3805 847 3808 847 3814 835 3822
833 3839 786 3838 789 3838
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
832 3840 832 3822 850 3808 889 3812 889 3817 878 3825
876 3842 828 3840 832 3840
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
874 3842 874 3824 893 3810 932 3814 932 3819 919 3827
918 3844 871 3842 874 3842
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
916 3846 916 3827 934 3814 974 3817 974 3822 962 3831
960 3847 913 3846 916 3846
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
961 3846 961 3828 980 3814 1018 3817 1018 3823 1007 3831
1005 3847 957 3846 961 3846
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
1005 3849 1005 3831 1023 3817 1062 3821 1062 3826 1050 3834
1049 3851 1002 3849 1005 3849
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
1049 3851 1049 3832 1067 3819 1107 3823 1107 3828 1095 3836
1093 3853 1045 3851 1049 3851
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
656 3866 655 3827 678 3819 714 3820 713 3853 693 3868
662 3868 656 3866
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
700 3869 698 3831 722 3822 757 3824 755 3856 737 3871
704 3871 700 3869
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
744 3876 741 3838 766 3829 801 3831 799 3862 781 3878
748 3878 744 3876
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
792 3882 790 3842 814 3834 849 3835 848 3868 829 3883
797 3883 792 3882
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
832 3884 830 3846 854 3837 889 3839 887 3870 869 3886
836 3886 832 3884
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
880 3890 879 3851 902 3842 938 3844 936 3876 918 3892
886 3892 880 3890
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
932 3893 930 3854 954 3846 989 3847 988 3879 969 3895
936 3895 932 3893
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
982 3895 981 3856 1004 3847 1040 3849 1038 3882 1019 3897
988 3897 982 3895
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
1025 3898 1023 3860 1047 3851 1082 3853 1080 3885 1062 3900
1029 3900 1025 3898
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
618 3861 616 3822 640 3814 675 3816 674 3847 655 3862
623 3862 618 3861
2 3 0 1 -1 7 1 0 20 0.000 0 0 -1 0 0 8
572 3888 571 3849 594 3840 630 3842 629 3875 609 3890
578 3890 572 3888
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
609 3888 609 3869 629 3856 667 3860 667 3864 655 3873
654 3890 607 3888 609 3888
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 7
654 3893 984 3934 988 3898 664 3866 652 3882 652 3888
654 3893
2 3 0 1 -1 7 0 0 20 0.000 0 0 -1 0 0 9
986 3931 986 3913 1004 3900 1043 3902 1043 3908 1032 3916
1029 3933 982 3931 986 3931
2 3 0 1 -1 7 5 0 15 0.000 0 0 -1 0 0 9
429 3871 683 3743 1551 3816 1576 3831 1573 3840 1426 3990
427 3883 427 3869 429 3871
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 3
423 3910 1434 4014 1575 3875
2 3 0 0 -1 7 5 0 10 0.000 0 0 -1 0 0 8
429 3885 429 3928 1430 4050 1580 3895 1576 3831 1423 3990
425 3882 429 3885
-6
-6
6 4050 3000 7500 3750
2 1 0 1 0 0 0 0 -1 0.000 0 0 -1 0 0 4
7500 3000 5430 3000 6120 3690 4050 3690
-6
# TB Data
6 8025 6000 9000 7425
5 1 0 1 -1 -1 0 0 -1 0.000 0 1 0 0 8490.000 5700.000 8040 6300 8490 6450 8940 6300
5 1 0 1 -1 -1 0 0 -1 0.000 0 1 0 0 8490.000 6600.000 8040 7200 8490 7350 8940 7200
1 2 0 1 -1 -1 0 0 -1 0.000 1 0.0000 8490 6150 450 150 8040 6000 8940 6300
2 1 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 2
8940 6225 8940 7200
2 1 0 1 -1 -1 0 0 -1 0.000 0 0 0 0 0 2
8040 6225 8040 7200
4 1 -1 0 0 2 12 0.0000 6 135 270 8490 6675 TB\001
4 1 -1 0 0 2 12 0.0000 6 135 405 8490 7275 Data\001
-6
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2
0 0 1.00 60.00 120.00
0 0 1.00 60.00 120.00
2025 3075 2475 3075
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
3750 4650 3750 2100 2550 2100 2550 4650 3750 4650
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
9075 4650 9075 2100 7875 2100 7875 4650 9075 4650
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
0 0 3.00 60.00 120.00
8400 4800 8400 6000
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
0 0 3.00 60.00 120.00
8250 4800 8250 6000
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
0 0 3.00 60.00 120.00
8100 4800 8100 6000
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
0 0 3.00 60.00 120.00
8850 4800 8850 6000
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
12000 4500 12000 3975 8175 3975 8175 4500 12000 4500
4 0 0 50 0 2 15 0.0000 4 30 360 8475 5550 ......\001
4 0 0 50 0 0 20 0.0000 4 195 570 2625 3375 VisIt\001
4 0 0 50 0 0 20 0.0000 4 195 570 7950 3375 VisIt\001
4 0 0 50 -1 2 16 0.0000 4 225 1410 9375 4275 H5xxx plugin\001
4 0 0 50 0 0 20 0.0000 4 255 1650 6450 5550 n-way parallel\001
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
+262
View File
@@ -0,0 +1,262 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Put your title here!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<div id="maincenter">
<head>
<title>Building H5Part</title>
</head>
<body bgcolor="#F0F0F0">
<font face="arial,helvetica" size="+2" color="#555588"><h2>Building H5Part</h2></font>
<UL>
<LI><a href="#Quickstart">Quickstart guide for the impatient.</a>
<LI><a href="#Details">Details of the Configuration Script</a>
<!-- <LI><a href="UsingC++.html">Using the C++ interface</a> -->
<LI><a href="#ConfigOptions">Important Configure Options</a>
<LI><a href="#EnvVariables">Important Environment Variables</a>
</UL>
<hr>
<a name="Quickstart">
<h2>Quickstart <i>for the impatient</i></h2>
</a>
<OL>
<LI><b>Configure</b>:<br>
For the serial implementation
<pre>
./configure
</pre>
For the parallel implementation configure with
<pre>
./configure --enable-parallel
</pre>
If you also want to build fortran bindings, add the
<code>--enable-fortran</code> flag to the configure line.
</LI><p>
<LI><b>Make the Library</b>:<br>
Type <code>make</code> to build the library. The libraries are
named accordingly.
<UL>
<LI>libH5Part.a: Serial C/C++ Library.</LI>
<LI>libpH5Part.a: Parallel C/C++ library.</LI>
<LI>libH5PartF.a: Serial F77/F90 library.</LI>
<LI>libpH5PartF.a: Parallel F77/F90 library.</LI>
</UL>
</LI><p>
<LI><b>Make Regression Tests and Examples</b>:<br>
Just type <code>make tests</code> to build regression tests
and/or example programs for H5Part. These tests are
<UL>
<LI>H5PartF: Fortran example (only build if --enable-fortran
is specified).</LI>
<LI>H5PartFpar: Parallel Fortran example (only built if both
--enable-fortran and --enable-parallel are specified).</LI>
<LI>H5PartTest: Serial C example. This test writes a sample
datafile and then reopens it for reading. It demonstrates
the most basic reading/writing capabilities.</LI>
<LI>H5PartTestP: Parallel C example (only built if
--enable-parallel is specified). This program only works
as an MPI/parallel program.</LI>
<LI>Bench: This program will only be built if
--enable-parallel is specified. It compares the
performance of raw binary
I/O (one file per processor), raw binary MPI-IO based
parallel I/O to a single file, and the parallel H5Part/HDF5 to
a single file. Generally, H5Part should be very close to the
MPI-IO implementation in terms of performance, but slower
than one-file-per-processor. If HDF5 is slower the
MPI-IO, it would indicate that some performance tuning
will be required for your platform (contact us, and we will
see what we can do!).</LI>
</UL>
</LI><p>
<LI><b>Building Your Own Programs</b>:<br>
There are many different subtleties to linking on various
computer platforms, but typically one does the following.
<UL>
<LI>C/C++ Serial:
<br><code>#include
&lt H5Part.h &gt </code> into your
source file.
<br><code>$CC -I<i>path_to_H5Part.h</i>
-I<i>path_to_hdf5.h</i> -o outfile
MyFile.cc -L<i>path_to_libH5Part.a</i> -lH5Part
-L<i>path_to_libhdf5</i> -lhdf5 -lz <i>-lsz</i></code>
</LI>
<LI>C/C++ Parallel:
<br><code>#include
&lt H5Part.h &gt </code> into your
source file.
<br><code>$MPICC -I<i>path_to_H5Part.h</i>
-I<i>path_to_hdf5.h</i> -DPARALLEL_IO
-DH5_HAVE_PARALLEL -o outfile
MyFile.cc -L<i>path_to_libH5Part.a</i> -lH5Part
-L<i>path_to_libhdf5</i> -lhdf5 -lz <i>-lsz</i></code>
</LI>
<LI>Fortran Serial:
<br><code>include
'H5Part.inc'</code> into your
source file.
<br><code>$FC -I<i>path_to_H5Part.h</i>
-I<i>path_to_hdf5.h</i> -o outfile
MyFile.cc -L<i>path_to_libH5PartF.a</i> -lH5PartF
-L<i>path_to_libhdf5</i> -lhdf5 -lz <i>-lsz</i> -lc</code>
</LI>
<LI>Fortran Parallel:
<br><code>include
'H5Part.inc'</code> into your
source file.
<br><code>$MPIF90 -I<i>path_to_H5Part.h</i>
-o outfile
MyFile.cc -L<i>path_to_libpH5PartF.a</i> -lpH5PartF
-L<i>path_to_libhdf5</i> -lhdf5 -lz <i>-lsz</i> -lc</code>
</LI><p>
</UL>
</OL>
<hr>
<a name="Details">
<h1>Details for H5Part Configure and Build</h1>
</a>
<a name="ConfigOptions">
<h2>Configure Options</h2>
</a>
H5Part uses GNU Autoconf to generate a Makefile from the makefile
template called <code>Makefile.in</code>.
The configure script pays attention to the following
configure options;<p>
<UL>
<LI><b>--prefix=PREFIX</b> Install files in PREFIX</LI>
<LI><b>--enable-fortran</b> By default H5part will make no attempt to
build Fortran bindings. If you add the
<code>--enable-fortran</code> flag to the ./configure line, it
will create a small test program to determine how to generate
the fortran bindings and then create a library that includes
those bindings. You may need to set the fortran compiler by
setting the <code>FC</code> environment variable in your shell.</LI>
<LI><b>--enable-parallel</b> The version of HDF5 that you build for
Parallel I/O differs from the library you would build for
serial I/O. Consequently, the H5Part libraries must be built
specifically for the kind of I/O you have in mind (parallel or
serial). The configure script will attempt to find an
<code>mpicc</code> if it is available. If no
<code>mpicc</code> is available it will use the regular
C-compiler and will try to locate the location of the MPI
include files and libraries. You can assist the configure
program in its search by setting the <code>MPIROOT</code>
environment variable.</LI>
<LI><b>--enable-tools</b> Builds the currently available tools
<br>
<b>h5pAttrib</b>, an inspection tool that prints the number of timesteps in a file
the file attributes, the step attributes, the dataset names and their values.
<br>
<b>h5pToGNUplot</b>, a converter to two column ASCII format to load in GNUplot.
</LI>
<LI><b>--enable-python</b><font color=red> Under construction</font> Option to build python bindings. It has not been tested.
</LI>
<LI><b>--help</b> Prints configure options.
</LI>
</UL>
<p>
<a name="MakeOptions">
<h2>Make Options</h2>
</a>
<UL>
<LI>make</LI>builds the libraries and test programs
<LI>make install</LI>builds and installs
<LI>make clean</LI>removes extraneous object files
<LI>make distclean</LI>returns configuration to unconfigured state
</UL>
<a name="EnvVariables">
<h2>Environment Variables for Configure</h2>
</a>
The
configuration script is of limited intelligence. Sometimes, you
have to define the following environment variables in order to
help it on its way. You will often only need to tell it where to
find the HDF5 libraries (<code>H5ROOT</code> for serial or
<code>PHDF5ROOT</code> for parallel builds). All of these
environment variables can also be overidden in the Makefile that
is generated by the autoconfigure script.
The configure script pays attention to the following
environment variables;
<p>
<UL>
<LI><b>CC</b>: Use the <code>CC</code> environment variable to tell the
configure script where to find the C compiler. You can
also directly modify this variable in the
<code>Makefile</code> that is generated by the autoconfigure</LI>
<LI><b>CXX</b>: Use the <code>CXX</code> environment variable to tell the
configure script where to find the C++ compiler. You can
also directly modify this variable in the
<code>Makefile</code> that is generated by the autoconfigure</LI>
<LI><b>FC</b>: Use the <code>FC</code> environment variable to tell the
configure script where to find the fortran compiler. You can
also directly modify this variable in the
<code>Makefile</code> that is generated by the autoconfigure</LI>
<LI><b>MPICC</b>: If you are building for parallel C I/O, then it is
useful to tell the configure script where to find the
<code>mpicc</code> script. Normally, <code>mpicc</code> is
merely a wrapper script for a build using a regular C-compiler.
If no <code>mpicc</code> is available, then the
<code>configure</code> script will attempt to locate the mpi
header files and libraries. In that case, it may be useful to
define the <code>MPI_HOME</code> environment variable.</LI>
<LI><b>MPICXX</b>If you are building for parallel C++</LI>
<LI><b>MPIFC</b>: If you are building for parallel Fortran I/O, then it is
useful to tell the configure script where to find the parallel fortran compiler.
<LI><b>MPIROOT</b>: Set this environment variable to help the
configure script to locate the MPI libraries that should be
used to build the parallel version of the libraries. This
variable will be ignored if configured only to build the
serial implementation of the library.</LI>
<LI><b>HDF5ROOT</b>: Find the path to your serial HDF5 installation. If you
are building the serial version of H5part, then you should set
the <code>PHDF5ROOT</code> environment variable.</LI>
</UL><p>
<h3>Common compiler environemt variables for NERSC platforms</h3>
<UL>
<LI><b>DaVinci</b>: Linux ia64 </LI>
CC=icc CXX=icc F90=ifort MPICC=icc MPIFC=ifort MPILIB=-L/usr/lib/ -lmpi MPIINC=-I/usr/include
<LI><b>Bassi</b>: AIX</LI>
CC=cc_r CXX=cc_r FC=xlf_r MPICC=mpcc_r MPICXX=mpcc_r MPIFC=mpxlf_r
<LI><b>Jacquard</b>: Linux x86_64</LI>
CC=pathcc CXX=pathCC FC=pathf90 MPICC=mpicc MPICXX=mpicxx MPIFC=mpif90
<LI><b>Starsky.lbl.gov:</b> (Darwin) PowerPC</LI>
CC=gcc CXX=g++ FC=g95
</UL>
<br>
NOTE: You might need to set the MPI library path (MPILIB) and MPI includes (MPIIINC) if they are in non standard places. For example: <br>
MPILIB=-L/usr/lpp/ppe.poe/lib -lmpi_r MPIINC=-I/usr/lpp/ppe.poe/include/thread
<h3>How to set the variables for configure:</h3>
It is very simple just call env with the variables together with configure. Notice the quotes in MPILIB.
<pre>
% env CC=icc CXX=icc F90=ifort MPICC=icc MPILIB=-L/usr/lib/ -lmpi MPIINC=-I/usr/include ./configure (configure options follow here)
</pre>
In the worst case, you can edit the <code>src/Makefile.am</code> and <code>test/Makefile.am</code> as
needed to perform the proper build.
</div>
+68
View File
@@ -0,0 +1,68 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Put your title here!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<!--#include virtual="/include/topIncludes.html"-->
<div id="maincenter">
<head>
<title>Building HDF5</title>
</head>
<body bgcolor="#F0F0F0">
<font face="arial,helvetica" size="+2" color="#555588"><h2>Building H5Part</h2></font>
<UL>
<LI><a href="#ConfigOptions">Configure Options</a>
<LI><a href="#EnvVariables">Important Environment Variables</a>
</UL>
<hr>
<a name="ConfigOptions">
<h2>Configure options</h2></a>
</a>
To set the installation path configure with
<pre>
./configure --prefix=your hdf5 installation full path, e.g.--prefix=/usr/local/hdf5
</pre>
For the serial implementation configure with
<pre>
./configure
</pre>
For the parallel implementation configure with
<pre>
./configure --enable-parallel
</pre>
To enable shared objects configure with
<pre>
./configure --enable-shared
</pre>
<a name="EnvVariables">
<h2>Environment Variables</h2></a>
</a>
To add HDF5 to your PATH and LD_LIBRARY_PATH edit your
.tcshr, or .cshrc depending on the shell you are using and add
<pre>
setenv HDF5 "your hdf5 installation full path"
setenv PATH ${PATH}:${HDF5}/bin
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${HDF5}/lib
</pre>
if you are using bash, add to your .bashrc
<pre>
export HDF5="your hdf5 installation full path"
export PATH=$PATH:${HDF5}/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HDF5}/lib
</pre>
Open a new terminal or do a
source .tcshr (.cshrc, .bashrc) in the one that you are using.
You can <a href="http://vis.lbl.gov/Research/AcceleratorSAPP/Downloading.html">continue <a/>downloading and installing H5Part.
</div>
<!--#include virtual="/include/dateFooter.html"-->
+48
View File
@@ -0,0 +1,48 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Put your title here!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<!--#include virtual="/include/topIncludes.html"-->
<div id="maincenter">
<head>
<title>Downloading H5Part</title>
</head>
<body bgcolor="#F0F0F0">
<font face="arial,helvetica" size="+2" color="#555588"><h2>Downloading H5Part</h2></font>
<UL>
<LI><a href="#svnano">Subversion access.</a>
</UL>
<hr>
<a name="svnano">
<h2>Subversion access</h2>
</a>
<LI><b>Anonymous via. Savannah</b>:<br>
Use svn from <a href="http://subversion.tigris.org"> tigris </a>
<pre>
svn checkout svn+ssh://svn@savannah.psi.ch/afs/psi.ch/project/amas/svn/root/amas/H5Part/ .
</pre>
Password is svn.
<LI><b>Using AFS</b>:<br>
You need AFS (openAFS) and must have an AFS-Account at PSI which in consequence gives you
the needed access right.
</LI><p>
<pre>
svn checkout file:///afs/psi.ch/project/amas/svn/root/amas/H5Part/ .
</pre>
In case of trouble please contact the person mentioned at the bottom of this page.
<hr>
<address><a href="mailto:andreas.adelmann@psi.ch">Andreas Adelmann</a></address>
<!-- Created: March 7 12:52:52 PST 2005 -->
<!-- hhmts start -->
Last modified: Mon Jan 9 22:18:55 CET 2006
<!-- hhmts end -->
</div>
<!--#include virtual="/include/dateFooter.html"-->
+250
View File
@@ -0,0 +1,250 @@
# Doxyfile 1.4.5
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = H5Part
PROJECT_NUMBER = V1.0
OUTPUT_DIRECTORY = ./doxydoc
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 = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
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 = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
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
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.h \
*.hh \
*.C \
*.CC \
*.C++ \
*.H \
*.HH
RECURSIVE = YES
EXCLUDE = ../src/H5PartF.c \
../src/H5Part.cc \
../src/H5Part.hh \
../src/H5Part++.cc \
../src/H5Part++.hh \
../src/TestUnderscoreC.c \
../src/Underscore.h
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 = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# 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
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
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 = YES
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 =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES = YES
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH = /Applications/Graphviz.app/Contents/MacOS
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
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Put your title here!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<div id="maincenter">
Under construction, will be here soon.
</div>
+15
View File
@@ -0,0 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Put your title here!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<div id="maincenter">
Under construction, will be here soon.
</div>
+15
View File
@@ -0,0 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Put your title here!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<div id="maincenter">
Under construction, will be here soon.
</div>
+99
View File
@@ -0,0 +1,99 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Put your title here!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<!--#include virtual="/include/topIncludes.html"-->
<div id="maincenter">
<head>
<title>H5Part Utility Tools</title>
</head>
<body bgcolor="#F0F0F0">
<font face="arial,helvetica" size="+2" color="#555588"><h2>H5Part Utility Tools</h2></font>
<UL>
<LI><a href="h5pAttrib">h5pAttrib</a>
<LI><a href="h5pToGNUplot">h5pToGNUplot</a>
</UL>
<hr>
<a name="h5pAttrib">
<h2>h5pAttrib</h2>
</a>
<b>h5pAttrib</b> is an inspection tool that prints to stdout the number of timesteps in a file
the file attributes, the step attributes, the dataset names and their values. It's simpler to use than h5dump.
Usage options are given by typing:
<br><br>
<PRE>
% ./h5pAttrib -h
usage: h5pAttrib [OPTIONS] file
OPTIONS
-h, --help Print help page
-n, --nstep Print number of steps
-A, --fileA Print file attributes
-a, --stepA Print step attributes & values for time step n
-d, --dataset Print data sets names & values for time step n
-H, --header Print shorter version without the values
</PRE>
<h3>Examples</h3>
<OL>
<LI>
Show file attribute names & values of sample.h5part
</LI>
h5pAttrib -A sample.h5part
<LI>
Show step attribute names for time step 5 of sample.h5part
</LI>
h5pAttrib -a 5 -H sample.h5part
</OL>
<a name="h5pToGNUplot">
<h2>h5pToGNUplot</h2>
</a>
<b>h5pToGNUplot</b> is a converter from H5Part to two column ASCII text format for loading into GNUplot. Usage options are given by typing:
<br><br>
<PRE>
% ./h5pToGNUplot -h
usage: h5pToGNUplot -t TIMESTEP -1 VARIABLE#1 -2 VARIABLE#2 -i INPUTFILE [OPTIONAL_FLAGS]
FLAGS
-h, --help Print help page
-1, --1var (REQUIRED) Takes first variable parameter
-2, --2var (REQUIRED) Takes second variable parameter
-i, --input (REQUIRED) Takes input file name
-t, --timestep (REQUIRED) Sets the timestep (Value -1 will result in dumping values of all timesteps.)
-o, --output (OPTIONAL) Takes output file name (without this flag, the program will print to stdout)
-n, --number (OPTIONAL) Sets number of output points
-s, --start (OPTIONAL) Sets the starting particle index
</PRE>
<h3>Examples</h3>
<OL>
<LI>
Create a GNU plot file output.txt from sample.h5part by ploting x vs px for timestep 54
</LI>
h5pToGNUplot -t 54 -1 x -2 px -i sample.h5part -o output.txt
<LI>
Create a GNU plot file output.txt from sample.h5part by ploting x vs px for timestep 54
using 1200 points from particle index 76
</LI>
h5pToGNUplot -t 54 -1 x -2 px -i sample.h5part -o output.txt -s 76 -n 1200
</OL>
</div>
<!--#include virtual="/include/dateFooter.html"-->
+75
View File
@@ -0,0 +1,75 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>H5Part: VisIt Plugins</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<div id="maincenter">
<font face="arial,helvetica"><h1>H5Part: VisIt Plugins</h1></font>
<font face="arial,helvetica" color="#555588"><h2>Introduction</h2></font>
<P>
<a href="http://www.llnl.gov/visit">VisIt</a> is an open source point-and-click 3D scientific visualization application that supports most of the common visualization techniques on structured and unstructured grids. One of its advantages is that it employs a distributed and parallel architecture in order to handle extremely large data sets interactively. VisIt's rendering and data processing capabilities are split into viewer and engine components that may be distributed across multiple machines. See this link for <a href="http://vis.lbl.gov/NERSC/Software/visit/">details</a> on how to run VisIt in NERSC.
</P>
<P>
VisIt achieves extensibility through the use of dynamically loaded plugins. All of VisIt's plots, operators, and database readers are implemented as plugins and are loaded at run-time from the plugin directory. New plugins can be added simply by installing them in this directory. VisIt comes with a graphical plugin creation tool, which greatly simplifies the process of creating new plugins. The user describes the properties of the plugin and then the tool generates most of the code necessary to implement the plugin. For example, in the case of an operator, the plugin creation tool creates the code necessary for the graphical user interface attribute window; the C++, Python, and Java interfaces; and the code necessary to interface to VisIt. The only code you need to write is the C++ code that actually performs the operation.
</P>
<font face="arial,helvetica" color="#555588"><h2>H5Part in VisIt</h2></font>
<font face="arial,helvetica" color="#555588"><h3>Database Reader Plugin</h3></font>
<P>
We wrote a Multiple Time Step Multiple Domain database reader to read H5Part data into VisIt. H5Part datasets should be named with the extension <font color=red>".h5part"</font> to be recognized by the reader since VisIt does not have a format selection mechanism at the time of reading. Figure 1 shows a Pseudocolor plot of a data set and Figure 2 shows a Scatter plot x-y (any combination of x, px, y, py, z, pz, id are possible).
</P>
<P>
<TABLE>
<TR>
<TD>
<a href="H5PartVisIt/cloud_visit.png"><img src="H5PartVisIt/cloud_visit.s.png" width=400 height=300></a>
</TD
></TR>
<TR>
<TD width=300>
Figure 1. VisIt User interface showing an H5Part particle file rendered as spheres using the Pseudocolor plot.
</TD>
</TR>
<TR>
<TD>
<a href="H5PartVisIt/cloud_visit_2D.png"><img src="H5PartVisIt/cloud_visit_2D.s.png" width=300 height=300></a>
</TD>
</TR>
<TR>
<TD>
Figure 2. A Scatter plot of the x-y projection of the particles.
</TD>
</TR>
</TABLE>
</P>
<P>
VisIt provides a Query interface, for single time steps and for time series. Figure 3 shows the query interace over time for the sum of the x position and the z position of the particoes.
</P>
<P>
<TABLE>
<TR>
<TD>
<a href="H5PartVisIt/visit_query1.png"><img src="H5PartVisIt/visit_query1.s.png" width=400 height=300></a>
</TD
></TR>
<TR>
<TD width=300>
Figure 3. VisIt's Time Query Output.
</TD>
</TR>
</TABLE>
</p>
<font face="arial,helvetica" color="#555588"><h2>Operator Plugins</h2></font>
<P>
<font face="arial,helvetica" color="#555588"><h3>Particle Random Sampler</h3></font>
</P>
<P>
<font face="arial,helvetica" color="#555588"><h3>Particle Binner</h3></font>
</P>
</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

+417
View File
@@ -0,0 +1,417 @@
<html><head><title>H5Part Tools How-to</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr"></head>
<body bgcolor="#ffffff" text="#000000">
<table border="0" cellpadding="0" cellspacing="0" width="987">
<tbody><tr>
<td height="6050" width="27"></td>
<td colspan="3" valign="top">
<div id="body">
<div id="mainleft"><font face="Arial, Helvetica, sans-serif"><a name="TOP"></a>
</font></div>
<div id="maincenter"> <font face="arial,helvetica">
<h1 align="center"><font face="Arial, Helvetica, sans-serif"><b><font color="#666699">H5Part
Tools How-to</font></b></font></h1>
</font><font color="#555588" face="arial,helvetica">
<h2><font color="#666699" face="Arial, Helvetica, sans-serif">Table
of Contents</font></h2>
</font>
<p><font face="Arial, Helvetica, sans-serif"><b><a href="#Quick%20Guide">
[1] Quick Guide</a></b> </font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font color="#999999">---
For h5pAttrib</font></b></font><font face="Arial, Helvetica, sans-serif"><br>
<b><br>
<a href="#timesteps">[2] To see number of timesteps in a h5part file</a><br>
<br>
<a href="#file%20attributes">[3] To see file attributes in a h5part
file</a><br>
<br>
<a href="#step%20attributes"> [4] To see step attributes in a h5part
file</a><br>
<br>
<a href="#dataset">[5] To see dataset in a h5part file</a><br>
<br>
<a href="#flags">[6] Providing more than one flag at once for h5pAttrib</a></b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font color="#999999">---
For h5pToGNUplot</font></b></font><font face="Arial, Helvetica, sans-serif"><br>
<br>
<b><a href="#parameters">[7] What parameters to provide</a><br>
<br>
<a href="#input%20file">[8] How to create an input file to GNUplot</a></b></font></p>
<p>&nbsp;</p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<p>&nbsp;</p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="Quick Guide">[1]
Quick Guide</a></font></h2>
<p><font face="Arial, Helvetica, sans-serif">Executing the program with
-h option will display a concise help page.</font></p>
<p><font face="Arial, Helvetica, sans-serif"><b><font face="Courier New, Courier, mono" size="+1">$&gt;</font></b><font face="Courier New, Courier, mono">./h5pAttrib
-h</font></font></p>
<p><font face="Courier New, Courier, mono">usage: h5pAttrib [OPTIONS]
file</font></p>
<p><font face="Courier New, Courier, mono"> OPTIONS<br>
-h, --help Print help page<br>
-n, --nstep Print number of steps<br>
-A, --fileA Print file attributes<br>
-a n, --stepA n Print step attributes &amp; values for time step n<br>
-d n, --dataset n Print data sets names &amp; values for time step
n<br>
-H, --header Print shorter version without the values</font></p>
<p><font face="Courier New, Courier, mono"> Examples:</font></p>
<p><font face="Courier New, Courier, mono"> 1) Show file attribute names
&amp; values of sample.h5part</font></p>
<p><font face="Courier New, Courier, mono"> h5pAttrib -A sample.h5part<br>
OR<br>
h5pAttrib --fileA sample.h5part</font></p>
<p><font face="Courier New, Courier, mono"> 2) Show step attribute names
for time step 5 of sample.h5part</font></p>
<p><font face="Courier New, Courier, mono"> h5pAttrib -a 5 -H sample.h5part<br>
OR<br>
h5pAttrib --stepA 5 -H sample.h5part</font></p>
<p><font face="Courier New, Courier, mono"><br>
<b><font size="+1">$&gt;</font></b> ./h5pToGNUplot -h</font></p>
<p><font face="Courier New, Courier, mono">usage: h5pToGNUplot -t TIMESTEP
-1 VARIABLE#1 -2 VARIABLE#2 -i INPUTFILE [OPTIONAL_FLAGS]</font></p>
<p><font face="Courier New, Courier, mono"> FLAGS<br>
-h, --help Print help page</font><br>
<font face="Courier New, Courier, mono">-1 par, --1var par (REQUIRED)
Takes first variable parameter to "par"<br>
-2 par, --2var par (REQUIRED) Takes second variable parameter to "par"<br>
-i file, --input file (REQUIRED) Takes input file name to "file"<br>
</font><font face="Courier New, Courier, mono">-t step, --timestep
step (REQUIRED) Sets the timestep to "step" (Value -1 will
result in dumping values of all timesteps.)<br>
-o file, --output file (OPTIONAL) Takes output file name to "file"
(without this flag, the program will print to stdout)<br>
-n num, --number num (OPTIONAL) Sets number of output points to "num"<br>
-s idx, --start idx (OPTIONAL) Sets the starting particle index to
"idx"</font></p>
<p><font face="Courier New, Courier, mono"><br>
Examples:</font></p>
<p><font face="Courier New, Courier, mono"> 1) Create GNU plot file
output.txt from sample.h5part by ploting x vs px for timestep 54</font></p>
<p><font face="Courier New, Courier, mono"> h5pToGNUplot -t 54 -1 x
-2 px -i sample.h5part -o output.txt</font></p>
<p><font face="Courier New, Courier, mono"> 2) Create GNU plot file
output.txt from sample.h5part by ploting x vs px for timestep 54<br>
using 1200 points from particle index 76</font></p>
<p><font face="Courier New, Courier, mono"> h5pToGNUplot -t 54 -1 x
-2 px -i sample.h5part -o output.txt -s 76 -n 1200</font></p>
<p>&nbsp;</p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<p>&nbsp;</p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font color="#999999">---
For h5pAttrib</font></b></font></p>
<p>&nbsp;</p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="timesteps">[2]
To see number of timesteps in a h5part file</a></font></h2>
<p>Executing the program h5pAttrib with -n flag will display the number
of timesteps in the file.</p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font face="Courier New, Courier, mono">$&gt;</font></b></font><font face="Courier New, Courier, mono">
./h5pAttrib -n sample.h5part</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing number of timesteps
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">There are total 252 number
of timesteps.<br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font><font face="Arial, Helvetica, sans-serif"><br>
</font></p>
<p>&nbsp; </p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<h2><font color="#666699" face="Arial, Helvetica, sans-serif"><br>
<font color="#555588"><a name="file attributes">[3] To see file attributes
in a h5part file</a></font></font></h2>
<p>File attribute contains information about the file. (file description
etc...) Executing the program h5pAttrib with -A flag will display
the file attributes in the file.</p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font face="Courier New, Courier, mono">$&gt;</font></b></font><font face="Courier New, Courier, mono">
./h5pAttrib -A sample.h5part</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing file attributes
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of file attributes
for file sample.h5part is 0 ...<br>
There are no file attributes.<br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font></p>
<p><font face="Arial, Helvetica, sans-serif"><br>
<i>NOTE: -H option will omit the list of values of file attributes.</i></font></p>
<p>&nbsp; </p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<p align="center">&nbsp;</p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="step attributes">[4]
To see step attributes in a h5part file</a></font></h2>
<p>Step attribute contains information that belongs to a specific step.
(step name, timestep number, etc...) Executing the program h5pAttrib
with -a flag will display the step attributes in the file.<br>
Note that the timestep index should follow -a flag.</p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif"><b><font face="Courier New, Courier, mono" size="+1">$&gt;</font></b><font face="Courier New, Courier, mono">
./h5pAttrib -a 2 sample.h5part</font></font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing step attributes
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of step attributes
for timestep #2 is 10 ...</font></p>
<p><font face="Courier New, Courier, mono">Attribute #0 = Step<br>
There are 1 elements in the attribute<br>
Attribute Type is H5T_NATIVE_INT64<br>
Printing 1 element value(s):<br>
COUNT[0]: 2</font></p>
<p><font face="Courier New, Courier, mono">Attribute #1 = Spos<br>
There are 1 elements in the attribute<br>
Attribute Type is H5T_NATIVE_DOUBLE<br>
Printing 1 element value(s):<br>
COUNT[0]: 0.143580</font></p>
<p><font face="Courier New, Courier, mono">Attribute #2 = structLen<br>
There are 1 elements in the attribute<br>
Attribute Type is H5T_NATIVE_DOUBLE<br>
Printing 1 element value(s):<br>
COUNT[0]: 2.393000</font></p>
<p><font face="Courier New, Courier, mono">.<br>
.<br>
.</font></p>
<p><font face="Courier New, Courier, mono"><br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font></p>
<p><font face="Arial, Helvetica, sans-serif"><br>
<i>NOTE: -H option will omit the list of values of step attributes.</i></font></p>
<p>&nbsp; </p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><br>
<a name="dataset">[5] To see dataset in a h5part file</a></font></h2>
<p>Executing the program h5pAttrib with -d flag will display the datasets
information in the file. (dataset name, type, number of elements,
etc...) Executing the program h5pAttrib with -d flag will display
the datasets information in the file.<br>
Note that the timestep index should follow -d flag.</p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font face="Courier New, Courier, mono">$&gt;</font></b></font><font face="Courier New, Courier, mono">
./h5pAttrib -d 2 -H sample.h5part</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing names of datasets
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of datasets for
timestep #2 is 7 ...</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #0 = id<br>
Dataset Type is H5T_NATIVE_INT64<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #1 = px<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #2 = py<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #3 = pz<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #4 = x<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #5 = y<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #6 = z<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 67587</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font></p>
<p><font face="Arial, Helvetica, sans-serif"><br>
<i>NOTE: -H option will omit the list of values of datasets.</i></font></p>
<p>&nbsp; </p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<p>&nbsp;</p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="flags">[6]
Providing more than one flag at once</a></font></h2>
<p><font face="Arial, Helvetica, sans-serif">When more than one flags
are provided, one result after another will be displayed.</font></p>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b></font></p>
<p><font face="Arial, Helvetica, sans-serif" size="+1"><b><font face="Courier New, Courier, mono">$&gt;</font></b></font><font face="Courier New, Courier, mono">
./h5pAttrib -H -a 1 -d 1 sample.h5part</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing step attributes
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of step attributes
for timestep #1 is 10 ...</font></p>
<p><font face="Courier New, Courier, mono">Attribute #0 = Step<br>
Attribute #1 = Spos<br>
Attribute #2 = structLen<br>
Attribute #3 = org<br>
Attribute #4 = maxX<br>
Attribute #5 = minX<br>
Attribute #6 = maxP<br>
Attribute #7 = minP<br>
Attribute #8 = centroid<br>
Attribute #9 = nloc<br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono"><br>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">Printing names of datasets
for: sample.h5part ...</font></p>
<p><font face="Courier New, Courier, mono">The number of datasets for
timestep #1 is 7 ...</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #0 = id<br>
Dataset Type is H5T_NATIVE_INT64<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #1 = px<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #2 = py<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #3 = pz<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #4 = x<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #5 = y<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">Dataset Name #6 = z<br>
Dataset Type is H5T_NATIVE_DOUBLE<br>
Number of elements: 60214</font></p>
<p><font face="Courier New, Courier, mono">++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</font></p>
<p><font face="Courier New, Courier, mono">done</font></p>
<p>&nbsp;</p>
<div align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></div>
</div>
</div>
</td>
</tr>
<tr>
<td height="80"></td>
<td colspan="3" valign="top">
<h2><font face="Arial, Helvetica, sans-serif" size="+1"><b><font color="#999999">---
For h5pToGNUplot</font></b></font></h2>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><a name="parameters">[7]
What parameters to provide</a></font></h2>
<p><font face="Arial, Helvetica, sans-serif">When you execute the program
with -h option, it displays what flags are necessary and what flags are
optional.</font></p>
</td>
</tr>
<tr>
<td height="200"></td>
<td valign="top" width="137">
<p align="left"><b><font face="Arial, Helvetica, sans-serif">Short Version</font></b></p>
<p><font face="Arial, Helvetica, sans-serif">-h<br>
-1<br>
-2<br>
-i<br>
-t<br>
-o<br>
-n<br>
-s </font></p>
</td>
<td valign="top" width="144">
<p align="left"><b><font face="Arial, Helvetica, sans-serif">Long Version</font></b></p>
<p><font face="Arial, Helvetica, sans-serif">--help<br>
--1var<br>
--2var<br>
--input<br>
--timestep<br>
--output<br>
--number<br>
--start </font></p>
</td>
<td valign="top" width="679">
<p align="left"><b><font face="Arial, Helvetica, sans-serif">Meanings</font></b></p>
<p><font face="Arial, Helvetica, sans-serif">Print help page<br>
(REQUIRED) Takes first variable parameter<br>
(REQUIRED) Takes second variable parameter<br>
(REQUIRED) Takes input file name<br>
(REQUIRED) Sets the timestep (Value -1 will result in dumping values of
all timesteps.)<br>
(OPTIONAL) Takes output file name (without this flag, the program will
print to stdout)<br>
(OPTIONAL) Sets number of output points<br>
(OPTIONAL) Sets the starting particle index</font> </p>
</td>
</tr>
<tr>
<td height="1786"></td>
<td colspan="3" valign="top">
<p>&nbsp;</p>
<p align="center"><font face="Arial, Helvetica, sans-serif"><a href="#TOP">&lt;back
to top&gt;</a></font></p>
<h2><font color="#555588" face="Arial, Helvetica, sans-serif"><br>
<a name="input file">[8] How to create an input file to GNUplot</a></font></h2>
<p><font face="Arial, Helvetica, sans-serif"><b>EXAMPLE&gt;&gt;</b><br>
<i>Create input file to GNUplot that plots x vs. y.</i></font></p>
<p><font face="Arial, Helvetica, sans-serif"><b><font face="Courier New, Courier, mono" size="+1">$&gt;</font></b><font face="Courier New, Courier, mono">
./h5pToGNUplot -1 x -2 y -t 1 -i sample.h5part -o output.txt<br>
<b><font size="+1">$&gt;</font></b> cat output.txt<br>
-0.390779 -0.254793<br>
-0.396527 -0.252781<br>
-0.375362 -0.285137<br>
-0.396527 -0.252781<br>
-0.379917 -0.283147<br>
-0.390779 -0.254793<br>
-0.387536 -0.287346<br>
-0.371787 -0.319797<br>
-0.379917 -0.283147<br>
-0.378967 -0.326058<br>
-0.378976 -0.326078<br>
-0.387536 -0.287346<br>
-0.378957 -0.326069<br>
-0.379917 -0.283147<br>
-0.388762 -0.265390<br>
-0.371787 -0.319797<br>
-0.390779 -0.254793<br>
-0.376825 -0.266804<br>
-0.379917 -0.283147<br>
-0.375362 -0.285137<br>
...</font></font></p>
<p><font face="Courier New, Courier, mono"><i>Then run GNUplot...</i></font></p>
<p><font face="Courier New, Courier, mono"><b><font size="+1">$&gt;</font></b>
gnuplot</font></p>
<p><font face="Courier New, Courier, mono"> G N U P L O T<br>
Version 4.0 patchlevel 0<br>
last modified Thu Apr 15 14:44:22 CEST 2004<br>
System: Linux 2.6.11.4-21.11-smp</font></p>
<p><font face="Courier New, Courier, mono"> Copyright (C) 1986 - 1993, 1998,
2004<br>
Thomas Williams, Colin Kelley and many others</font></p>
<p><font face="Courier New, Courier, mono"> This is gnuplot version 4.0.
Please refer to the documentation<br>
for command syntax changes. The old syntax will be accepted<br>
throughout the 4.0 series, but all save files use the new syntax.</font></p>
<p><font face="Courier New, Courier, mono"> Type `help` to access the on-line
reference manual.<br>
The gnuplot FAQ is available from<br>
http://www.gnuplot.info/faq/</font></p>
<p><font face="Courier New, Courier, mono"> Send comments and requests for
help to<br>
&lt;gnuplot-info@lists.sourceforge.net&gt;<br>
Send bugs, suggestions and mods to<br>
&lt;gnuplot-bugs@lists.sourceforge.net&gt;</font></p>
<p><font face="Courier New, Courier, mono"><br>
Terminal type set to 'x11'<br>
<font size="+1"><b>gnuplot&gt;</b></font> plot "output.txt"</font></p>
<p><font face="Arial, Helvetica, sans-serif"><i>This will open a GNUplot
window that plots output.txt.</i></font></p>
<p align="center"><img src="H5tools_files/snapshot1.jpg" height="541" width="672"><br>
<font face="Arial, Helvetica, sans-serif">&lt;Sample screen shot of GNUplot
with input datafile generated by h5pToGNUplot&gt;</font></p>
</td>
</tr>
<tr>
<td height="44"></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody></table>
</body></html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

+345
View File
@@ -0,0 +1,345 @@
\documentclass[acus]{JAC2003}
%%
%% Use \documentclass[boxit]{JAC2003}
%% to draw a frame with the correct margins on the output.
%%
%% Use \documentclass[acus]{JAC2003}
%% for US letter paper layout
%%
\usepackage{graphicx}
%%
%% VARIABLE HEIGHT FOR THE TITLE BOX (default 35mm)
%%
\setlength{\titleblockheight}{40mm}
\begin{document}
\title{H5Pie: A Portable High Performance Parallel Data Interface for Electromagnetics Simulations Including Particles\thanks{
This work (LBNL-57607) was supported by the Director, Office of Science, Office of Advanced Scientific Computing Research, of the U.S. Department of Energy under Contract No. DE-AC03-76SF00098 and the DOE SciDAC project on ``Advanced Computing for 21st Century Accelerator Science and Technology.''.
}}
\author{A. Adelmann, A. Gsell, B. Oswald, PSI, Villigen, Switzerland \\
R.D. Ryne, LBNL/AFR, Berkeley, California, USA\\
W. Bethel, J.M. Shalf, C. Siegerist, LBNL/NERSC, Berkeley, California, USA}
\maketitle
\begin{abstract}
The very largest parallel particle simulations, for problems
involving six dimensional phase space,
generate vast quantities of data. It is desirable to
store such enormous datasets efficiently and also to share data
effortlessly between data analysis tools
such as VisIt or ParaView
among other groups who are working on particle-based accelerator
simulations. We define a very simple file schema built on top of HDF5~\cite{hdf5hp}
(Hierarchical Data Format version 5) as well as an API that simplifies
the reading/writing of the data to the HDF5 file format. HDF5 offers a
self-describing machine-independent binary file format that supports
scalable parallel I/O performance for MPI codes on computer systems
ranging from laptops to supercomputers.
H5Pie is actually a composition of three parts. On a very abstract view we have,
H5Part which handles the macro particles of a simulation. H5Mesh defines the (spatial) geometry of the
computational domain and H5Fields represents scalar and vector filds. (H5Pie = H5{\bf P} art + H5F{\bf i}eld+ H5M{\bf e}sh)
The sample H5Pie
API will be available for C, C++, and Fortran codes.
The common file format will enable groups that
use completely different simulation implementations to transparently share
datasets.
\end{abstract}
\section{Motivation}
The motivation for this undertaking is to create a file format that is
suitable for large-scale parallel simulation codes.
A suitable data format must have the following properties:
it must be a machine-independent binary representation that is
self-describing, easily extensible, language independent, efficient
(both for serial and parallel), and produces files that are seamlessly sharable
between different programs. In the following sections we describe
the motivation for these features and how they can be accomplished
using the proposed implementation.
\subsection{Machine Independence}
Processor architectures use different binary representations
for data. While the IEEE 754 standard has decreased the number of
differing floating point number represenations, byte-order still remains
a source of incompatibility. While it is trivial to byte-swap a file from
a programming standpoint, it creates a number of long-term file management
difficulties for groups that are sharing or maintaining a repository of simulation
data. Given files that store data structures with differently sized elements,
one must know the storage format precisely in order to apply byte-swapping
properly.
HDF5 does not suffer from these problems because the file format is completely
self-describing and the internal binary structures are all machine independent.
The HDF5 library is able to convert data that is stored in any native machine
represenation in the data file into a native binary representation in memory
as part of the reading process with little performance penalty.
\subsection{Language Independence}
The three most common languages used for implementing applications
in the arena of computational sciences are
Fortran, C and C++. The file format and associated API must hide
differences in the binary file-storage conventions of these languages
as well as offering native API bindings for each of these
programming languages.
For instance, Fortran unformatted binary files contain integer fields
at the beginning and the end of each record that describe the length
of the record. The size of these integer tags is usually 32-bits, but some
fortran compiler implementations will use larger tags in order to represent
larger record sizes. C and C++ binary files have no such convention for
record-oriented storage. The language-dependent differences in
binary storage layout conventions
can cause difficulties for scientists who wish to share data files between
Fortran and C/C++ implementations of a code, or with visualization tools
that are primarily written in C/C++. The API bindings and underlying file format
provided by the H5Part API and the underlying HDF5 file format are able to
hide these differences in order to provide symmetric access via all languages.
\subsection{Self-Describing}
The data is accessed by names, for example, one might ask for `the
column of data called $p_x$' -- affording a layer of file-layout independence.
In other words, self-describing data is
not accessed by a position in a file but by name of the datasets. Various attributes
of the data that may be necessary to using it are available. For
example, one can ask ``what are the units of column $p_x$?'.
There are a number of examples of self-describing file formats. Examples include HDF earlier HDF implementations leading up to HDF version 5 and the Unidata NetCDF format. Another
very popular approach is the Self Describing Data Sets (SDDS) \cite{SDDS} although it
is only serial in nature. HDF5 is a complete rewrite of the HDF file format that supports
parallel I/O and offers a much leaner, more flexible interface.
Because it is self-describing, the entire contents of an HDF5 file can be
browsed and even converted to ASCII text, including XML syntax text files,
using the built-in 'h5ls' and 'h5dump'
tools without specific knowledge of the internal file format.
\begin{figure}[htb]
\begin{minipage}[b]{0.5\textwidth}
%\includegraphics[scale=0.095]{./partview1.eps}
%\includegraphics[scale=0.097]{./density70.eps}
\end{minipage}
\caption{color: A common self-describing file format allows different codes to share a common set of visualization and data analysis tools. PartView and AVS/Express, pictured above, are able to read and display contents of an H5Part/HDF5 file written on any machine in any language, regardless of how many processors are used.}
\label{fig:vis}
\end{figure}
The primary advantage of accessing data and its attributes is that one
can then construct more flexible data manipulation tools that are capable
of surviving the natural evolution of file formats. Data formats can be extended
to include additional information without breaking older file readers.
Self-describing data contains all the information
that analysis tools need to manipulate various types of data
correctly. Two examples of such tools using the proposed file format
are shown in Figure ~\ref{fig:vis} As a result, data exchange between different simulations tools is
much simpler, robust and better defined by using self-describing data sets.
\subsection{High Performance}
The HDF5 file format allows data elements to be written to disk in the
native binary representation. The file format stores a description of
the native data representation of the machine that wrote the data so
that it can be automatically translated to the native binary
representation of the machine that reading the data (eg. if the byte
order differs). In contrast to XDR, where the data always gets
translated to/from an intermediate machine-neutral format, the HDF5
data conversion only occurs if the stored data represenation is
different from the native binary representation of the machine that is
reading the file, so there is no performance penalty if the machines
have the compatible binary data formats. [ada: need work] In general, HDF5 offers
performance that is very close to what can be achieved by writing an
ad-hoc machine-dependent binary for F77 unformatted data file.
\subsection{Parallel I/O}
HDF5 also supports parallel I/O capabilities for MPI programs.
The naive approach to writing data from a parallel program is to
write one file per processor. While this is simple to implement and
very efficient on most cluster filesystems, it leads to file management
headaches when it comes the time to analyze the data. One must either
recombine these separate files into a single file or create ponderous
user-interfaces that allow a data analysis application to read from a
directory full of files instead of just one file.
Parallel I/O methods, allow you to write data into a single file from all
of the tasks of a parallel program. The performance is typically lower
than that of writing one-file-per-processor, but it makes data management
much simpler after the program has finished. No additional recombining
steps are required to make the file accessible by vis-tools or for
restarting a simulation using a different number of processors.
Parallel HDF5 uses MPI-I/O for its low-level implementation. The
mechanics of using MPI-I/O are all hidden from the user by our
H5Part file API (the code looks nearly identical to reading/writing the data
from a serial program). While the performance is not as good as
writing one-file-per-processor, we demonstrate that writing files
with Parallel HDF5 is consistently faster than writing the data
in raw/native binary using the MPI-I/O library. This efficiency is
made possible through sophisticated HDF5 tuning directives that
control data alignment and caching within the HDF5 layer.
Therefore, we argue that it would be difficult to match
HDF5 performance even using a home-grown binary file format.
\section{H5Mesh File Organization and API}
\section{H5Field File Organization and API}
\section{H5Part File Organization and API}
The proposed file storage format uses HDF5 for the low-level file
storage and a simple API to provide a high-level interface to that
file format. A programmer can either use the H5Part API to access
the data files or write directly to the file format using some simple
conventions for organizing and naming the objects stored in the
file.
The HDF5 format, its benefits, and its file organization is decribed
at \cite{hdf5hp}. The file format was also adopted by the DOE
ASCI-VIEWS effort, so the library has been tuned and adapted to read
and write data efficiently on large-scale parallel computing
systems. We adopted HDF5 for our file storage needs because it offers
all that is needed as stipulated in the motivation section.
We describe now the H5Part conventions for storing
objects in the HDF5 file as well as some examples of the API.
\subsection{H5Part File Organization}
In order to store Particle Data in the HDF5 file format, we have
formalized the hierarchical arrangement of the datasets and naming
conventions for the groups and associated datasets. The sample H5Part API formally
encodes these conventions in order to provide a simple and uniform
way to access these files from C, C++, and Fortran codes. The API makes
it easier to write very portable data adaptors for visualization tools in order to
expand the number of tools available to access the data. Even so,
anyone can use the HDF5 $h5ls$ utility to examine the organization
of the H5Part files and even write their own HDF5-based interface for reading and writing the
file format. The standards offered by the sample API are completely independent of the
standard for organizing data within the file.
The file format supports the storage of multiple timesteps of
datasets that contain multiple fields. The fields correspond to different properties of
the particles at that particular time step -- for instance,
the 3-dimensional cartesian position of the particles
$(X,Y,Z)$ as well as the 3-dimensional phase of each
particle $(PX,PY,PZ)$. These two degrees of freedom
are organized such that the timesteps are groups (time groups) that are added sequentially
to the root group (``/''). The fields are datasets that are nested within the
time groups. The convention for naming the time group is $Particles<integer>$ where $<integer>$ is a monotonically increasing counter for the number of timesteps stored in the file.
The fields contained within a given time group are simply named for the property of the particle they represent. For instance, the phase of the particle stored in a simulation variable called 'px' is simply named $``px''$. The field names are user-defined and
can be understood automatically by the visualization
tools that read the file. The only other convention is that each time group must contain the same set of fields -- the contents of the fields will change, but the set of names for these fields must remain the same for all timesteps.
The fields can be either integer or real data types. Initially, the file format supports double precision float and 64-bit integers in order to simplify the requirements for file readers, but HDF5 is capable of automatically down-converting to 32-bit data types upon request. The API will be extended accordingly to support these conversions.
Finally, the file, the individual timesteps, and the individual data arrays can contain {\em attributes} that provide additional information about the data. For instance, the datasets can be annotated with attributes containing {\em units} for a given data field, simulation parameters, or code revision information. The {\em attributes} are key-value pairs where the $key$ is a string that is associated with the file, group, or dataset, and the $value$ is either a string, a real value, or an integer associated with that key.
%Visualization and data analysis tools can take advantage of this additional information if they are programmed to recognize it, but less-sophisticated tools can safely ignore it without compromising their ability to read the file format.
% ada: to philosophic for a 3 page paper, although it is very important and of course right!
%The ability to ignore such information is arguably one of the most powerful capabilities of the HDF5 file format. Whereas changes to headers or data layout in conventional, non-self-describing file formats can render an older reader interface useless, one can continuously add new descriptive information to the HDF5 file without having any detrimental effect on readers that were designed to work with older versions of the file format. This provides enormous benefits for the long term maintenance and evolution of the file format.
\section{GENERAL FORM IN PSEUDOCODE}
In Figure \ref{fig:usage} we show the very simple API for writing
data. The API for reading is almost symmetric. It is also worth to
note that there are minimal differences whether one read/write serial
or in parallel. The API consists of a small number of C, C++ and
Fortran functions and will be described elsewhere.
In the parallel case the original domain decomposition can be used or
the data can be decomposed according to the new number of processor
nodes available.
The resulting HDF5 file will contains a simple directory structure that can be navigated using the generic 'h5ls' utility;
\begin{figure}[h!] \label{fig:sbendVect}
\newsavebox{\gogo}
\setbox\gogo=\hbox{%
\begin{minipage}{0.4\textwidth}
\small
\begin{tabbing}
111111\=aaaa\=aaaa\=aaaa\=\kill
\texttt{if(not parallel);}\\
\quad\texttt{filehandle=OpenFile(filename,mode)} \\
\texttt{else}\\
\quad\texttt{filehandle=OpenFile(filename,mode,mpicomm)} \\
\texttt{SetNumberOfParticles(filehandle);}\\
\texttt{loop(step=1,NSteps);}\\
\quad\texttt{SetStep(filehandle,step);}\\
\quad\texttt{WriteData(filehandle,fieldname1,data1);}\\
\centerline{\texttt{{\bf write more data}}}\\
\quad\texttt{WriteData(filehandle,fieldname<n>,data<n>);}\\
\texttt{CloseFile(filehandle);}
\end{tabbing}
\end{minipage}
}
\fbox{\usebox{\gogo}}
\caption{Usage of H5Part in pseudo-code}
\label{fig:usage}
\end{figure}
% \begin{figure}[h!] \label{fig:sbendVect}
% \newsavebox{\gugu}
% \setbox\gugu=\hbox{%
% \begin{minipage}{0.4\textwidth}
% \small
% \begin{tabbing}
% 111111\=aaaa\=aaaa\=aaaa\=\kill
%\texttt{/Particles1/fieldname1 } \\
%\texttt{/Particles1/fieldname2} \\
%\texttt{ . . . } \\
%\texttt{/Particles1/fieldname<n> } \\
%\texttt{/Particles2/fieldname1} \\
%\texttt{ . . .}\\
%\texttt{ /Particles<nsteps>/fieldname<n>}
%\end{tabbing}
%\end{minipage}
%}
%\fbox{\usebox{\gugu}}
%\end{figure}
\vspace{-5mm}
\section{PERFORMANCE}
% [ada] We also have data for 4 procs
% [ada] name for one file per proc
Preliminary performance estimations, looking at global (GD) and local data (LD)
rates, suggests that our HDF5 writing has a very good performance even
with respect to raw mpi, as shown in Table \ref{tab:perf}.
\begin{table}[h!]
\begin{flushleft} \footnotesize
\begin{tabular}{|l|l|l|}
\hline
\bf Mode & \bf GD [MB/s] & \bf LD [MB/s]\\
\hline
mpi-io (one file) & 241 & 3.7 \\
\hline
one file per proc & 1288 & 20 \\
\hline
H5Part/pHDFf5 (one file) & 773 & 12 \\
\hline
\end{tabular}
\end{flushleft}
\caption{\label{tab:perf}{64 IBM SP-3 nodes writing $51e6$ particles (6D). }}
%, each having 6 double-precision floating point fields for 64 timesteps over 3 trials.}}
\end{table}
\vspace{-4mm}
\section{Conclusions and Future Work}
The file format will be extended in the near future to integrate fast bitmap indexing
technology~\cite{DEX} in order to provide accelerated queries of data
stored in the file. With fastbit technolgy, a user can efficiently extract subsets of data
using compound query expressions such
as {\it $(velocity > 1e6)$ AND $(0.4 < phase < 1.0)$}.
%Such a query-driven approach offers advantages over scalable technologies aimed at visualizing ever-larger datasets.
We are also constantly tuning the performance of the parallel data
file format implementation. We will also be porting the H5Part reader
to a wider variety of visualization tools.
%in order to expand the arena
%of tools available for analyzing the stored particle data.
\begin{thebibliography}{9} % Use for 1-9 references
\bibitem{FPAT082}
A. Adelmann, R.D Ryne, C. Siegerist, J. Shalf, "From Visualization to Data Mining With Large Datasets," PAC, 2005.
\bibitem{hdf5hp}
HDF5 Home Page, http://hdf.ncsa.uiuc.edu/HDF5.
\bibitem{SDDS}
Definitions and libraries for SDDS implementation may be found at the link http://www.aps.anl.gov/asd/oag/oagPackages.shtml.
\bibitem{DEX}
K. Stockinger, J. Shalf, W. Bethel, K. Wu. "DEX: Increasing the Capability of Scientific Data Analysis Pipelines by Using Efficient Bitmap Indices to Accelerate Scientific Visualization." Scientific and Statistical Database Management Conference (SDDBM), 2005.
\end{thebibliography}
\end{document}
+217
View File
@@ -0,0 +1,217 @@
%%
%% This file has been developed as a common template for papers
%% destined for electronic production using Adobe Acrobat
%% software for Accelerator Conferences
%%
%% See the JACo Website for more information
%%
%% http://www.cern.ch/accelconf/
%%
% Special thanks to John Jowett and Michel Goossens from CERN and
% Martin Comyn at TRIUMF for their significant contributions to
% this class file over the period 1996 to 2000.
% John Poole
% March 2000
% JAC2001.cls is a modified version of JAC2000.cls to produce indented
% first paragraphs after section, subsection and subsubsection headings.
%
% Martin Comyn April 2001
\def\fileversion{1.2}
\def\filedate{2003/03/10}
\def\docdate {2003/03/10}
\newlength{\dsep}
\newlength{\dwid}
\newlength{\dht}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{JAC2003}[\filedate\space Version \fileversion]
\DeclareOption{acus}
{\setlength{\dwid}{6mm}%
\setlength{\dht}{-18mm}
\setlength{\paperheight}{11in}
\setlength{\paperwidth}{8.5in}
\typeout{Setup for US LETTER PAPER}}
\DeclareOption{aca4}
{\setlength{\dwid}{0mm}%
\setlength{\dht}{0mm}}
\DeclareOption{boxit}
%%
%% This option draws a box on the output text with the correct margins
%%
{\special{!userdict begin /bop-hook{
gsave
newpath
58 55 moveto
58 737 lineto
539 737 lineto
539 55 lineto
closepath
stroke
grestore
}def end}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ExecuteOptions{aca4}
\ProcessOptions
\LoadClass[10pt]{article}
%%
%% Using Times fonts produces a Uniform, compact document
%% suitable for the Acrobat Software and printable anywhere.
%%
%% In a 'modern' TeX installation
%% e.g TeXLive Version 3 or later (more information on the JACo Website)
%% one can use the following command
%%
\renewcommand{\rmdefault}{ptm}
%%
%% Older installations may require
%% \RequirePackage{times}
%%
\typeout{------------------------------------------------------------------------}
\typeout{LaTeX2e Class file for Accelerator Conference publication for LaTeX2e users}
\typeout{ }
\typeout{Use the boxit option to draw a box on page showing the correct margins}
\typeout{ }
\typeout{Itemize, Enumerate and Description environments are compact versions}
\typeout{------------------------------------------------------------------------}
\typeout{ }
%
% DIMENSION OF TEXT:
\setlength{\textheight}{241mm}
\setlength{\textwidth}{170mm}
\setlength{\topmargin}{23mm}
\addtolength{\topmargin}{\dht}
\setlength{\oddsidemargin}{20mm}
\setlength{\evensidemargin}{20mm}
\setlength{\columnsep}{5mm}
\hoffset -25.4mm
\voffset -25.4mm
\columnseprule 0pt % Width of rule between columns.
% Use Michel Goossens' dense lists
% Prevent infinite loops
\let\Otemize =\itemize
\let\Onumerate =\enumerate
\let\Oescription =\description
% Zero the vertical spacing parameters
\def\Nospacing{\itemsep=0pt\topsep=0pt\partopsep=0pt\parskip=0pt\parsep=0pt}
% Redefine the environments in terms of the original values
\newenvironment{Itemize}{\Otemize\Nospacing}{\endlist}
\newenvironment{Enumerate}{\Onumerate\Nospacing}{\endlist}
\newenvironment{Description}{\Oescription\Nospacing}{\endlist}
\renewcommand{\topfraction}{.95}
\renewcommand{\bottomfraction}{.95}
\renewcommand{\textfraction}{0.1}
\renewcommand{\floatpagefraction}{0.8}
\def\@oddhead{}\def\@evenhead{}
\def\@oddfoot{}
\def\@evenfoot{\@oddfoot}
%-----------------------------------------------------------------------
% We acknowledge the borrowing of the clever part of
% Steven Gildea's definition of \section
% from geophysi.sty.
%
% \section is tricky because we want to both support \section* and have
% the section title uppercased.
\def\section{\secdef\@sectionb\@sections}
\def\@sectionb[#1]#2{\@sections{#2}}
\def\@sections#1{\@startsection {section}{1}{\z@}
{2.8ex plus 0.8ex minus .1ex}{1.5ex plus .2ex}
{\large\bf\boldmath\centering}{\uppercase{#1}}}
% Should there be any problem with this, we can revert to the following
% but then the onus is on the user to type the argument of \section in
% uppercase in the input file.
%
%\def\section{\@startsection {section}{1}{\z@}{2.8ex plus 0.8ex minus.1ex}
% {1.5ex plus .2ex}{\large\bf\boldmath\centering}}
\def\subsection{\@startsection{subsection}{2}{\z@}{2.6ex plus .8ex minus
.17ex}{1.2ex plus .17ex}{\large\it}}
\def\subsubsection{\@startsection{subsubsection}{3}{\parindent}
{2.5ex plus .7ex minus .17ex}{-1em}{\normalsize\bf}}
\def\paragraph{\@startsection
{paragraph}{4}{\z@}{2.5ex plus .7ex minus .17ex}{-1em}{\normalsize\it}}
\def\subparagraph{\@startsection
{subparagraph}{4}{\parindent}{2.25ex plus .7ex minus
.17ex}{-1em}{\normalsize\bf}}
\setcounter{secnumdepth}{0}
% This definition of \maketitle taken from article.sty, and has been
% somewhat modified.
\def\maketitle{\par
\begingroup
\def\thefootnote{\fnsymbol{footnote}}
\def\@makefnmark{\hbox
to 5pt{$^{\@thefnmark}$\hss}}
\twocolumn[\@maketitle]
\@thanks
\endgroup
\setcounter{footnote}{0}
\let\maketitle\relax
\let\@maketitle\relax
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}
\newlength{\titleblockheight} % so user can change it if need be
\setlength{\titleblockheight}{3.5cm}
\def\@maketitle{\vbox to \titleblockheight {\hsize\textwidth
\linewidth\hsize \vskip 3pt \centering
{\Large\bf \@title \par}
\vskip 2em % Vertical space after title.
{\large\begin{tabular}[t]{@{}c@{}}\@author \end{tabular}\par}
\vfil}}
% The \copyrightspace command is used to produce a blank space in the first
% column where a copyright notice may go. It works by producing a
% blank footnote of the appropriate size. Note that it should appear
% after any \footnote commands that produce footnotes for the first
% column. Adjusted to leave just 1cm.
\def\copyrightspace{\footnotetext[0]{\mbox{}\vrule height 1cm width 0pt}}
\def\abstract{\subsection*{Abstract}}
\def\endabstract{\par}
% Redefine to use smaller fonts
\def\thebibliography#1{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}
\section*{REFERENCES\@mkboth
{REFERENCES}{REFERENCES}}\small\list
{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
\advance\leftmargin\labelsep
\usecounter{enumi}}
\def\newblock{\hskip .11em plus .33em minus .07em}
\sloppy\clubpenalty4000\widowpenalty4000
\sfcode`\.=1000\relax}
\let\endthebibliography=\endlist
\twocolumn
\sloppy
\parindent 1em
\leftmargini 2em
\leftmargin\leftmargini
\leftmarginv .5em
\leftmarginvi .5em
\flushbottom
%-----------------------------------------------------------------------
+14
View File
@@ -0,0 +1,14 @@
#################################################
##BEGIN OF makefile "makefile" - using the gnu-compiler g++
##This file is used by the Make command.
###################################################
FILE=H5xxx
all: $(FILE).tex
latex $(FILE).tex
#bibtex $(FILE)
dvips -j0 $(FILE).dvi -o $(FILE).ps
# dvips $(FILE).dvi -o $(FILE).ps -x 1200 -O 10mm,15mm
clean:
rm *~ *.bbl *.aux *.blg *.log *.dvi *.ps
+54
View File
@@ -0,0 +1,54 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>H5Part, Logical Internal HDF5 File Layout</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<div id="maincenter">
<font face="arial,helvetica"><h1>H5Part: Logical Internal HDF5 File Layout</h1></font>
<P>
HDF5 is extremely flexible in the sense that it allows the user to define a higher level data model to describe domain-specific data relationships. This flexibility however makes it necessary to develop an agreement on the logical layout of the data. The H5Part data model consists of Particle groups corresponding to the simulation time steps, each with seven datasets corresponding to x, px, y, py, z, pz, id for each particle. Attributes can be added to the file and to the datasets.
</P>
<center><img src="layout.png"></center>
<PRE>
HDF5 "parttest.h5" {
GROUP "/" {
GROUP "Particles#0" {
DATASET "id" {
DATATYPE H5T_STD_I64LE
DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
}
DATASET "px" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
}
DATASET "py" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
}
DATASET "pz" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
}
DATASET "x" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
}
DATASET "y" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
}
DATASET "z" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 10 ) / ( 10 ) }
}
}
</PRE>
<P>
See <a href="http://www-vis.lbl.gov/Publications/2002/hdf5.pdf">hdf5.pdf</a> for an introduction on the use of HDF5.
</P>
</div>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+146
View File
@@ -0,0 +1,146 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: H5Part.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>H5Part.h</h1><a href="H5Part_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _H5Part_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _H5Part_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;hdf5.h&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#ifdef PARALLEL_IO</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#include &lt;mpi.h&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#endif</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span>
<a name="l00016"></a><a class="code" href="structH5PartFile.html">00016</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structH5PartFile.html">H5PartFile</a> {
<a name="l00017"></a><a class="code" href="structH5PartFile.html#o0">00017</a> hid_t <a class="code" href="structH5PartFile.html#o0">file</a>;
<a name="l00018"></a><a class="code" href="structH5PartFile.html#o1">00018</a> <span class="keywordtype">int</span> <a class="code" href="structH5PartFile.html#o1">timestep</a>;
<a name="l00019"></a>00019
<a name="l00020"></a><a class="code" href="structH5PartFile.html#o2">00020</a> hid_t <a class="code" href="structH5PartFile.html#o2">timegroup</a>;
<a name="l00021"></a><a class="code" href="structH5PartFile.html#o3">00021</a> hid_t <a class="code" href="structH5PartFile.html#o3">properties</a>;
<a name="l00022"></a><a class="code" href="structH5PartFile.html#o4">00022</a> hsize_t <a class="code" href="structH5PartFile.html#o4">nparticles</a>;
<a name="l00023"></a><a class="code" href="structH5PartFile.html#o5">00023</a> hid_t <a class="code" href="structH5PartFile.html#o5">shape</a>;
<a name="l00024"></a><a class="code" href="structH5PartFile.html#o6">00024</a> <span class="keywordtype">unsigned</span> <a class="code" href="structH5PartFile.html#o6">mode</a>;
<a name="l00025"></a><a class="code" href="structH5PartFile.html#o7">00025</a> <span class="keywordtype">int</span> <a class="code" href="structH5PartFile.html#o7">maxstep</a>;
<a name="l00026"></a><a class="code" href="structH5PartFile.html#o8">00026</a> hid_t <a class="code" href="structH5PartFile.html#o8">xfer_prop</a>,<a class="code" href="structH5PartFile.html#o9">create_prop</a>,<a class="code" href="structH5PartFile.html#o10">access_prop</a>;
<a name="l00027"></a><a class="code" href="structH5PartFile.html#o12">00027</a> hid_t <a class="code" href="structH5PartFile.html#o11">diskshape</a>,<a class="code" href="structH5PartFile.html#o12">memshape</a>; <span class="comment">/* for parallel I/O (this is on-disk) H5S_ALL </span>
<a name="l00028"></a>00028 <span class="comment"> if serial I/O */</span>
<a name="l00029"></a><a class="code" href="structH5PartFile.html#o13">00029</a> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="structH5PartFile.html#o13">viewstart</a>,<a class="code" href="structH5PartFile.html#o14">viewend</a>; <span class="comment">/* -1 if no view is available: A "view" looks at a subset of the data. */</span>
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="preprocessor">#ifdef PARALLEL_IO</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> *pnparticles; <span class="comment">/* the number of particles in each processor.</span>
<a name="l00033"></a>00033 <span class="comment"> With respect to the "VIEW", these numbers</span>
<a name="l00034"></a>00034 <span class="comment"> can be regarded as non-overlapping subsections</span>
<a name="l00035"></a>00035 <span class="comment"> of the particle array stored in the file.</span>
<a name="l00036"></a>00036 <span class="comment"> So they can be used to compute the offset of</span>
<a name="l00037"></a>00037 <span class="comment"> the view for each processor */</span>
<a name="l00038"></a>00038 MPI_Comm comm;
<a name="l00039"></a>00039 <span class="keywordtype">int</span> nprocs,myproc;
<a name="l00040"></a>00040 <span class="preprocessor">#endif</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>}<a class="code" href="structH5PartFile.html">H5PartFile</a>;
<a name="l00042"></a>00042
<a name="l00043"></a><a class="code" href="H5Part_8h.html#a0">00043</a> <span class="preprocessor">#define H5PART_READ 0x01</span>
<a name="l00044"></a><a class="code" href="H5Part_8h.html#a1">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define H5PART_WRITE 0x02</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="comment">/*========== File Opening/Closing ===============*/</span>
<a name="l00047"></a>00047 <span class="preprocessor">#ifdef PARALLEL_IO</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#include &lt;mpi.h&gt;</span>
<a name="l00049"></a>00049 <a class="code" href="structH5PartFile.html">H5PartFile</a> *<a class="code" href="H5Part_8c.html#a3">H5PartOpenFileParallel</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename,
<a name="l00050"></a>00050 <span class="keywordtype">unsigned</span> flags,
<a name="l00051"></a>00051 MPI_Comm communicator);
<a name="l00052"></a>00052 <span class="preprocessor">#endif</span>
<a name="l00053"></a><a class="code" href="H5Part_8h.html#a2">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define H5PartOpenFileSerial(x,y) H5PartOpenFile(x,y)</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00055"></a>00055 <a class="code" href="structH5PartFile.html">H5PartFile</a> *<a class="code" href="H5Part_8c.html#a4">H5PartOpenFile</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename, <span class="comment">/* name of datafile */</span>
<a name="l00056"></a>00056 <span class="keywordtype">unsigned</span> flags); <span class="comment">/* H5PART_READ | H5PART_WRITE */</span>
<a name="l00057"></a>00057 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a5">H5PartFileIsValid</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f);
<a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="H5Part_8c.html#a6">H5PartCloseFile</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f);
<a name="l00059"></a>00059
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="comment">/*============== File Writing Functions ==================== */</span>
<a name="l00062"></a>00062 <span class="keywordtype">void</span> <a class="code" href="H5Part_8c.html#a7">H5PartSetNumParticles</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">long</span> <span class="keywordtype">long</span> nparticles);
<a name="l00063"></a>00063 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a8">H5PartWriteDataFloat64</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,<span class="keywordtype">double</span> *array);
<a name="l00064"></a>00064 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a9">H5PartWriteDataInt64</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,<span class="keywordtype">long</span> <span class="keywordtype">long</span> *array);
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="comment">/*================== File Reading Routines =================*/</span>
<a name="l00067"></a>00067 <span class="keywordtype">void</span> <a class="code" href="H5Part_8c.html#a24">H5PartSetStep</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f, <span class="comment">/* file handle */</span>
<a name="l00068"></a>00068 <span class="keywordtype">int</span> step); <span class="comment">/* current timestep to select (0 to n-1) */</span>
<a name="l00069"></a>00069 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a27">H5PartGetNumSteps</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f);
<a name="l00070"></a>00070 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a28">H5PartGetNumDatasets</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f);
<a name="l00071"></a>00071 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a29">H5PartGetDatasetName</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">int</span> index,<span class="keywordtype">char</span> *name,<span class="keywordtype">int</span> maxlen);
<a name="l00072"></a>00072 <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="H5Part_8c.html#a33">H5PartGetNumParticles</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f);
<a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="H5Part_8c.html#a34">H5PartSetView</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">long</span> <span class="keywordtype">long</span> start,<span class="keywordtype">long</span> <span class="keywordtype">long</span> end);
<a name="l00074"></a><a class="code" href="H5Part_8h.html#a3">00074</a> <span class="preprocessor">#define H5PartResetView(f) H5PartSetView(f,-1,-1)</span>
<a name="l00075"></a><a class="code" href="H5Part_8h.html#a4">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define H5PartHasView(f) ((f-&gt;viewstart&lt;0||f-&gt;viewend&lt;0)?0:1)</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a35">H5PartGetView</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">long</span> <span class="keywordtype">long</span> *start,<span class="keywordtype">long</span> <span class="keywordtype">long</span> *end);
<a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="H5Part_8c.html#a36">H5PartSetCanonicalView</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f);
<a name="l00078"></a>00078
<a name="l00079"></a>00079 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a37">H5PartReadDataFloat64</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,
<a name="l00080"></a>00080 <span class="keywordtype">char</span> *name, <span class="comment">/* name of the array to read</span>
<a name="l00081"></a>00081 <span class="comment"> "x"=position in x direction (y,z)</span>
<a name="l00082"></a>00082 <span class="comment"> "vx"=velocity in x directio (y,z)</span>
<a name="l00083"></a>00083 <span class="comment"> "px"=position in x dir (y,z) */</span>
<a name="l00084"></a>00084 <span class="keywordtype">double</span> *array); <span class="comment">/* array to read data into */</span>
<a name="l00085"></a>00085 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a38">H5PartReadDataInt64</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,
<a name="l00086"></a>00086 <span class="keywordtype">char</span> *name, <span class="comment">/* name of the array to read</span>
<a name="l00087"></a>00087 <span class="comment"> "x"=position in x direction (y,z)</span>
<a name="l00088"></a>00088 <span class="comment"> "vx"=velocity in x directio (y,z)</span>
<a name="l00089"></a>00089 <span class="comment"> "px"=position in x dir (y,z) */</span>
<a name="l00090"></a>00090 <span class="keywordtype">long</span> <span class="keywordtype">long</span> *array); <span class="comment">/* array to read data into */</span>
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="comment">/* the following is a back-door for extensions to the data writing */</span>
<a name="l00093"></a>00093 <span class="preprocessor">#if 0</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="keywordtype">int</span> H5PartReadData(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,<span class="keywordtype">void</span> *array,hid_t type);
<a name="l00095"></a>00095 <span class="keywordtype">int</span> H5PartWriteData(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,<span class="keywordtype">void</span> *array,hid_t type);
<a name="l00096"></a>00096 <span class="preprocessor">#endif</span>
<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a39">H5PartReadParticleStep</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f, <span class="comment">/* filehandle */</span>
<a name="l00098"></a>00098 <span class="keywordtype">int</span> step, <span class="comment">/* selects timestep to read from*/</span>
<a name="l00099"></a>00099 <span class="keywordtype">double</span> *x,<span class="keywordtype">double</span> *y,<span class="keywordtype">double</span> *z, <span class="comment">/* particle positions */</span>
<a name="l00100"></a>00100 <span class="keywordtype">double</span> *px,<span class="keywordtype">double</span> *py,<span class="keywordtype">double</span> *pz, <span class="comment">/* particle momenta */</span>
<a name="l00101"></a>00101 <span class="keywordtype">long</span> <span class="keywordtype">long</span> *<span class="keywordtype">id</span>); <span class="comment">/* and phase */</span>
<a name="l00102"></a>00102 <span class="comment">/**********==============Attributes Interface============***************/</span>
<a name="l00103"></a>00103 <span class="comment">/* currently there is file attributes: Attributes bound to the file</span>
<a name="l00104"></a>00104 <span class="comment"> and step attributes which are bound to the current timestep. You </span>
<a name="l00105"></a>00105 <span class="comment"> must set the timestep explicitly before writing the attributes (just</span>
<a name="l00106"></a>00106 <span class="comment"> as you must do when you write a new dataset. Currently there are no</span>
<a name="l00107"></a>00107 <span class="comment"> attributes that are bound to a particular data array, but this could</span>
<a name="l00108"></a>00108 <span class="comment"> easily be done if required.</span>
<a name="l00109"></a>00109 <span class="comment">*/</span>
<a name="l00110"></a>00110 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a12">H5PartWriteStepAttrib</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,
<a name="l00111"></a>00111 hid_t type,<span class="keywordtype">void</span> *attrib,<span class="keywordtype">int</span> nelem);
<a name="l00112"></a>00112 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a14">H5PartWriteFileAttrib</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,
<a name="l00113"></a>00113 hid_t type,<span class="keywordtype">void</span> *attrib,<span class="keywordtype">int</span> nelem);
<a name="l00114"></a>00114 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a13">H5PartWriteAttrib</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,
<a name="l00115"></a>00115 hid_t type,<span class="keywordtype">void</span> *attrib,<span class="keywordtype">int</span> nelem); <span class="comment">/* this should be deprecated */</span>
<a name="l00116"></a>00116
<a name="l00117"></a>00117 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a10">H5PartWriteFileAttribString</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,
<a name="l00118"></a>00118 <span class="keywordtype">char</span> *attrib);
<a name="l00119"></a>00119 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a11">H5PartWriteStepAttribString</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,
<a name="l00120"></a>00120 <span class="keywordtype">char</span> *attrib);
<a name="l00121"></a>00121 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a16">H5PartGetNumStepAttribs</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f); <span class="comment">/* for current filestep */</span>
<a name="l00122"></a>00122 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a17">H5PartGetNumFileAttribs</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f);
<a name="l00123"></a>00123 <span class="keywordtype">void</span> <a class="code" href="H5Part_8c.html#a19">H5PartGetStepAttribInfo</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">int</span> idx,
<a name="l00124"></a>00124 <span class="keywordtype">char</span> *name,size_t maxnamelen,
<a name="l00125"></a>00125 hid_t *type,<span class="keywordtype">int</span> *nelem);
<a name="l00126"></a>00126 <span class="keywordtype">void</span> <a class="code" href="H5Part_8c.html#a20">H5PartGetFileAttribInfo</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">int</span> idx,
<a name="l00127"></a>00127 <span class="keywordtype">char</span> *name,size_t maxnamelen,
<a name="l00128"></a>00128 hid_t *type,<span class="keywordtype">int</span> *nelem);
<a name="l00129"></a>00129 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a21">H5PartReadStepAttrib</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,<span class="keywordtype">void</span> *data);
<a name="l00130"></a>00130 <span class="keywordtype">void</span> <a class="code" href="H5Part_8c.html#a22">H5PartReadAttrib</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,<span class="keywordtype">void</span> *data);
<a name="l00131"></a>00131 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a23">H5PartReadFileAttrib</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *name,<span class="keywordtype">void</span> *data);
<a name="l00132"></a>00132
<a name="l00133"></a>00133
<a name="l00134"></a>00134 <span class="comment">/**************** File Stashing Interfaces *************************/</span>
<a name="l00135"></a>00135 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a42">H5PartStashFile</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">char</span> *filename);
<a name="l00136"></a>00136 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a43">H5PartUnstashFile</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f, <span class="keywordtype">char</span> *filename, <span class="keywordtype">char</span> *outputpath); <span class="comment">/* outputpath can be null for cwd */</span>
<a name="l00137"></a>00137 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a44">H5PartGetNumStashFiles</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f);
<a name="l00138"></a>00138 <span class="keywordtype">int</span> <a class="code" href="H5Part_8c.html#a45">H5PartFileGetStashFileName</a>(<a class="code" href="structH5PartFile.html">H5PartFile</a> *f,<span class="keywordtype">int</span> nameindex,<span class="keywordtype">char</span> *filename,<span class="keywordtype">int</span> maxnamelen);
<a name="l00139"></a>00139
<a name="l00140"></a>00140
<a name="l00141"></a>00141 <span class="preprocessor">#endif</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
File diff suppressed because it is too large Load Diff
+16
View File
@@ -0,0 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Class List</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindexHL" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>H5Part Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
<tr><td class="indexkey"><a class="el" href="structH5IO__getname__t.html">H5IO_getname_t</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td class="indexvalue"></td></tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+309
View File
@@ -0,0 +1,309 @@
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
font-family: Geneva, Arial, Helvetica, sans-serif;
}
BODY,TD {
font-size: 90%;
}
H1 {
text-align: center;
font-size: 160%;
}
H2 {
font-size: 120%;
}
H3 {
font-size: 100%;
}
CAPTION { font-weight: bold }
DIV.qindex {
width: 100%;
background-color: #eeeeff;
border: 1px solid #b0b0b0;
text-align: center;
margin: 2px;
padding: 2px;
line-height: 140%;
}
DIV.nav {
width: 100%;
background-color: #eeeeff;
border: 1px solid #b0b0b0;
text-align: center;
margin: 2px;
padding: 2px;
line-height: 140%;
}
DIV.navtab {
background-color: #eeeeff;
border: 1px solid #b0b0b0;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}
TD.navtab {
font-size: 70%;
}
A.qindex {
text-decoration: none;
font-weight: bold;
color: #1A419D;
}
A.qindex:visited {
text-decoration: none;
font-weight: bold;
color: #1A419D
}
A.qindex:hover {
text-decoration: none;
background-color: #ddddff;
}
A.qindexHL {
text-decoration: none;
font-weight: bold;
background-color: #6666cc;
color: #ffffff;
border: 1px double #9295C2;
}
A.qindexHL:hover {
text-decoration: none;
background-color: #6666cc;
color: #ffffff;
}
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
A.el { text-decoration: none; font-weight: bold }
A.elRef { font-weight: bold }
A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
A.codeRef:link { font-weight: normal; color: #0000FF}
A.codeRef:visited { font-weight: normal; color: #0000FF}
A:hover { text-decoration: none; background-color: #f2f2ff }
DL.el { margin-left: -1cm }
.fragment {
font-family: Fixed, monospace;
font-size: 95%;
}
PRE.fragment {
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 2px;
margin-right: 8px;
padding-left: 6px;
padding-right: 6px;
padding-top: 4px;
padding-bottom: 4px;
}
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
TD.md { background-color: #F4F4FB; font-weight: bold; }
TD.mdPrefix {
background-color: #F4F4FB;
color: #606060;
font-size: 80%;
}
TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
DIV.groupHeader {
margin-left: 16px;
margin-top: 12px;
margin-bottom: 6px;
font-weight: bold;
}
DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
BODY {
background: white;
color: black;
margin-right: 20px;
margin-left: 20px;
}
TD.indexkey {
background-color: #eeeeff;
font-weight: bold;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px;
border: 1px solid #CCCCCC;
}
TD.indexvalue {
background-color: #eeeeff;
font-style: italic;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px;
border: 1px solid #CCCCCC;
}
TR.memlist {
background-color: #f0f0f0;
}
P.formulaDsp { text-align: center; }
IMG.formulaDsp { }
IMG.formulaInl { vertical-align: middle; }
SPAN.keyword { color: #008000 }
SPAN.keywordtype { color: #604020 }
SPAN.keywordflow { color: #e08000 }
SPAN.comment { color: #800000 }
SPAN.preprocessor { color: #806020 }
SPAN.stringliteral { color: #002080 }
SPAN.charliteral { color: #008080 }
.mdTable {
border: 1px solid #868686;
background-color: #F4F4FB;
}
.mdRow {
padding: 8px 10px;
}
.mdescLeft {
padding: 0px 8px 4px 8px;
font-size: 80%;
font-style: italic;
background-color: #FAFAFA;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
}
.mdescRight {
padding: 0px 8px 4px 8px;
font-size: 80%;
font-style: italic;
background-color: #FAFAFA;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
}
.memItemLeft {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memItemRight {
padding: 1px 8px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memTemplItemLeft {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memTemplItemRight {
padding: 1px 8px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 80%;
}
.memTemplParams {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
color: #606060;
background-color: #FAFAFA;
font-size: 80%;
}
.search { color: #003399;
font-weight: bold;
}
FORM.search {
margin-bottom: 0px;
margin-top: 0px;
}
INPUT.search { font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #eeeeff;
}
TD.tiny { font-size: 75%;
}
a {
color: #252E78;
}
a:visited {
color: #3D2185;
}
.dirtab { padding: 4px;
border-collapse: collapse;
border: 1px solid #b0b0b0;
}
TH.dirtab { background: #eeeeff;
font-weight: bold;
}
HR { height: 1px;
border: none;
border-top: 1px solid black;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

+17
View File
@@ -0,0 +1,17 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: File Index</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindexHL" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>H5Part File List</h1>Here is a list of all files with brief descriptions:<table>
<tr><td class="indexkey"><a class="el" href="H5Part_8c.html">H5Part.c</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="H5Part_8h.html">H5Part.h</a> <a href="H5Part_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="H5PartF_8c.html">H5PartF.c</a></td><td class="indexvalue"></td></tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+35
View File
@@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Class Members</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<div class="qindex"><a class="qindexHL" href="functions.html">All</a> | <a class="qindex" href="functions_vars.html">Variables</a></div>
Here is a list of all class members with links to the classes they belong to:
<p>
<ul>
<li>access_prop
: <a class="el" href="structH5PartFile.html#o10">H5PartFile</a><li>count
: <a class="el" href="structH5IO__getname__t.html#o1">H5IO_getname_t</a><li>create_prop
: <a class="el" href="structH5PartFile.html#o9">H5PartFile</a><li>diskshape
: <a class="el" href="structH5PartFile.html#o11">H5PartFile</a><li>file
: <a class="el" href="structH5PartFile.html#o0">H5PartFile</a><li>index
: <a class="el" href="structH5IO__getname__t.html#o0">H5IO_getname_t</a><li>maxstep
: <a class="el" href="structH5PartFile.html#o7">H5PartFile</a><li>memshape
: <a class="el" href="structH5PartFile.html#o12">H5PartFile</a><li>mode
: <a class="el" href="structH5PartFile.html#o6">H5PartFile</a><li>name
: <a class="el" href="structH5IO__getname__t.html#o2">H5IO_getname_t</a><li>nparticles
: <a class="el" href="structH5PartFile.html#o4">H5PartFile</a><li>properties
: <a class="el" href="structH5PartFile.html#o3">H5PartFile</a><li>shape
: <a class="el" href="structH5PartFile.html#o5">H5PartFile</a><li>timegroup
: <a class="el" href="structH5PartFile.html#o2">H5PartFile</a><li>timestep
: <a class="el" href="structH5PartFile.html#o1">H5PartFile</a><li>viewend
: <a class="el" href="structH5PartFile.html#o14">H5PartFile</a><li>viewstart
: <a class="el" href="structH5PartFile.html#o13">H5PartFile</a><li>xfer_prop
: <a class="el" href="structH5PartFile.html#o8">H5PartFile</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+35
View File
@@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Class Members - Variables</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindexHL" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<div class="qindex"><a class="qindex" href="functions.html">All</a> | <a class="qindexHL" href="functions_vars.html">Variables</a></div>
<p>
<ul>
<li>access_prop
: <a class="el" href="structH5PartFile.html#o10">H5PartFile</a><li>count
: <a class="el" href="structH5IO__getname__t.html#o1">H5IO_getname_t</a><li>create_prop
: <a class="el" href="structH5PartFile.html#o9">H5PartFile</a><li>diskshape
: <a class="el" href="structH5PartFile.html#o11">H5PartFile</a><li>file
: <a class="el" href="structH5PartFile.html#o0">H5PartFile</a><li>index
: <a class="el" href="structH5IO__getname__t.html#o0">H5IO_getname_t</a><li>maxstep
: <a class="el" href="structH5PartFile.html#o7">H5PartFile</a><li>memshape
: <a class="el" href="structH5PartFile.html#o12">H5PartFile</a><li>mode
: <a class="el" href="structH5PartFile.html#o6">H5PartFile</a><li>name
: <a class="el" href="structH5IO__getname__t.html#o2">H5IO_getname_t</a><li>nparticles
: <a class="el" href="structH5PartFile.html#o4">H5PartFile</a><li>properties
: <a class="el" href="structH5PartFile.html#o3">H5PartFile</a><li>shape
: <a class="el" href="structH5PartFile.html#o5">H5PartFile</a><li>timegroup
: <a class="el" href="structH5PartFile.html#o2">H5PartFile</a><li>timestep
: <a class="el" href="structH5PartFile.html#o1">H5PartFile</a><li>viewend
: <a class="el" href="structH5PartFile.html#o14">H5PartFile</a><li>viewstart
: <a class="el" href="structH5PartFile.html#o13">H5PartFile</a><li>xfer_prop
: <a class="el" href="structH5PartFile.html#o8">H5PartFile</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+107
View File
@@ -0,0 +1,107 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Class Members</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>
<div class="qindex"><a class="qindexHL" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>
<div class="qindex"><a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_h">h</a></div>
<p>
Here is a list of all file members with links to the files they belong to:
<p>
<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
<li>f_h5pt_close
: <a class="el" href="H5PartF_8c.html#a34">H5PartF.c</a><li>f_h5pt_getdatasetname
: <a class="el" href="H5PartF_8c.html#a43">H5PartF.c</a><li>f_h5pt_getfileattribinfo
: <a class="el" href="H5PartF_8c.html#a60">H5PartF.c</a><li>f_h5pt_getndatasets
: <a class="el" href="H5PartF_8c.html#a41">H5PartF.c</a><li>f_h5pt_getnfileattribs
: <a class="el" href="H5PartF_8c.html#a58">H5PartF.c</a><li>f_h5pt_getnpoints
: <a class="el" href="H5PartF_8c.html#a42">H5PartF.c</a><li>f_h5pt_getnstepattribs
: <a class="el" href="H5PartF_8c.html#a57">H5PartF.c</a><li>f_h5pt_getnsteps
: <a class="el" href="H5PartF_8c.html#a40">H5PartF.c</a><li>f_h5pt_getnumpoints()
: <a class="el" href="H5PartF_8c.html#a44">H5PartF.c</a><li>f_h5pt_getstepattribinfo
: <a class="el" href="H5PartF_8c.html#a59">H5PartF.c</a><li>f_h5pt_getview()
: <a class="el" href="H5PartF_8c.html#a48">H5PartF.c</a><li>f_h5pt_hasview
: <a class="el" href="H5PartF_8c.html#a47">H5PartF.c</a><li>f_h5pt_isvalid
: <a class="el" href="H5PartF_8c.html#a35">H5PartF.c</a><li>f_h5pt_openr
: <a class="el" href="H5PartF_8c.html#a32">H5PartF.c</a><li>f_h5pt_openr_par
: <a class="el" href="H5PartF_8c.html#a2">H5PartF.c</a><li>f_h5pt_openw
: <a class="el" href="H5PartF_8c.html#a33">H5PartF.c</a><li>f_h5pt_openw_par
: <a class="el" href="H5PartF_8c.html#a3">H5PartF.c</a><li>f_h5pt_readdata
: <a class="el" href="H5PartF_8c.html#a19">H5PartF.c</a><li>f_h5pt_readdata_i8
: <a class="el" href="H5PartF_8c.html#a50">H5PartF.c</a><li>f_h5pt_readdata_r8
: <a class="el" href="H5PartF_8c.html#a49">H5PartF.c</a><li>f_h5pt_readfileattrib
: <a class="el" href="H5PartF_8c.html#a62">H5PartF.c</a><li>f_h5pt_readstepattrib
: <a class="el" href="H5PartF_8c.html#a61">H5PartF.c</a><li>f_h5pt_resetview
: <a class="el" href="H5PartF_8c.html#a46">H5PartF.c</a><li>f_h5pt_setnpoints
: <a class="el" href="H5PartF_8c.html#a36">H5PartF.c</a><li>f_h5pt_setstep
: <a class="el" href="H5PartF_8c.html#a37">H5PartF.c</a><li>f_h5pt_setview
: <a class="el" href="H5PartF_8c.html#a45">H5PartF.c</a><li>f_h5pt_writedata_i8
: <a class="el" href="H5PartF_8c.html#a39">H5PartF.c</a><li>f_h5pt_writedata_r8
: <a class="el" href="H5PartF_8c.html#a38">H5PartF.c</a><li>f_h5pt_writefileattrib_i8
: <a class="el" href="H5PartF_8c.html#a52">H5PartF.c</a><li>f_h5pt_writefileattrib_r8
: <a class="el" href="H5PartF_8c.html#a51">H5PartF.c</a><li>f_h5pt_writefileattrib_string
: <a class="el" href="H5PartF_8c.html#a53">H5PartF.c</a><li>f_h5pt_writestepattrib_i8
: <a class="el" href="H5PartF_8c.html#a55">H5PartF.c</a><li>f_h5pt_writestepattrib_r8
: <a class="el" href="H5PartF_8c.html#a54">H5PartF.c</a><li>f_h5pt_writestepattrib_string
: <a class="el" href="H5PartF_8c.html#a56">H5PartF.c</a></ul>
<h3><a class="anchor" name="index_h">- h -</a></h3><ul>
<li>H5IO_getname_t
: <a class="el" href="H5Part_8c.html#a1">H5Part.c</a><li>H5IOgetname()
: <a class="el" href="H5Part_8c.html#a26">H5Part.c</a><li>H5NameExists()
: <a class="el" href="H5Part_8c.html#a40">H5Part.c</a><li>H5PART_READ
: <a class="el" href="H5Part_8h.html#a0">H5Part.h</a><li>H5PART_WRITE
: <a class="el" href="H5Part_8h.html#a1">H5Part.h</a><li>H5PartAttribcounter()
: <a class="el" href="H5Part_8c.html#a15">H5Part.c</a><li>H5PartCloseFile()
: <a class="el" href="H5Part_8h.html#a8">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a6">H5Part.c</a><li>H5PartDScounter()
: <a class="el" href="H5Part_8c.html#a25">H5Part.c</a><li>H5PartFile
: <a class="el" href="H5Part_8h.html#a5">H5Part.h</a><li>H5PartFileGetStashFileName()
: <a class="el" href="H5Part_8h.html#a38">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a45">H5Part.c</a><li>H5PartFileHasName()
: <a class="el" href="H5Part_8c.html#a41">H5Part.c</a><li>H5PartFileIsValid()
: <a class="el" href="H5Part_8h.html#a7">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a5">H5Part.c</a><li>H5PartGetDatasetName()
: <a class="el" href="H5Part_8h.html#a15">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a29">H5Part.c</a><li>H5PartGetDiskShape()
: <a class="el" href="H5Part_8c.html#a30">H5Part.c</a><li>H5PartGetFileAttribInfo()
: <a class="el" href="H5Part_8h.html#a31">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a20">H5Part.c</a><li>H5PartGetFirstDS()
: <a class="el" href="H5Part_8c.html#a32">H5Part.c</a><li>H5PartGetMemShape()
: <a class="el" href="H5Part_8c.html#a31">H5Part.c</a><li>H5PartGetNumDatasets()
: <a class="el" href="H5Part_8h.html#a14">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a28">H5Part.c</a><li>H5PartGetNumFileAttribs()
: <a class="el" href="H5Part_8h.html#a29">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a17">H5Part.c</a><li>H5PartGetNumParticles()
: <a class="el" href="H5Part_8h.html#a16">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a33">H5Part.c</a><li>H5PartGetNumStashFiles()
: <a class="el" href="H5Part_8h.html#a37">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a44">H5Part.c</a><li>H5PartGetNumStepAttribs()
: <a class="el" href="H5Part_8h.html#a28">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a16">H5Part.c</a><li>H5PartGetNumSteps()
: <a class="el" href="H5Part_8h.html#a13">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a27">H5Part.c</a><li>H5PartGetStepAttribInfo()
: <a class="el" href="H5Part_8h.html#a30">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a19">H5Part.c</a><li>H5PartGetView()
: <a class="el" href="H5Part_8h.html#a18">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a35">H5Part.c</a><li>H5PartHasView
: <a class="el" href="H5Part_8h.html#a4">H5Part.h</a><li>H5PartIOcounter()
: <a class="el" href="H5Part_8c.html#a2">H5Part.c</a><li>H5PartNormType()
: <a class="el" href="H5Part_8c.html#a18">H5Part.c</a><li>H5PartOpenFile()
: <a class="el" href="H5Part_8h.html#a6">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a4">H5Part.c</a><li>H5PartOpenFileParallel()
: <a class="el" href="H5Part_8c.html#a3">H5Part.c</a><li>H5PartOpenFileSerial
: <a class="el" href="H5Part_8h.html#a2">H5Part.h</a><li>H5PartReadAttrib()
: <a class="el" href="H5Part_8h.html#a33">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a22">H5Part.c</a><li>H5PartReadDataFloat64()
: <a class="el" href="H5Part_8h.html#a20">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a37">H5Part.c</a><li>H5PartReadDataInt64()
: <a class="el" href="H5Part_8h.html#a21">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a38">H5Part.c</a><li>H5PartReadFileAttrib()
: <a class="el" href="H5Part_8h.html#a34">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a23">H5Part.c</a><li>H5PartReadParticleStep()
: <a class="el" href="H5Part_8h.html#a22">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a39">H5Part.c</a><li>H5PartReadStepAttrib()
: <a class="el" href="H5Part_8h.html#a32">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a21">H5Part.c</a><li>H5PartResetView
: <a class="el" href="H5Part_8h.html#a3">H5Part.h</a><li>H5PartSetCanonicalView()
: <a class="el" href="H5Part_8h.html#a19">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a36">H5Part.c</a><li>H5PartSetNumParticles()
: <a class="el" href="H5Part_8h.html#a9">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a7">H5Part.c</a><li>H5PartSetStep()
: <a class="el" href="H5Part_8h.html#a12">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a24">H5Part.c</a><li>H5PartSetView()
: <a class="el" href="H5Part_8h.html#a17">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a34">H5Part.c</a><li>H5PartStashFile()
: <a class="el" href="H5Part_8h.html#a35">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a42">H5Part.c</a><li>H5PartUnstashFile()
: <a class="el" href="H5Part_8h.html#a36">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a43">H5Part.c</a><li>H5PartWriteAttrib()
: <a class="el" href="H5Part_8h.html#a25">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a13">H5Part.c</a><li>H5PartWriteDataFloat64()
: <a class="el" href="H5Part_8h.html#a10">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a8">H5Part.c</a><li>H5PartWriteDataInt64()
: <a class="el" href="H5Part_8h.html#a11">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a9">H5Part.c</a><li>H5PartWriteFileAttrib()
: <a class="el" href="H5Part_8h.html#a24">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a14">H5Part.c</a><li>H5PartWriteFileAttribString()
: <a class="el" href="H5Part_8h.html#a26">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a10">H5Part.c</a><li>H5PartWriteStepAttrib()
: <a class="el" href="H5Part_8h.html#a23">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a12">H5Part.c</a><li>H5PartWriteStepAttribString()
: <a class="el" href="H5Part_8h.html#a27">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a11">H5Part.c</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+59
View File
@@ -0,0 +1,59 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Class Members</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>
<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindexHL" href="globals_defs.html">Defines</a></div>
<div class="qindex"><a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_h">h</a></div>
<p>
<p>
<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
<li>f_h5pt_close
: <a class="el" href="H5PartF_8c.html#a34">H5PartF.c</a><li>f_h5pt_getdatasetname
: <a class="el" href="H5PartF_8c.html#a43">H5PartF.c</a><li>f_h5pt_getfileattribinfo
: <a class="el" href="H5PartF_8c.html#a60">H5PartF.c</a><li>f_h5pt_getndatasets
: <a class="el" href="H5PartF_8c.html#a41">H5PartF.c</a><li>f_h5pt_getnfileattribs
: <a class="el" href="H5PartF_8c.html#a58">H5PartF.c</a><li>f_h5pt_getnpoints
: <a class="el" href="H5PartF_8c.html#a42">H5PartF.c</a><li>f_h5pt_getnstepattribs
: <a class="el" href="H5PartF_8c.html#a57">H5PartF.c</a><li>f_h5pt_getnsteps
: <a class="el" href="H5PartF_8c.html#a40">H5PartF.c</a><li>f_h5pt_getstepattribinfo
: <a class="el" href="H5PartF_8c.html#a59">H5PartF.c</a><li>f_h5pt_hasview
: <a class="el" href="H5PartF_8c.html#a47">H5PartF.c</a><li>f_h5pt_isvalid
: <a class="el" href="H5PartF_8c.html#a35">H5PartF.c</a><li>f_h5pt_openr
: <a class="el" href="H5PartF_8c.html#a32">H5PartF.c</a><li>f_h5pt_openr_par
: <a class="el" href="H5PartF_8c.html#a2">H5PartF.c</a><li>f_h5pt_openw
: <a class="el" href="H5PartF_8c.html#a33">H5PartF.c</a><li>f_h5pt_openw_par
: <a class="el" href="H5PartF_8c.html#a3">H5PartF.c</a><li>f_h5pt_readdata
: <a class="el" href="H5PartF_8c.html#a19">H5PartF.c</a><li>f_h5pt_readdata_i8
: <a class="el" href="H5PartF_8c.html#a50">H5PartF.c</a><li>f_h5pt_readdata_r8
: <a class="el" href="H5PartF_8c.html#a49">H5PartF.c</a><li>f_h5pt_readfileattrib
: <a class="el" href="H5PartF_8c.html#a62">H5PartF.c</a><li>f_h5pt_readstepattrib
: <a class="el" href="H5PartF_8c.html#a61">H5PartF.c</a><li>f_h5pt_resetview
: <a class="el" href="H5PartF_8c.html#a46">H5PartF.c</a><li>f_h5pt_setnpoints
: <a class="el" href="H5PartF_8c.html#a36">H5PartF.c</a><li>f_h5pt_setstep
: <a class="el" href="H5PartF_8c.html#a37">H5PartF.c</a><li>f_h5pt_setview
: <a class="el" href="H5PartF_8c.html#a45">H5PartF.c</a><li>f_h5pt_writedata_i8
: <a class="el" href="H5PartF_8c.html#a39">H5PartF.c</a><li>f_h5pt_writedata_r8
: <a class="el" href="H5PartF_8c.html#a38">H5PartF.c</a><li>f_h5pt_writefileattrib_i8
: <a class="el" href="H5PartF_8c.html#a52">H5PartF.c</a><li>f_h5pt_writefileattrib_r8
: <a class="el" href="H5PartF_8c.html#a51">H5PartF.c</a><li>f_h5pt_writefileattrib_string
: <a class="el" href="H5PartF_8c.html#a53">H5PartF.c</a><li>f_h5pt_writestepattrib_i8
: <a class="el" href="H5PartF_8c.html#a55">H5PartF.c</a><li>f_h5pt_writestepattrib_r8
: <a class="el" href="H5PartF_8c.html#a54">H5PartF.c</a><li>f_h5pt_writestepattrib_string
: <a class="el" href="H5PartF_8c.html#a56">H5PartF.c</a></ul>
<h3><a class="anchor" name="index_h">- h -</a></h3><ul>
<li>H5PART_READ
: <a class="el" href="H5Part_8h.html#a0">H5Part.h</a><li>H5PART_WRITE
: <a class="el" href="H5Part_8h.html#a1">H5Part.h</a><li>H5PartHasView
: <a class="el" href="H5Part_8h.html#a4">H5Part.h</a><li>H5PartOpenFileSerial
: <a class="el" href="H5Part_8h.html#a2">H5Part.h</a><li>H5PartResetView
: <a class="el" href="H5Part_8h.html#a3">H5Part.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+97
View File
@@ -0,0 +1,97 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Class Members</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>
<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindexHL" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>
<div class="qindex"><a class="qindex" href="#index_f">f</a> | <a class="qindex" href="#index_h">h</a></div>
<p>
<p>
<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
<li>f_h5pt_close()
: <a class="el" href="H5PartF_8c.html#a34">H5PartF.c</a><li>f_h5pt_getdatasetname()
: <a class="el" href="H5PartF_8c.html#a43">H5PartF.c</a><li>f_h5pt_getfileattribinfo()
: <a class="el" href="H5PartF_8c.html#a60">H5PartF.c</a><li>f_h5pt_getndatasets()
: <a class="el" href="H5PartF_8c.html#a41">H5PartF.c</a><li>f_h5pt_getnfileattribs()
: <a class="el" href="H5PartF_8c.html#a58">H5PartF.c</a><li>f_h5pt_getnpoints()
: <a class="el" href="H5PartF_8c.html#a42">H5PartF.c</a><li>f_h5pt_getnstepattribs()
: <a class="el" href="H5PartF_8c.html#a57">H5PartF.c</a><li>f_h5pt_getnsteps()
: <a class="el" href="H5PartF_8c.html#a40">H5PartF.c</a><li>f_h5pt_getnumpoints()
: <a class="el" href="H5PartF_8c.html#a44">H5PartF.c</a><li>f_h5pt_getstepattribinfo()
: <a class="el" href="H5PartF_8c.html#a59">H5PartF.c</a><li>f_h5pt_getview()
: <a class="el" href="H5PartF_8c.html#a48">H5PartF.c</a><li>f_h5pt_hasview()
: <a class="el" href="H5PartF_8c.html#a47">H5PartF.c</a><li>f_h5pt_isvalid()
: <a class="el" href="H5PartF_8c.html#a35">H5PartF.c</a><li>f_h5pt_openr()
: <a class="el" href="H5PartF_8c.html#a32">H5PartF.c</a><li>f_h5pt_openw()
: <a class="el" href="H5PartF_8c.html#a33">H5PartF.c</a><li>f_h5pt_readdata_i8()
: <a class="el" href="H5PartF_8c.html#a50">H5PartF.c</a><li>f_h5pt_readdata_r8()
: <a class="el" href="H5PartF_8c.html#a49">H5PartF.c</a><li>f_h5pt_readfileattrib()
: <a class="el" href="H5PartF_8c.html#a62">H5PartF.c</a><li>f_h5pt_readstepattrib()
: <a class="el" href="H5PartF_8c.html#a61">H5PartF.c</a><li>f_h5pt_resetview()
: <a class="el" href="H5PartF_8c.html#a46">H5PartF.c</a><li>f_h5pt_setnpoints()
: <a class="el" href="H5PartF_8c.html#a36">H5PartF.c</a><li>f_h5pt_setstep()
: <a class="el" href="H5PartF_8c.html#a37">H5PartF.c</a><li>f_h5pt_setview()
: <a class="el" href="H5PartF_8c.html#a45">H5PartF.c</a><li>f_h5pt_writedata_i8()
: <a class="el" href="H5PartF_8c.html#a39">H5PartF.c</a><li>f_h5pt_writedata_r8()
: <a class="el" href="H5PartF_8c.html#a38">H5PartF.c</a><li>f_h5pt_writefileattrib_i8()
: <a class="el" href="H5PartF_8c.html#a52">H5PartF.c</a><li>f_h5pt_writefileattrib_r8()
: <a class="el" href="H5PartF_8c.html#a51">H5PartF.c</a><li>f_h5pt_writefileattrib_string()
: <a class="el" href="H5PartF_8c.html#a53">H5PartF.c</a><li>f_h5pt_writestepattrib_i8()
: <a class="el" href="H5PartF_8c.html#a55">H5PartF.c</a><li>f_h5pt_writestepattrib_r8()
: <a class="el" href="H5PartF_8c.html#a54">H5PartF.c</a><li>f_h5pt_writestepattrib_string()
: <a class="el" href="H5PartF_8c.html#a56">H5PartF.c</a></ul>
<h3><a class="anchor" name="index_h">- h -</a></h3><ul>
<li>H5IOgetname()
: <a class="el" href="H5Part_8c.html#a26">H5Part.c</a><li>H5NameExists()
: <a class="el" href="H5Part_8c.html#a40">H5Part.c</a><li>H5PartAttribcounter()
: <a class="el" href="H5Part_8c.html#a15">H5Part.c</a><li>H5PartCloseFile()
: <a class="el" href="H5Part_8h.html#a8">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a6">H5Part.c</a><li>H5PartDScounter()
: <a class="el" href="H5Part_8c.html#a25">H5Part.c</a><li>H5PartFileGetStashFileName()
: <a class="el" href="H5Part_8h.html#a38">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a45">H5Part.c</a><li>H5PartFileHasName()
: <a class="el" href="H5Part_8c.html#a41">H5Part.c</a><li>H5PartFileIsValid()
: <a class="el" href="H5Part_8h.html#a7">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a5">H5Part.c</a><li>H5PartGetDatasetName()
: <a class="el" href="H5Part_8h.html#a15">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a29">H5Part.c</a><li>H5PartGetDiskShape()
: <a class="el" href="H5Part_8c.html#a30">H5Part.c</a><li>H5PartGetFileAttribInfo()
: <a class="el" href="H5Part_8h.html#a31">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a20">H5Part.c</a><li>H5PartGetFirstDS()
: <a class="el" href="H5Part_8c.html#a32">H5Part.c</a><li>H5PartGetMemShape()
: <a class="el" href="H5Part_8c.html#a31">H5Part.c</a><li>H5PartGetNumDatasets()
: <a class="el" href="H5Part_8h.html#a14">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a28">H5Part.c</a><li>H5PartGetNumFileAttribs()
: <a class="el" href="H5Part_8h.html#a29">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a17">H5Part.c</a><li>H5PartGetNumParticles()
: <a class="el" href="H5Part_8h.html#a16">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a33">H5Part.c</a><li>H5PartGetNumStashFiles()
: <a class="el" href="H5Part_8h.html#a37">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a44">H5Part.c</a><li>H5PartGetNumStepAttribs()
: <a class="el" href="H5Part_8h.html#a28">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a16">H5Part.c</a><li>H5PartGetNumSteps()
: <a class="el" href="H5Part_8h.html#a13">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a27">H5Part.c</a><li>H5PartGetStepAttribInfo()
: <a class="el" href="H5Part_8h.html#a30">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a19">H5Part.c</a><li>H5PartGetView()
: <a class="el" href="H5Part_8h.html#a18">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a35">H5Part.c</a><li>H5PartIOcounter()
: <a class="el" href="H5Part_8c.html#a2">H5Part.c</a><li>H5PartNormType()
: <a class="el" href="H5Part_8c.html#a18">H5Part.c</a><li>H5PartOpenFile()
: <a class="el" href="H5Part_8h.html#a6">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a4">H5Part.c</a><li>H5PartOpenFileParallel()
: <a class="el" href="H5Part_8c.html#a3">H5Part.c</a><li>H5PartReadAttrib()
: <a class="el" href="H5Part_8h.html#a33">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a22">H5Part.c</a><li>H5PartReadDataFloat64()
: <a class="el" href="H5Part_8h.html#a20">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a37">H5Part.c</a><li>H5PartReadDataInt64()
: <a class="el" href="H5Part_8h.html#a21">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a38">H5Part.c</a><li>H5PartReadFileAttrib()
: <a class="el" href="H5Part_8h.html#a34">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a23">H5Part.c</a><li>H5PartReadParticleStep()
: <a class="el" href="H5Part_8h.html#a22">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a39">H5Part.c</a><li>H5PartReadStepAttrib()
: <a class="el" href="H5Part_8h.html#a32">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a21">H5Part.c</a><li>H5PartSetCanonicalView()
: <a class="el" href="H5Part_8h.html#a19">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a36">H5Part.c</a><li>H5PartSetNumParticles()
: <a class="el" href="H5Part_8h.html#a9">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a7">H5Part.c</a><li>H5PartSetStep()
: <a class="el" href="H5Part_8h.html#a12">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a24">H5Part.c</a><li>H5PartSetView()
: <a class="el" href="H5Part_8h.html#a17">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a34">H5Part.c</a><li>H5PartStashFile()
: <a class="el" href="H5Part_8h.html#a35">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a42">H5Part.c</a><li>H5PartUnstashFile()
: <a class="el" href="H5Part_8h.html#a36">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a43">H5Part.c</a><li>H5PartWriteAttrib()
: <a class="el" href="H5Part_8h.html#a25">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a13">H5Part.c</a><li>H5PartWriteDataFloat64()
: <a class="el" href="H5Part_8h.html#a10">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a8">H5Part.c</a><li>H5PartWriteDataInt64()
: <a class="el" href="H5Part_8h.html#a11">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a9">H5Part.c</a><li>H5PartWriteFileAttrib()
: <a class="el" href="H5Part_8h.html#a24">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a14">H5Part.c</a><li>H5PartWriteFileAttribString()
: <a class="el" href="H5Part_8h.html#a26">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a10">H5Part.c</a><li>H5PartWriteStepAttrib()
: <a class="el" href="H5Part_8h.html#a23">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a12">H5Part.c</a><li>H5PartWriteStepAttribString()
: <a class="el" href="H5Part_8h.html#a27">H5Part.h</a>, <a class="el" href="H5Part_8c.html#a11">H5Part.c</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+19
View File
@@ -0,0 +1,19 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Class Members</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindexHL" href="globals.html">File&nbsp;Members</a></div>
<div class="qindex"><a class="qindex" href="globals.html">All</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindexHL" href="globals_type.html">Typedefs</a> | <a class="qindex" href="globals_defs.html">Defines</a></div>
<p>
<ul>
<li>H5IO_getname_t
: <a class="el" href="H5Part_8c.html#a1">H5Part.c</a><li>H5PartFile
: <a class="el" href="H5Part_8h.html#a5">H5Part.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Main Page</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindexHL" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>H5Part Documentation</h1>
<p>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
@@ -0,0 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Member List</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>H5IO_getname_t Member List</h1>This is the complete list of members for <a class="el" href="structH5IO__getname__t.html">H5IO_getname_t</a>, including all inherited members.<p><table>
<tr class="memlist"><td><a class="el" href="structH5IO__getname__t.html#o1">count</a></td><td><a class="el" href="structH5IO__getname__t.html">H5IO_getname_t</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5IO__getname__t.html#o0">index</a></td><td><a class="el" href="structH5IO__getname__t.html">H5IO_getname_t</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5IO__getname__t.html#o2">name</a></td><td><a class="el" href="structH5IO__getname__t.html">H5IO_getname_t</a></td><td></td></tr>
</table><hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
@@ -0,0 +1,97 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: H5IO_getname_t Struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>H5IO_getname_t Struct Reference</h1><!-- doxytag: class="H5IO_getname_t" --><a href="structH5IO__getname__t-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5IO__getname__t.html#o0">index</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5IO__getname__t.html#o1">count</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5IO__getname__t.html#o2">name</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
H5IO_getname_t: Private
<p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="o1"></a><!-- doxytag: member="H5IO_getname_t::count" ref="o1" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structH5IO__getname__t.html#o1">H5IO_getname_t::count</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o0"></a><!-- doxytag: member="H5IO_getname_t::index" ref="o0" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structH5IO__getname__t.html#o0">H5IO_getname_t::index</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o2"></a><!-- doxytag: member="H5IO_getname_t::name" ref="o2" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">char* <a class="el" href="structH5IO__getname__t.html#o2">H5IO_getname_t::name</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="H5Part_8c.html">H5Part.c</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
@@ -0,0 +1,28 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: Member List</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>H5PartFile Member List</h1>This is the complete list of members for <a class="el" href="structH5PartFile.html">H5PartFile</a>, including all inherited members.<p><table>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o10">access_prop</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o9">create_prop</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o11">diskshape</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o0">file</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o7">maxstep</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o12">memshape</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o6">mode</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o4">nparticles</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o3">properties</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o5">shape</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o2">timegroup</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o1">timestep</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o14">viewend</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o13">viewstart</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="structH5PartFile.html#o8">xfer_prop</a></td><td><a class="el" href="structH5PartFile.html">H5PartFile</a></td><td></td></tr>
</table><hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+399
View File
@@ -0,0 +1,399 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>H5Part: H5PartFile Struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>H5PartFile Struct Reference</h1><!-- doxytag: class="H5PartFile" --><code>#include &lt;<a class="el" href="H5Part_8h-source.html">H5Part.h</a>&gt;</code>
<p>
<a href="structH5PartFile-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o0">file</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o1">timestep</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o2">timegroup</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o3">properties</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hsize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o4">nparticles</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o5">shape</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o6">mode</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o7">maxstep</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o8">xfer_prop</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o9">create_prop</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o10">access_prop</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o11">diskshape</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">hid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o12">memshape</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">long long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o13">viewstart</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">long long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structH5PartFile.html#o14">viewend</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
/struct H5PartFile: This is an essentially opaque datastructure that acts as the filehandle for all practical purposes. It is created by <a class="el" href="H5Part_8c.html#a4">H5PartOpenFile&lt;xx&gt;()</a> and destroyed by <a class="el" href="H5Part_8c.html#a6">H5PartCloseFile()</a>.
<p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="o10"></a><!-- doxytag: member="H5PartFile::access_prop" ref="o10" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hid_t <a class="el" href="structH5PartFile.html#o10">H5PartFile::access_prop</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o9"></a><!-- doxytag: member="H5PartFile::create_prop" ref="o9" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hid_t <a class="el" href="structH5PartFile.html#o9">H5PartFile::create_prop</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o11"></a><!-- doxytag: member="H5PartFile::diskshape" ref="o11" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hid_t <a class="el" href="structH5PartFile.html#o11">H5PartFile::diskshape</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o0"></a><!-- doxytag: member="H5PartFile::file" ref="o0" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hid_t <a class="el" href="structH5PartFile.html#o0">H5PartFile::file</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o7"></a><!-- doxytag: member="H5PartFile::maxstep" ref="o7" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structH5PartFile.html#o7">H5PartFile::maxstep</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o12"></a><!-- doxytag: member="H5PartFile::memshape" ref="o12" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hid_t <a class="el" href="structH5PartFile.html#o12">H5PartFile::memshape</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o6"></a><!-- doxytag: member="H5PartFile::mode" ref="o6" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">unsigned <a class="el" href="structH5PartFile.html#o6">H5PartFile::mode</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o4"></a><!-- doxytag: member="H5PartFile::nparticles" ref="o4" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hsize_t <a class="el" href="structH5PartFile.html#o4">H5PartFile::nparticles</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o3"></a><!-- doxytag: member="H5PartFile::properties" ref="o3" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hid_t <a class="el" href="structH5PartFile.html#o3">H5PartFile::properties</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o5"></a><!-- doxytag: member="H5PartFile::shape" ref="o5" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hid_t <a class="el" href="structH5PartFile.html#o5">H5PartFile::shape</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o2"></a><!-- doxytag: member="H5PartFile::timegroup" ref="o2" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hid_t <a class="el" href="structH5PartFile.html#o2">H5PartFile::timegroup</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o1"></a><!-- doxytag: member="H5PartFile::timestep" ref="o1" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int <a class="el" href="structH5PartFile.html#o1">H5PartFile::timestep</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o14"></a><!-- doxytag: member="H5PartFile::viewend" ref="o14" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">long long <a class="el" href="structH5PartFile.html#o14">H5PartFile::viewend</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o13"></a><!-- doxytag: member="H5PartFile::viewstart" ref="o13" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">long long <a class="el" href="structH5PartFile.html#o13">H5PartFile::viewstart</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="o8"></a><!-- doxytag: member="H5PartFile::xfer_prop" ref="o8" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">hid_t <a class="el" href="structH5PartFile.html#o8">H5PartFile::xfer_prop</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="H5Part_8h-source.html">H5Part.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Jan 31 11:52:45 2006 for H5Part by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>
+606
View File
@@ -0,0 +1,606 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>H5Part, the C/C++ API</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<!--#include virtual="/include/topIncludes.html"-->
<div id="maincenter">
<h1>The C/C++ Application Programming Interface (API)</h1>
<UL>
<LI><a href="#Opening">Opening, Closing, and Validating Datafiles</a>
<LI><a href="#SetStep">Setting the Simulation Timestep</a>
<LI><a href="#SetNumParticles">Setting the Number of Particles</a>
<LI><a href="#Writing">Writing Datasets</a>
<LI><a href="#ReadingNumTimeSteps">Reading the Number of Time Steps</a>
<LI><a href="#ReadingNumParticles">Reading the Number of Particles</a>
<LI><a href="#Reading">Reading Datasets</a>
<LI><a href="#DatasetsInfo">Reading the Number and the Names of Datasets</a>
<LI><a href="#AttributesInfo">Attributes Interface</a>
<LI><a href="#WriteAttribs">Writing Additional Attributes</a>
<LI><a href="#ReadAttribs">Reading Attributes</a>
</UL>
<br>
<a href="ReferencePages/index.html">Reference Manual (Doxygen)</a>
<br>
<hr>
<a name="Opening"><h2>Opening Datafiles</h2></a>
<P>
Just like the familiar <code>FILE*</code> type for C stdio operations, all
H5Part file operations require a file handle. The type of this handle is
<code>(H5PartFile*)</code>.
<br>
<code>H5PartOpenFile()</code> is
used to open a serial file and
<code>HDFPartOpenFileParallel()</code> is used to open a file for
Parallel I/O (in an MPI program).
After you open the file handle you can use the same set of
subroutines for operations on the file regardless of whether the
file is a parallel or serial I/O file.
The libraries manage all of this internally.<p>
</P>
<b>C Prototypes</b><br>
<P>
<b>Serial File</b><br>
<code>H5PartFile *H5PartOpenFile(const char *filename, unsigned
accessmode);</code><br>
<b>Parallel File</b><br>
<code>H5PartFile *H5PartOpenFileParallel(char *filename,int
accessmode,MPI_Comm communicator);</code><br>
<DT><i>filename</i>: </DT><DD>The name of the IEEEIO data file to
open. The typical extension for these files is <i>.h5</i></DD>
<DT><i>accessmode</i>: </DT><DD>The accessmode for the file. This is
one of 2 different access modes<br>
<code>H5PART_READ</code> : Opens a file in read-only mode.</DT><br>
<code>H5PART_WRITE</code> : Opens a file in write-only mode.
If the
file does not exist, it will be created. If it does
exist, it will be
truncated.
<DT><i>communicator</i>: </DT>
<DD>This argument is only available if the program has been
compiled with the <code>PARALLEL_IO</code> C-preprocessor flag
defined. It is used to pass in the communicator that will be
used for all collective I/O operations that target the same
file on disk.</DD>
<DT><i>Returns</i>:</DT><DD>A new filehandle with an open file or NULL if error.</DD>
</DL>
</P>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
. . . code . . .
/* Open an HDF5 file for writing */
H5PartFile *writer = H5PartOpenFile("datafileout.h5",H5PART_WRITE);
/* Open an HDF5 file for Parallel I/O */
H5PartFile *writer = H5PartOpenFileParallel("datafileout.h5",H5PART_WRITE,MPI_COMM_WORLD);
/* open HDF5 file for reading */
H5PartFile *reader = H5PartOpenFile("datafilein.h5",H5PART_READ);
/* open HDF5 file for parallel reads */
H5PartFile *reader = H5PartOpenFileParallel("datafilein.h5",H5PART_READ,MPI_COMM_WORLD);
. . . more code . . .
</pre> <br>
<hr>
<h2>Closing Datafiles</h2>
<P>
To close the file, you simply use H5PartCloseFile() for both
parallel and serial files. You must call H5PartCloseFile() on any
file descriptor created by H5PartFileOpen() regardless of
whether the file turns out to be valid or not.
</P>
<b>C Prototypes</b><br>
<P>
<code>void H5PartCloseFile(H5PartFile *fileID);</code>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
H5PartOpenFile() or H5PartOpenFileParallel().</DD>
<DT><i>Returns</i>:</DT><DD>void.</DD>
</DL>
</P>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
H5PartFile *file;
... code ...
file=H5PartOpenFileParallel("parttest.h5",H5PART_WRITE,comm);
... more code ...
H5PartCloseFile(file);
</pre>
<br>
<hr>
<h2>Validating Datafiles</h2>
<P>
You can test if the file was opened successfully using the
H5PartFileIsValid() function. It returns 1 if valid, 0 if invalid.<p>
</P>
<b>C Prototype</b><br>
<P>
<code>int H5PartFileIsValid(H5PartFile *fileID);</code>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
H5PartOpenFile() or H5PartOpenFileParallel().</DD>
<DT><i>Returns</i>:</DT><DD>1 if valid, 0 if invalid.</DD>
</DL>
</P>
<br><b>Example Use</b><br>
<P>
Here is an example of validating a newly opened file. Even if
the file is invalid, you must use H5PartCloseFile() to reclaim
the file handle.
</P>
<pre>
#include &lt H5Part.h &gt
. . . code . . .
H5PartFile *fileID = H5PartOpenFile("datafileout.h5",H5PART_WRITE);
if(!H5PartFileIsValid(fileID)){
puts("The file you specified does not exist or is not in a
readable format");
H5PartClose(fileID); /* must reclaim fileID even if file is invalid */
. . . do other cleanup . . .
}
. . . more code . . .
</pre><br>
<hr>
<a name="SetStep">
<h2>Setting the Timestep</h2>
</a>
<P>
When writing data to a file the current time step must be set (even if there is only one). In a file with N time steps, the steps are numbered from 0 to N-1.
</P>
<b>C Prototype</b><br>
<P>
<code>void H5PartSetStep((H5PartFile *fileID,int step);</code>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
H5PartOpenFile() or H5PartOpenFileParallel().</DD>
<DT><i>step</i>: </DT><DD>An integer time step.
</DD>
<DT><i>Returns</i>: </DT><DD>void.</DD>
</DL>
<br><b>Example Use</b><br>
</P>
<pre>
#include &lt H5Part.h &gt
H5PartFile *fileID;
int timeStep;
....
H5PartSetStep(fileID,timeStep);
....
</pre>
<hr>
<a name="SetNumParticles">
</a>
<h2>Setting the Number of Particles</h2>
<P>
H5PartSetNumParticles: This function's sole purpose is to
prevent needless creation of new HDF5 DataSpace handles if
the number of particles is invariant throughout the sim.
That's its only reason for existence. After you call this
subroutine, all subsequent operations will assume this
number of particles will be written.
</P>
<b>C Prototype</b><br>
<P>
<code>void H5PartSetNumParticles(H5PartFile *fileID,long long nparticles);</code>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
H5PartOpenFile() or H5PartOpenFileParallel().</DD>
<DT><i>nparticles</i>: </DT><DD>A long long integer specifying the number of particles.
</DD>
<DT><i>Returns</i>: </DT><DD>void.</DD>
</DL>
</P>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
H5PartFile *fileID;
long long nparticles;
....
H5PartSetStep(fileID,nparticles);
....
</pre>
<hr>
<a name="Writing">
<h2>Writing Datasets</h2>
</a>
<P>
After setting the number of particles with
<a href="#SetNumParticles">H5PartSetNumParticles()</a>
and the current timestep using
<a href="#SetStep">H5PartSetStep()</a>, you can start
writing datasets into the file. Each dataset has a name
associated with it (chosen by the user) in order to facilitate
later retrieval. The writing routines also implicitly store
the datatype of the array so that the array can be
reconstructed properly on other systems with incompatible type
representations. The data is committed to disk before the
routine returns. All data that is written after setting the
timestep is associated with that timestep. While the number of
particles can change for each timestep, you cannot change the
number of particles in the middle of a given timestep.
</P>
<b>C Prototypes</b><br>
<P>
<code>int H5PartWriteDataFloat64(H5PartFile *fileID,char
*name,double *array);</code></br>
<code>int H5PartWriteDataInt64(H5PartFile *fileID,char
*name,double *array);</code>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>name</i>: </DT><DD>A null-terminated string for the
name of the array. When retrieving datasets from disk,
you ask for them by name. There are no restrictions on
naming of arrays, but it is useful to arrive at some common
naming convention when sharing data with other groups.</DD>
<DT><i>array</i>: </DT><DD>A buffer containing an array of
particle data to commit to disk. The datatype for
elements in the buffer is implicit in the name of the
subroutine call.</DD>
<DT><i>Returns</i>: </DT><DD>1 on success, 0 on failure.</DD>
</DL>
</P>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
H5PartFile *fileID;
double *x,*y,*z;
int timeStep;
long long nparticles;
...
H5PartSetStep(fileID,timeStep); /* must set the current timestep in file */
H5PartSetNumParticles(fileID,nparticles); /* then set number of particles to store */
/* now write different tuples of data into this timestep of the file */
H5PartWriteDataFloat64(fileID,"x",x);
H5PartWriteDataFloat64(fileID,"y",y);
H5PartWriteDataFloat64(file,"z",z);
..
</pre>
<hr>
<a name="ReadingNumTimeSteps">
<h2>Reading the Number of Time Steps</h2>
</a>
<P>
This reads the number of datasteps that are
currently stored in the datafile.
It works for both reading and writing of files, but is probably
only typically used when you are reading.
</P>
<b>C Prototype</b><br>
<P>
<code>int H5PartGetNumSteps (H5PartFile *fileID);</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by <a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>Returns</i>: </DT><DD>The number of timesteps currently stored in the file.
</DL>
</P>
<hr>
<a name="ReadingNumParticles">
<h2>Reading the Number of Particles</h2>
</a>
<P>
This reads the number of particles that are
currently stored in the current time step.
It will arbitrarily select a timestep if you haven't
already set the timestep with H5PartSetStep().
</P>
<b>C Prototype</b><br>
<P>
<code>long long H5PartGetNumParticles (H5PartFile *fileID);</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by <a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>Returns</i>: </DT><DD>The number of particles in current timestep.
</DL>
</P>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
H5PartFile *fileID;
int timeStep;
long long nparticles;
H5PartSetStep(fileID,0);
nparticles=H5PartGetNumParticles(fileID);
...
</pre>
<hr>
<a name="Reading">
<h2>Reading Datasets</h2>
</a>
<P>
After setting the time step and getting the number of particles to allocate the data arrays, you can start to read the data.
</P>
<b>C Prototypes</b><br>
<P>
<code>int H5PartReadDataFloat64(H5PartFile *fileID,char *name,double *array);</code><br>
<code>int H5PartReadDataInt64(H5PartFile *fileID,char *name,long long *array);</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>name</i>: </DT><DD>A null-terminated string for the
name of the array. When retrieving datasets from disk,
you ask for them by name. There are no restrictions on
naming of arrays, but it is useful to arrive at some common
naming convention when sharing data with other groups.</DD>
<DT><i>array</i>: </DT><DD>A buffer to which the particle data will be read.i
The datatype for
elements in the buffer is implicit in the name of the
subroutine call.</DD>
<DT><i>Returns</i>: </DT><DD>1 on success, 0 on failure.</DD>
</DL>
</P>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
H5PartFile *fileID;
double *x,*y,*z;
int timeStep;
long long nparticles;
H5PartSetStep(fileID,0);
nparticles=H5PartGetNumParticles(fileID);
...
H5PartReadDataFloat64(file,"x",x);
H5PartReadDataFloat64(file,"y",y);
H5PartReadDataFloat64(file,"z",z);
...
</pre>
<hr>
<a name="DatasetsInfo"><h2>Reading the Number and Names of Datasets</h2></a>
<P>
H5Part provides funtions to find out how many datasets are stored at a particular timestep
and what their names are if you don't know what they are a-priori.
</P>
<b>C Prototypes</b><br>
<P>
<code>int H5PartGetNumDatasets(H5PartFile *fileID);</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>Returns</i>: </DT><DD>The number of datasets.</DD>
</DL>
</P>
<P>
<code>int H5PartGetDatasetName(H5PartFile *fileID,int index,char *name,int maxlen);</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>index</i>:</DT><DD> integer specifying the index of the dataset. If the number of datasets is
nds, the range of index is 0 to nds-1.</DD>
<DT><i>name</i>:</DT><DD> A null-terminated string for the name of the dataset.</DD>
<DT><i>maxlen</i>:</DT><DD> An integer specifying the maximum length of the name array.</DD>
<DT><i>Returns</i>: </DT><DD>1 on success, 0 on failure.</DD>
</DL>
</P>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
H5PartFile *fileID;
char name[64];
int index, nds;
...
nds=H5PartGetNumDatasets(fileID);
for(index=0;index&lt nds;index++){
H5PartGetDatasetName(fileID,index,name,64);
printf("\tDataset[%u] name=[%s]\n", index,name);
}
...
</pre>
<hr>
<a name="AttributesInfo">
<h2>Attributes Interface</h2></a>
<P>
In the current H5Part implemtation there are two types of attributes: file attributes which are bound to the file
and step attributes which are bound to the current timestep. You
must set the timestep explicitly before writing the attributes (just
as you must do when you write a new dataset. Currently there are no
attributes that are bound to a particular data array, but this could
easily be done if required.
</P>
<P>H5PartGetNumStepAttribs and H5PartGetNumFileAttribs return the number of attributes bound to a step and to a file respectively. H5PartGetStepAttribInfo and H5PartGetFileAttribInfo return the name, type and number of elements of type "type" bound to a step and a file respectively.
</P>
<b>C Prototypes:</b><br>
<code>int H5PartGetNumStepAttribs(H5PartFile *fileID);
</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>Returns</i> </DT><DD> The number of step attributes for the current step.</DD>
</DL>
<code>int H5PartGetNumFileAttribs(H5PartFile *fileID);
</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>Returns</i> </DT><DD> The number of file attributes.</DD>
</DL>
<code>void H5PartGetStepAttribInfo(H5PartFile *fileID,int idx, char *name,size_t maxnamelen,hid_t *type,int *nelem);
</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>idx</i>: </DT><DD>Index of the attribute.</DD>
<DT><i>name</i>: </DT><DD>A null-terminated string with the name of the attribute.</DD>
<DT><i>maxnamelen</i></DT><DD>the length of the name of the attribute.</DD>
<DT><i>type</i>: </DT><DD>One of the following: H5T_NATIVE_DOUBLE H5T_NATIVE_INT64 H5T_NATIVE_CHAR.</DD>
<DT><i>nelem</i>: </DT><DD>Number of elements of type "type".</DD>
<DT><i>Returns</i> </DT><DD> void.</DD>
</DL>
<code>void H5PartGetFileAttribInfo(H5PartFile *fileID,int idx, char *name,size_t maxnamelen, hid_t *type,int *nelem);
</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>idx</i>: </DT><DD>Index of the attribute.</DD>
<DT><i>name</i>: </DT><DD>A null-terminated string with the name of the attribute.</DD>
<DT><i>maxnamelen</i></DT><DD>the length of the name of the attribute.</DD>
<DT><i>type</i>: </DT><DD>One of the following: H5T_NATIVE_DOUBLE H5T_NATIVE_INT64 H5T_NATIVE_CHAR.</DD>
<DT><i>nelem</i>: </DT><DD>Number of elements of type "type".</DD>
<DT><i>Returns</i> </DT><DD> void.</DD>
</DL>
<a name="WriteAttribs">
<h2>Writing Attributes</h2>
</a>
<P>
An attribute can be bound to the file or after setting the time step to this time step.
</P>
<b>C Prototypes: Generic Attributes</b><br>
<P>
<code>int H5PartWriteFileAttrib(H5PartFile *fileID,char *name, hid_t type,void *value,int nelem);</code><br>
<code>int H5PartWriteStepAttrib(H5PartFile *fileID,char *name, hid_t type,void *value,int nelem);</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>name</i>: </DT><DD>A null-terminated string for the
name of the array. When retrieving datasets from disk,
you ask for them by name. There are no restrictions on
naming of arrays, but it is useful to arrive at some common
naming convention when sharing data with other groups.</DD>
<DT><i>type</i>: One of H5T_NATIVE_DOUBLE, H5T_NATIVE_INT64, H5T_NATIVE_CHAR.</DD>
<DT><i>value</i>: value of the attribute.</DD>
<DT><i>nelem</i>: number of elements of type "type".</DD>
<DT><i>Returns</i>: </DT><DD>1 on success, 0 on failure.</DD>
</DL>
</P>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
H5PartFile *fileID;
double actPos;
...
H5PartWriteStepAttrib(file_m,"Spos",H5T_NATIVE_DOUBLE,&actPos,1);
...
</pre>
<b>C Prototypes: String Attributes</b><br>
<P>
<code>int H5PartWriteStepAttribString(H5PartFile *fileID,char *name, char *attrib);</code><br>
<code>int H5PartWriteFileAttribString(H5PartFile *fileID,char *name, char *attrib);</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>name</i>: </DT><DD>A null-terminated string for the
name of the array. When retrieving datasets from disk,
you ask for them by name. There are no restrictions on
naming of arrays, but it is useful to arrive at some common
naming convention when sharing data with other groups.</DD>
<DT><i>attrib</i>: the attribute character string.</DD>
<DT><i>Returns</i>: </DT><DD>1 on success, 0 on failure.</DD>
</DL>
</P>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
H5PartFile *fileID;
char *newattrib;
char *newname;
...
H5PartWriteFileAttribString(fileID, newname,newattrib);
...
</pre>
<hr>
<a name="ReadAttribs">
<h2>Reading Attributes</h2>
</a>
<P>
<P>
As with the writing of attributes, there are two basic reading interfaces one that reads file bound attributes and one that reads
step bound attributes. If the step is not set the current one will be used.
</P>
</P>
<b>C Prototypes</b><br>
<P>
<code>void H5PartReadStepAttrib(H5PartFile *fileID,char *name,void *value);</code><br>
<code>void H5PartReadAttrib(H5PartFile *fileID,char *name,void *value);</code><br>
<code>int H5PartReadFileAttrib(H5PartFile *fileID,char *name,void *value);</code><br>
<DL>
<DT><i>fileID</i>: </DT><DD>A FileHandle opened by
<a href="#Opening">H5PartOpenFile()</a> or
<a href="#Opening">H5PartOpenFileParallel()</a>.</DD>
<DT><i>name</i>: </DT><DD>A null-terminated string for the
name of the array. When retrieving datasets from disk,
you ask for them by name. There are no restrictions on
naming of arrays, but it is useful to arrive at some common
naming convention when sharing data with other groups.</DD>
<DT><i>value</i>: value of the attribute.</DD>
<DT><i>Returns</i>: </DT><DD>1 on success, 0 on failure.</DD>
</DL>
</P>
<br>
NOTE: H5PartReadAttrib has been superseeded by H5PartSetStep.
<br>
<br><b>Example Use</b><br>
<pre>
#include &lt H5Part.h &gt
H5PartFile *fileID;
int step;
char name[MAXNAME];
...
H5PartSetStep(fileID, step);
if (H5PartReadStepAttrib(file, "filename", &name[0]) == 1){
printf("Read step from file: %s\n", name);
}
...
</pre>
</div>
<!--#include virtual="/include/dateFooter.html"-->
+504
View File
@@ -0,0 +1,504 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>H5part, the Fortran API</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<!--#include virtual="/include/topIncludes.html"-->
<div id="maincenter">
<h1>The FORTRAN Application Programming Interface (API)</h1>
<P>
These references contain the information on how to access the H5Part API using FORTRAN bindings. All pointers are cast to haddr_t (a unint64_t) within the C/C++ code. In fortran, these pointers (handles) are carried as INTEGER*8
</P>
<UL>
<LI><a href="#Opening">Opening, Closing, and Validating Datafiles</a>
<LI><a href="#SetStep">Setting the Simulation Timestep</a>
<LI><a href="#SetNumParticles">Setting the Number of Particles</a>
<LI><a href="#Writing">Writing Datasets</a>
<LI><a href="#ReadingNumTimeSteps">Reading the Number of Time Steps</a>
<LI><a href="#ReadingNumTimeSteps">Reading the Number of Particles</a>
<LI><a href="#Reading">Reading Datasets</a>
<LI><a href="#DatasetsInfo">Reading the Number and the Names of Datasets</a>
<LI><a href="#AttributesInfo">Attributes Interface</a>
<LI><a href="#WriteAttribs">Writing Additional Attributes</a>
<LI><a href="#ReadAttribs">Reading Attributes</a>
</UL>
<hr>
<a name="Opening"><h2>Opening Datafiles</h2></a>
<P>
Like the familiar OPEN in FORTRAN files can be opened to read and write. Different functions are used for the serial and parallel case.
</P>
<b>FORTRAN Prototypes</b><br>
<P>
<b>Serial File</b><br>
<code>INTEGER*8 h5pt_openr</code><br>
<code>FUNCTION h5pt_openw(file)<br>
in CHARACTER file(*) : the filename to open for writing </code><br>
returns INTEGER*8 : and open filehandle for serial reads</code><br>
<br>
<code>INTEGER*8 h5pt_openw</code><br>
<code>FUNCTION h5pt_openw(file)<br>
in CHARACTER file(*) : the filename to open for writing<br>
returns INTEGER*8 : and open filehandle for serial writes</code><br>
<br>
<b>Parallel File</b><br>
<code>INTEGER*8 h5pt_openr_par</code><br>
<code>FUNCTION h5pt_openr_par(file,mpi_communicator)<br>
in CHARACTER file(*) : the filename to open for writing<br>
in INTEGER mpi_communicator : the MPI_Communicator used by the program<br>
returns INTEGER*8 : and open filehandle for parallel reads</code><br>
<br>
<code>INTEGER*8 h5pt_openw_par</code><br>
<code>FUNCTION h5pt_openw_par(file,mpi_communicator)<br>
in CHARACTER file(*) : the filename to open for writing<br>
in INTEGER mpi_communicator : the MPI_Communicator used by the program<br>
returns INTEGER*8 : and open filehandle for parallel reads</code><br>
</P>
<P>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
...
file = h5pt_openw("testfilef.h5")
...
</pre>
</P>
<hr>
<h2>Closing Datafiles</h2>
<P>
To close the file, you simply use h5pt_close() for both parallel and serial files. You must call h5pt_close() on any file descriptor created by h5pt_open*() regardless of whether the file turns out to be valid or not.</P>
<b>FORTRAN Prototype</b><br>
<code>EXTERNAL h5pt_close</code><br>
<code>SUBROUTINE h5pt_close(filehandle)<br>
in INTEGER*8 filehandle : close this open filehandle</code><br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
...
call h5pt_close(file)
...
</pre>
</P>
<hr>
<h2> Validating Datafiles</h2>
<P>
You can test if the file was opened successfully using the
h5p_isvalid() function. It returns 1 if valid, 0 if invalid.
</P>
<b>FORTRAN Prototype</b><br>
<code>INTEGER h5pt_isvalid</code><br>
<code>FUNCTION h5pt_isvalid(filehandle)<br>
in INTEGER*8 filehandle: an open filehandle <br>
returns INTEGER : 1 if the file is valid, 0 if it is not</code><br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
INTEGER status
...
status = h5pt_isvalid(file)
...
</pre>
</P>
<hr>
<a name="SetStep">
<h2>Setting the Timestep</h2>
</a>
<P>
When writing data to a file the current time step must be set (even if there is only one). In a file with N time steps, the steps are numbered from 0 to N-1.
</P>
<b>FORTRAN Prototype</b><br>
<code>EXTERNAL h5pt_setstep</code><br>
<code>SUBROUTINE h5pt_setstep(filehandle,step)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in INTEGER step : Set the current timestep in the file to this
</code><br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
INTEGER I
INTEGER nstep
...
do I=1,nstep
call h5pt_setstep(file,I)
... more code ...
enddo
</pre>
</P>
<hr>
<a name="SetNumParticles">
</a>
<h2>Setting the Number of Particles</h2>
<P>
This function's sole purpose is to
prevent needless creation of new HDF5 DataSpace handles if
the number of particles is invariant throughout the sim.
That's its only reason for existence. After you call this
subroutine, all subsequent operations will assume this
number of particles will be written.
</P>
<b>FORTRAN Prototype</b><br>
<code>EXTERNAL h5pt_setnpoints</code><br>
<code>SUBROUTINE h5pt_setnpoints(filehandle,npoints)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in INTEGER*8 npoints : The number of particles on *this* processor</code><br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
INTEGER*8 npoints
...
call h5pt_setnpoints(file,npoints)
...
</pre>
<hr>
<a name="Writing">
<h2>Writing Datasets</h2>
</a>
<P>
After setting the number of particles with
<a href="#SetNumParticles">h5pt_setnpoints()</a>
and the current timestep using
<a href="#SetStep">h5pt_setstep()</a>, you can start
writing datasets into the file. Each dataset has a name
associated with it (chosen by the user) in order to facilitate
later retrieval. The writing routines also implicitly store
the datatype of the array so that the array can be
reconstructed properly on other systems with incompatible type
representations. The data is committed to disk before the
routine returns. All data that is written after setting the
timestep is associated with that timestep. While the number of
particles can change for each timestep, you cannot change the
number of particles in the middle of a given timestep.
</P>
<b>FORTRAN Prototypes</b><br>
<P>
The two data types supported for the moment are REAL*8 and INTEGER*8 (float64 and int64).
</P>
<code>EXTERNAL h5pt_writedata_r8</code><br>
<code>SUBROUTINE h5pt_writedata_r8(filehandle,name,data)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in CHARACTER name(*) : The name of the data we are writing eg. "X" or "Y" or "PX" etc...<br>
in REAL*8 data(*) : The dataarray to write</code><br>
<br>
<code>EXTERNAL h5pt_writedata_i8</code><br>
<code>SUBROUTINE h5pt_writedata_i8(filehandle,name,data)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in CHARACTER name(*) : The name of the data we are writing eg. "X" or "Y" or "PX" etc...<br>
in INTEGER*8 data(*) : The dataarray to write</code><br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
INTEGER nstep
INTEGER I
REAL*8,ALLOCATABLE:: X(:)
...
do I=1,nstep
call h5pt_setstep(file,I)
call h5pt_writedata_r8(file,"x",X)
enddo
...
</pre>
<hr>
<a name="ReadingNumTimeSteps">
<h2>Reading the Number of Time Steps</h2>
</a>
<P>
This reads the number of datasteps that are
currently stored in the datafile.
It works for both reading and writing of files, but is probably
only typically used when you are reading.
</P>
<b>FORTRAN Prototypes</b><br>
<code>INTEGER h5pt_getnsteps</code><br>
<code>FUNCTION h5pt_getnsteps(filehandle)<br>
in INTEGER*8 filehandle : an open filehandle<br>
returns INTEGER : number of timesteps stored in the file</code><br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
INTEGER nstep
file = h5pt_openr("testfilef.h5")
nstep = h5pt_getnsteps(file)
</pre>
<hr>
<a name="ReadingNumParticles">
<h2>Reading the Number of Particles</h2>
</a>
<P>
This reads the number of particles that are currently stored in the current time step. It will arbitrarily select a timestep if you haven't already set the timestep with H5PartSetStep().
</P>
<b>FORTRAN Prototypes</b><br>
<code>INTEGER h5pt_getnpointss</code><br>
<code>FUNCTION h5pt_getnpoints(filehandle)<br>
in INTEGER*8 filehandle : an open filehandle<br>
returns INTEGER : number of particles in the current time step</code><br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
INTEGER*8 npoints
INTEGET step;
file = h5pt_openr("testfilef.h5")
call h5pt_setstep(file,0)
npoints = h5pt_getnpoints(file)
...
</pre>
<hr>
<a name="Reading">
<h2>Reading Datasets</h2>
</a>
<P>
After setting the time step and getting the number of particles to allocate the data arrays, you can start to read the data.
</P>
<b>FORTRAN Prototypes</b><br>
<code>INTEGER h5pt_readdata_r8</code><br>
<code>FUNCTION h5pt_readdata_r8(filehandle,name,data)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in CHARACTER name(*) : The name of the data we are writing, eg. "X" or "Y" or "PX" etc...<br>
out REAL*8 data(*) : The data array to read. The number of points to read is either the number within
the view setby h5pt_setview() or the default (the total number of particles in the file).<br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
INTEGER err
INTEGER*8,ALLOCATABLE:: ID(:)
...
call h5pt_setstep(file,step)
err=h5pt_readdata_i8(file,"id",ID)
...
</pre>
<hr>
<a name="DatasetsInfo"><h2>Reading the Number and Names of Datasets</h2></a>
<P>
H5Part provides funtions to find out how many datasets are stored at a particular timestep
and what their names are if you don't know what they are a-priori.
</P>
<b>FORTRAN Prototypes</b><br>
<code>INTEGER h5pt_getndatasets</code><br>
<code>FUNCTION h5pt_getndatasets(filehandle)<br>
in INTEGER*8 filehandle : an open filehandle<br>
returns INTEGER*8 : number of datasets stored per timestep</code><br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
INTEGER ndata
...
call h5pt_setstep(file,1)
ndata = h5pt_getndatasets(file)
...
</pre>
<b>FORTRAN Prototypes</b><br>
<code>INTEGER h5pt_getdatasetname</code><br>
<code>FUNCTION h5pt_getdatasetname(filehandle,index,name)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in INTEGER index : Index for a given dataset name<br>
out CHARACTER name(*) returns the name of the dataset at that index<br>
returns INTEGER, 1 on success 0 on failure.</code><br>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
INTEGER err
CHARACTER,ALLOCATABLE:: name(:)
...
err=h5pt_getdatasetname(file, 1, name)
...
</pre>
<hr>
<a name="AttributesInfo">
<h2>Attributes Interface</h2></a>
<P>
In the current H5Part implemtation there are two types of attributes: file attributes which are bound to the file
and step attributes which are bound to the current timestep. You
must set the timestep explicitly before writing the attributes (just
as you must do when you write a new dataset. Currently there are no
attributes that are bound to a particular data array, but this could
easily be done if required.
</P>
<b>FORTRAN Prototypes</b><br>
<code>INTEGER h5pt_getnstepattribs</code><br>
<code>FUNCTION h5pt_getnstepattribs(filehandle)<br>
in INTEGER*8 filehandle : an open filehandle<br>
returns INTEGER : number of attributes bound to this particular step<br>
</code>
<br>
<code>INTEGER h5pt_getnfileattribs</code><br>
<code>FUNCTION h5pt_getnfileattribs(filehandle)<br>
in INTEGER*8 filehandle : an open filehandle<br>
returns INTEGER : number of attributes bound to the file<br>
</code>
<br>
<code>INTEGER h5pt_getstepattribinfo</code><br>
<code>FUNCTION h5pt_getstepattribinfo(filehandle,idx,attribname,nelem)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in INTEGER idx : index of the attribute being queried<br>
out CHARACTER name(*) : The name of the attribute<br>
out INTEGER nelem : Number of elements in the attrib array<br>
returns INTEGER, 1 on success 0 on failure.<br>
</code>
<br>
<code>INTEGER h5pt_getfileattribinfo</code><br>
<code>FUNCTION h5pt_getfileattribinfo(filehandle,idx,attribname,nelem)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in INTEGER idx : index of the attribute being queried<br>
out CHARACTER name(*) : The name of the attribute<br>
out INTEGER nelem : Number of elements in the attrib array<br>
returns INTEGER, 1 on success 0 on failure.
</code>
<br>
<hr>
<a name="WriteAttribs">
<h2>Writing Attributes</h2>
</a>
<P>
An attribute can be bound to the file or after setting the time step to this time step.
</P>
<b>FORTRAN Prototypes</b><br>
<code>INTEGER h5pt_writefileattrib_r8</code><br>
<code>
FUNCTION h5pt_writefileattrib_r8(filehandle,name,attrib,nelem)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in CHARACTER name(*) : The name of the attribute<br>
in REAL*8 attrib(*) : The array of data to write into the attribute<br>
in INTEGER nelem : Number of elements in the attrib array<br>
returns INTEGER, 1 on success 0 on failure<br>
</code>
<br>
<code>INTEGER h5pt_writefileattrib_i8</code><br>
<code>FUNCTION h5pt_writefileattrib_i8(filehandle,name,attrib,nelem)<br>
in INTEGER*8 filehandle : The filehandle<br>
in CHARACTER name(*) : The name of the attribute<br>
in INTEGER*8 attrib(*) : The array of data to write into the attribute<br>
in INTEGER nelem : Number of elements in the attrib array<br>
returns INTEGER, 1 on success 0 on failure<br>
</code>
<br>
<code>INTEGER h5pt_writefileattrib_string</code><br>
<code>FUNCTION h5pt_writefileattrib_string(filehandle,name,string)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in CHARACTER name(*) : The name of the attribute<br>
in CHARACTER*8 attrib(*) : The array of data to write into the attribute<br>
returns INTEGER, 1 on success 0 on failure<br>
</code>
<br>
<code>INTEGER h5pt_writestepattrib_r8</code><br>
<code>FUNCTION h5pt_writestepattrib_r8(filehandle,name,attrib,nelem)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in CHARACTER name(*) : The name of the attribute<br>
in REAL*8 attrib(*) : The array of data to write into the attribute<br>
in INTEGER nelem : Number of elements in the attrib array
returns INTEGER, 1 on success 0 on failure<br>
</code>
<br>
<code>INTEGER h5pt_writestepattrib_i8</code><br>
<code>FUNCTION h5pt_writestepattrib_i8(filehandle,name,attrib,nelem)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in CHARACTER name(*) : The name of the attribute<br>
in INTEGER*8 attrib(*) : The array of data to write into the attribute<br>
in INTEGER nelem : Number of elements in the attrib array<br>
returns INTEGER, 1 on success 0 on failure<br>
</code>
<br>
<code>INTEGER h5pt_writestepattrib_string</code><br>
<code>FUNCTION h5pt_writestepattrib_string(filehandle,name,string)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in CHARACTER name(*) : The name of the attribute<br>
in CHARACTER*8 attrib(*) : The array of data to write into the attribute<br>
returns INTEGER, 1 on success 0 on failure<br>
</code>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
REAL*8 REALTIME
INTEGER err
...
err=h5pt_writefileattrib_string(file,"Annotation","Testing 1 2 3")
err=h5pt_writestepattrib_r8(file,"RealTime",REALTIME,1)
...
</pre>
<hr>
<a name="ReadAttribs">
<h2>Reading Attributes</h2>
</a>
<P>
As with the writing of attributes, there are two basic reading interfaces one that reads file bound attributes and one that reads
step bound attributes. If the step is not set the current one will be used.
</P>
<b>FORTRAN Prototypes</b><br>
<code>INTEGER h5pt_readstepattrib</code><br>
<code>FUNCTION h5pt_readstepattrib(filehandle,name,data)<br>
in INTEGER*8 filehandle : an open filehandle<br>
in CHARACTER attributename(*) : name of the attribute to read<br>
out <anytype> data(*) : the attribute data will be read into this array<br>
returns INTEGER, 1 on success 0 on failure<br>
</code>
<br>
<code>INTEGER h5pt_readfileattrib</code><br>
<code>FUNCTION h5pt_readfileattrib(filehandle,name,data)<br>
in INTEGER*8 filehandle an open filehandle<br>
in CHARACTER attributename(*) : name of the attribute to read<br>
out <anytype> data(*) : the attribute data will be read into this array<br>
returns INTEGER, 1 on success 0 on failure<br>
</code>
<b>Example Use</b><br>
<pre>
include 'H5Part.inc'
INTEGER*8 file
REAL*8 REALTIME
...
call h5pt_setstep(file,0)
err=h5pt_readstepattrib(file,"RealTime",data)
...
</pre>
</div>
<!--#include virtual="/include/dateFooter.html"-->
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

+121
View File
@@ -0,0 +1,121 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>H5Part: a Portable High Performance Parallel Data Interface to HDF5</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="keywords" content="scientific visualization">
<meta name="sitemap" content="put a brief descriptive phrase here that will show up in the site map:foo">
<div id="maincenter">
<font face="arial,helvetica"><h1>H5Part: a Portable High Performance Parallel Data Interface to HDF5</h1></font>
<h2><font color="red"> THESE PAGES ARE UNDER CONSTRUCTION, July 2006</h2></font>
<font face="arial,helvetica" color="#555588"><h2>Motivation</h2></font>
<P>
<TABLE>
<TR>
<TD>
<a href="collision_6.png"><img src="collision_6.s.png" width=300 height=300></a>
</TD
></TR>
<TR>
<TD>
Beam-beam collision simulation.
</TD>
</TR>
</TABLE>
</P>
<P>
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.<p>
</P>
<P>
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.
</P>
<P>
H5Part is built on top of the <a href="http://hdf.ncsa.uiuc.edu/HDF5">HDF5 (Hierarchical Data Format).</a>
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.
</P>
<font face="arial,helvetica" color="#555588"><h2>H5Part file organization and API</h2></font>
<P>
The proposed file storage format uses HDF5 for the lowlevel
file storage and a simple API to provide a high-level
interface to that file format. A programmer can either use
the H5Part API to access the data files or write directly to
the file format using some simple conventions for organizing
and naming the objects stored in the file.
</P>
<P>
In order to store Particle Data in the HDF5 file format,
we have formalized the hierarchical arrangement of the
datasets and naming conventions for the groups and associated
datasets. The sample H5Part API formally encodes
these conventions in order to provide a simple and uniform
way to access these files from C, C++, and Fortran codes.
The API makes it easier to write very portable data adaptors
for visualization tools in order to expand the number of
tools available to access the data. Even so, anyone can use
the HDF5 h5ls utility to examine the organization of the
H5Part files and even write their own HDF5-based interface
for reading and writing the file format. The standards
offered by the sample API are completely independent of
the standard for organizing data within the file.The file
format supports the storage of multiple timesteps
of datasets that contain multiple fields.
</P>
<!--
<font face="arial,helvetica" color="#555588"><h2>Requirements Specification</h2></font>
<UL>
<LI><a href="H5PartSpecs.html">H5Part API specifications
</UL>
</a>
-->
<font face="arial,helvetica" color="#555588"><h2>Downloading and Installing H5Part</h2></font>
<UL>
<LI><a href="Downloading.html">Downloading HDF5 and H5Part
<LI><a href="BuildingHDF5.html">Building the HDF5 Library</a>
<LI><a href="Building.html">Building the H5Part Library</a>
</UL>
<font face="arial,helvetica" color="#555588"><h2>Bindings</h2></font>
<UL>
<LI><a href="UsingC.html">Using the C/C++ interface</a>
<LI><a href="UsingF.html">Using the F77/F90 interface</a>
<LI><a href="InternalLayout.html">Logical Internal HDF5 File</a>
<LI><a href="H5PartTools.html">H5Part Utility Tools</a>
<LI><a href="ReferencePages/index.html">Reference Manual</a>
</UL>
<font face="arial,helvetica" color="#555588"><h2>H5Part Visualization Tools</h2></font>
<UL>
<LI><a href="H5PartExpress.html">H5Part Express Reader</a>
<LI><a href="H5PartVisIt.html">H5Part VisIt Reader</a>
<LI><a href="H5PartIDL.html">H5Part IDL Reader</a>
<LI><a href="http://www.cscs.ch/a-display.php?id=170">H5Part sparticles Reader: developed at CSCS, Switzerland</a>
<LI><a href="H5PartPartView.html">PartView Visualization Application</a>
</UL>
</div>
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Executable
+323
View File
@@ -0,0 +1,323 @@
#!/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
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
+17
View File
@@ -0,0 +1,17 @@
*** License agreement ***
H5Part Copyright (c) 2006, 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.
*****
Executable
+357
View File
@@ -0,0 +1,357 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-02-08.22
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
Executable
+52
View File
@@ -0,0 +1,52 @@
# Makefile Rules (used by both GNUMakefile and Makefile)
# now "all" rule is defined in the main makefile
# all: H5PartTest H5PartTest.o H5Part.o
vtkhdf.o: vtkhdf.cc
$(CXX) $(CFLAGS) -c vtkhdf.cc
H5PartTest: H5PartTest.o H5Part.o
$(CXX) -o H5PartTest H5Part.o H5PartTest.o $(LDFLAGS)
Bench: Bench.c H5Part.o
$(CC) $(CFLAGS) -o Bench Bench.c H5Part.o $(LDFLAGS)
H5PartTest.o: H5PartTest.cc H5Part.hh
$(CXX) $(CFLAGS) -DREGRESSIONTEST -c H5PartTest.cc
H5PartTestParallel.o: H5PartTestParallel.cc H5Part.hh
$(CXX) $(CFLAGS) -c H5PartTestParallel.cc
H5PartTestParallel: H5PartTestParallel.o H5Part.o
$(CXX) -o H5PartTestParallel H5Part.o H5PartTestParallel.o $(LDFLAGS)
H5PartAndreasTest.o: H5PartAndreasTest.cc H5Part.hh
$(CXX) $(CFLAGS) -c H5PartAndreasTest.cc
H5PartAndreasTest: H5PartAndreasTest.o H5Part.o
$(CXX) -o H5PartAndreasTest H5Part.o H5PartAndreasTest.o $(LDFLAGS)
H5Part.o: H5Part.c H5Part.h
$(CC) $(CFLAGS) -c H5Part.c
H5PartF.o: H5PartF.c Underscore.h H5Part.h
$(CC) $(CFLAGS) -w -c H5PartF.c
H5testF.o: H5testF.f H5Part.inc
$(F90) $(CFLAGS) -c H5testF.f
H5testF: H5testF.o H5Part.o H5PartF.o
$(F90) $(CFLAGS) -o H5testF H5testF.o H5PartF.o H5Part.o $(LDFLAGS) -lC
vtkxml.o: vtkxml.cc
$(CXX) $(CFLAGS) -c vtkxml.cc
Underscore.h: TestUnderscore.f TestUnderscoreC.c
rm -f TestUnderscore.o TestUnderscoreC.o TestUnderscore
$(CC) -c TestUnderscoreC.c
$(F90) -c TestUnderscore.f
$(F90) -o TestUnderscore TestUnderscore.o TestUnderscoreC.o -lC
./TestUnderscore >& Underscore.h
clean:
rm -rf *~ *.o H5PartTest
+1150
View File
File diff suppressed because it is too large Load Diff
+285
View File
@@ -0,0 +1,285 @@
#ifndef __H5BLOCK_H
#define __H5BLOCK_H
/*!
Interface for block structured field data
This is used to store and retrieve scalar or vector valued field data.
With \f$ \Omega\ \f$ ....
Basic items are blocks (\f$ \Omaga_i \f$ ), cartesian subdomains of
\f$ \Omega \f$ . If a \f$ \Omega_i \f$ is refined we view this
\f$ \Omaga_i \f$ as a patch.
*/
/*!
Define the field layout (FL) given the dense index space at the actual
time step.
\return \c H5PART_SUCCESS or error code
\note
This defines \f$ \Omega \f$ and the view for HDF5
*/
h5part_int64_t
H5BlockDefine3DFieldLayout (
H5PartFile *f, /*!< file handle */
const h5part_int64_t i_start, /*!< start index of i */
const h5part_int64_t i_end, /*!< end index of i */
const h5part_int64_t j_start, /*!< start index of j */
const h5part_int64_t j_end, /*!< end index of j */
const h5part_int64_t k_start, /*!< start index of k */
const h5part_int64_t k_end /*!< end index of k */
);
h5part_int64_t
H5Block3dWriteScalarField (
H5PartFile *f,
const char *name,
const h5part_float64_t *data
);
h5part_int64_t
H5Block3dReadScalarField (
H5PartFile *f,
const char *name,
h5part_float64_t *data
);
h5part_int64_t
H5BlockGetNumFields (
H5PartFile *f
);
h5part_int64_t
H5BlockGetFieldInfo (
H5PartFile *f,
const h5part_int64_t idx,
char *name,
const h5part_int64_t len_name,
h5part_int64_t *grid_rank,
h5part_int64_t *grid_dims,
h5part_int64_t *field_dims
);
/*!
Write a 3D real valued vector field using the defined FL for this block
\return \c H5PART_SUCCESS or error code
\note we have to make a 1D and 2D version
\note Q: what about a dimension independent version?
*/
h5part_int64_t
H5Block3dWrite3dVectorField (
H5PartFile *f, /*!< file handle */
const char *name, /*!< name of the data set */
const h5part_float64_t *xval, /*!< array of x component data */
const h5part_float64_t *yval, /*!< array of y component data */
const h5part_float64_t *zval /*!< array of z component data */
);
h5part_int64_t
H5Block3dRead3dVectorField (
H5PartFile *f, /*!< file handle */
const char *name, /*!< name of the data set */
h5part_float64_t *xval, /*!< array of x component data */
h5part_float64_t *yval, /*!< array of y component data */
h5part_float64_t *zval /*!< array of z component data */
);
h5part_int64_t
H5BlockWriteFieldAttrib (
H5PartFile *f,
const char *field_name,
const char *attrib_name,
const h5part_int64_t attrib_type,
const void *attrib_value,
const h5part_int64_t attrib_nelem
);
h5part_int64_t
H5BlockWriteFieldAttribString (
H5PartFile *f,
const char *field_name,
const char *attrib_name,
const char *attrib_value
);
h5part_int64_t
H5BlockGetNumFieldAttribs (
H5PartFile *f,
const char *field_name
);
h5part_int64_t
H5BlockGetFieldAttribInfo (
H5PartFile *f,
const char *field_name,
const h5part_int64_t attrib_idx,
char *attrib_name,
const h5part_int64_t len_of_attrib_name,
h5part_int64_t *attrib_type,
h5part_int64_t *attrib_nelem
);
h5part_int64_t
H5PartReadFieldAttrib (
H5PartFile *f,
const char *field_name,
const char *attrib_name,
void *attrib_value
);
/*!
Checks if the block of the actual time step is refined i.e. if we
have a patch
\return \c 1 if we have a patch, otherwise \c 0
*/
h5part_int64_t
H5BlockIsPatch (
H5PartFile *f, /*!< file handle */
const char *name /*!< name of the data set */
);
/*!
return the maximum level refinement of refinement at the current
time step
\return number or error code
*/
h5part_int64_t
H5BlockGetMaxRefinementLevel (
H5PartFile *f, /*!< file handle */
const char *name /*!< name of the data set */
);
/*!
Write the mesh spacing for the active (current) block
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5BlockSetMeshSpacing (
H5PartFile *f, /*!< file handle */
char *name, /*!< name of the data set */
h5part_float64_t dx, /*!< mesh spacing in x */
h5part_float64_t dy, /*!< mesh spacing in y */
h5part_float64_t dz /*!< mesh spacing in z */
);
/*==========================================================================*/
/*
The following reflects the fact that we have fields which are decomposed
into modes.
Augment the field name with the mode number and use this name to store
the field. For the mode freqency use the same procedure.
*/
/*!
Read the number of stored modes at actual timestep
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5BlockGetNumberOfModes (
H5PartFile *f, /*!< file handle */
char *name /*!< name of the data set */
);
/*!
Set the number of stored modes at actual timestep
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5BlockSetNumberOfModes (
H5PartFile *f, /*!< file handle */
char *name, /*!< name of the data set */
int modes /*!< the number of modes */
);
/*!
Write a 3D real valued vector field using the defined FL for this block
\return \c H5PART_SUCCESS or error code
\note we have to make a 1D and 2D version
\note Q: what about a dimension independent version?
\note We need another name for this function!
*/
h5part_int64_t
H5BlockWrite3DVField_ (
H5PartFile *f, /*!< file handle */
char *name, /*!< name of the data set */
int modeNumber, /*!< the mode number of the field */
h5part_float64_t omega, /*!< the eigenmode of the field */
h5part_float64_t *xval, /*!< array of x component data */
h5part_float64_t *yval, /*!< array of y component data */
h5part_float64_t *zval /*!< array of z component data */
);
/*!
Write the quality factor for a given mode
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5BlockSetQFactor (
H5PartFile *f, /*!< file handle */
char *name, /*!< name of the data set */
int mode, /*!< the mode number of the field */
h5part_float64_t Q /*!< the quality factor */
);
/*!
Write the S-parameters for a given mode
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5BlockSetSParams (
H5PartFile *f, /*!< file handle */
char *name, /*!< name of the data set */
int mode, /*!< the mode number of the field */
h5part_float64_t **s /*!< S-parameters */
);
/*!
Read the quality factor for a given mode
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5BlockGetQFactor (
H5PartFile *f, /*!< file handle */
char *name, /*!< name of the data set */
int mode, /*!< the mode number of the field */
h5part_float64_t *Q /*!< the quality factor */
);
/*!
Read the S-parameters for a given mode
\return \c H5PART_SUCCESS or error code
*/
h5part_int64_t
H5BlockGetSParams (
H5PartFile *f, /*!< file handle */
char *name, /*!< name of the data set */
int mode, /*!< the mode number of the field */
h5part_float64_t **s /*!< S-parameters */
);
#endif // H5BLOCK_H
+44
View File
@@ -0,0 +1,44 @@
#ifndef __H5BLOCKERRORS_H
#define __H5BLOCKERRORS_H
#define _err_handler H5PartGetErrorHandler()
#define HANDLE_H5PART_LAYOUT_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_LAYOUT, \
"Bad layout." );
#define HANDLE_H5PART_NOENT_ERR( name ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_NOENT, \
"Object \"%s\" doesn't exists.", name );
#define HANDLE_H5PART_DATASET_RANK_ERR( m, n ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_INVAL, \
"Wrong rank of dataset: Is %d, but should be %d", \
m, n );
#define HANDLE_H5PART_GROUP_EXISTS_ERR( name ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_INVAL, \
"Group \"%s\" already exists", name )
#define HANDLE_H5S_CREATE_SIMPLE_3D_ERR( dims ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot create 3d dataspace with dimension sizes " \
"\"(%lld,%lld,%lld)\".", \
(long long)dims[0], (long long)dims[1], (long long)dims[2] );
#define HANDLE_H5S_GET_SIMPLE_EXTENT_DIMS_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot get dimension sizes of dataset" );
#endif
+54
View File
@@ -0,0 +1,54 @@
INTERFACE
INTEGER*8 FUNCTION h5bl_define_3d_layout ( filehandle, i_start, i_end, j_start, j_end, k_start, k_end )
INTEGER*8, INTENT(IN) :: filehandle
INTEGER*8, INTENT(IN) :: i_start
INTEGER*8, INTENT(IN) :: i_end
INTEGER*8, INTENT(IN) :: j_start
INTEGER*8, INTENT(IN) :: j_end
INTEGER*8, INTENT(IN) :: k_start
INTEGER*8, INTENT(IN) :: k_end
END FUNCTION
INTEGER*8 FUNCTION h5bl_3d_read_scalar ( filehandle, name, data )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER*8, INTENT(OUT) :: data(:,:,:)
END FUNCTION
INTEGER*8 FUNCTION h5bl_3d_read_3dvector ( filehandle, name, x, y, z )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER*8, INTENT(OUT) :: x(:,:,:)
INTEGER*8, INTENT(OUT) :: y(:,:,:)
INTEGER*8, INTENT(OUT) :: z(:,:,:)
END FUNCTION
INTEGER*8 FUNCTION h5bl_3d_write_scalar ( filehandle, name, data )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER*8, INTENT(IN) :: data(:,:,:)
END FUNCTION
INTEGER*8 FUNCTION h5bl_3d_write_3dvector ( filehandle, name, x, y, z )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name
INTEGER*8, INTENT(IN) :: x(:,:,:)
INTEGER*8, INTENT(IN) :: y(:,:,:)
INTEGER*8, INTENT(IN) :: z(:,:,:)
END FUNCTION
INTEGER*8 FUNCTION h5bl_getnumfields ( filehandle )
INTEGER*8, INTENT(IN) :: filehandle
END FUNCTION
INTEGER*8 FUNCTION h5bl_getfieldinfo ( filehandle, idx, field_name, len_field_name, grid_rank, grid_dims, field_dims )
INTEGER*8, INTENT(IN) :: filehandle
INTEGER*8, INTENT(IN) :: idx,
CHARACTER(LEN=*), INTENT(OUT) :: field_name
INTEGER*8, INTENT(IN) :: len_field_name
INTEGER*8, INTENT(OUT) :: grid_rank
INTEGER*8, INTENT(OUT) :: grid_dims(:)
INTEGER*8, INTENT(OUT) :: field_dims
END FUNCTION
+4
View File
@@ -0,0 +1,4 @@
#ifndef __H5BLOCKPRIVATE_H
#define __H5BLOCKPRIVATE_H
#endif
+31
View File
@@ -0,0 +1,31 @@
#ifndef __H5BLOCKTYPES_H
#define __H5BLOCKTYPES_H
struct H5BlockPartition {
h5part_int64_t i_start;
h5part_int64_t i_end;
h5part_int64_t j_start;
h5part_int64_t j_end;
h5part_int64_t k_start;
h5part_int64_t k_end;
};
struct H5BlockStruct {
h5part_int64_t timestep;
h5part_int64_t i_max;
h5part_int64_t j_max;
h5part_int64_t k_max;
struct H5BlockPartition *user_layout;
struct H5BlockPartition *write_layout;
hid_t shape;
hid_t memshape;
hid_t diskshape;
hid_t blockgroup;
hid_t field_group_id;
};
#define H5PART_ERR_LAYOUT -100
#define H5PART_ERR_NOENT -101
#endif
+234
View File
@@ -0,0 +1,234 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <hdf5.h>
#include "H5Part++.hh"
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
#ifdef READTEST
/*
A simple regression test that shows how you use this API
to write and read multi-timestep files of particle data.
*/
#ifdef PARALLEL_IO
#else
int main(int argc,char **argv){
const int sz=5;
double x[sz],y[sz],z[sz];
long long id[sz];
char name[64];
H5PartFile *file;
int i,t,nt,nds,myproc;
int nfattribs,nsattribs;
const string fn = string(argv[1]);
cout << "Open " << fn << endl;
file= H5PartOpenFile(fn.c_str(),H5PART_READ);
nt=H5PartGetNumSteps(file); /* get number of steps in file */
H5PartSetStep(file,0);
nds=H5PartGetNumDatasets(file); /* get number of datasets in timestep 0 */
puts("\n\n===============================");
for(i=0;i<nds;i++){ /* and print out those names */
H5PartGetDatasetName(file,i,name,64);
printf("\tDataset[%u] name=[%s]\n",
i,name);
}
puts("===============================\n\n");
nfattribs=H5PartGetNumFileAttribs(file);
printf("Number of datasteps in file is %u num file attribs=%d\n",
nt,nfattribs);
H5PartCloseFile(file);
}
#endif
#endif
#ifdef REGRESSIONTEST
/*
A simple regression test that shows how you use this API
to write and read multi-timestep files of particle data.
*/
#ifdef PARALLEL_IO
int main(int argc,char *argv[]){
int sz=5;
double *x,*y,*z;
long long *id;
char name[64];
H5PartFile *file;
int i,t,nt,nds;
int nprocs,myproc;
hid_t gid;
MPI_Comm comm=MPI_COMM_WORLD;
MPI_Init(&argc,&argv);
MPI_Comm_size(comm,&nprocs);
MPI_Comm_rank(comm,&myproc);
x=(double*)malloc(sz*nprocs*sizeof(double));
y=(double*)malloc(sz*nprocs*sizeof(double));
z=(double*)malloc(sz*nprocs*sizeof(double));
id=(long long*)malloc(sz*nprocs*sizeof(long long));
/* parallel file creation */
file=H5PartOpenFileParallel("parttest.h5",H5PART_WRITE,comm);
if(!file) {
perror("File open failed: exiting!");
exit(0);
}
for(t=0;t<5;t++){
MPI_Barrier(comm);
for(i=0;i<sz;i++) {
x[i]=(double)(i+t)+10.0*(double)myproc;
y[i]=0.1 + (double)(i+t);
z[i]=0.2 + (double)(i+t*10);
id[i]=i+sz*myproc;
}
printf("Proc[%u] Writing timestep %u file=%u\n",myproc,t,file->file);
H5PartSetStep(file,t); /* must set the current timestep in file */
H5PartSetNumParticles(file,sz); /* then set number of particles to store */
/* now write different tuples of data into this timestep of the file */
H5PartWriteDataFloat64(file,"x",x);
H5PartWriteDataFloat64(file,"y",y);
H5PartWriteDataFloat64(file,"z",z);
H5PartWriteDataInt64(file,"id",id);
}
printf("AllDone p[%u]\n",myproc);
H5PartCloseFile(file);
MPI_Barrier(comm);
printf("p[%u:%u] : OK, close file and reopen for reading \n",myproc,nprocs);
if(myproc==0){ /* now only proc 0 reads the file serially */
file= H5PartOpenFileSerial("parttest.h5",H5PART_READ);
nt=H5PartGetNumSteps(file); /* get number of steps in file */
H5PartSetStep(file,0);
nds=H5PartGetNumDatasets(file); /* get number of datasets in timestep 0 */
puts("\n\n===============================");
for(i=0;i<nds;i++){ /* and print out those names */
H5PartGetDatasetName(file,i,name,64);
printf("\tDataset[%u] name=[%s]\n",
i,name);
}
puts("===============================\n\n");
printf("Number of datasteps in file is %u\n",nt);
for(t=0;t<nt;t++){
int nparticles;
H5PartSetStep(file,t); /* select a timestep */
nparticles=(int)H5PartGetNumParticles(file);
printf("Step[%u] nparticles this step=%u\n",
t,nparticles); /* get num particles this step *
H5PartReadParticleStep(file,t,/* do a mongo read of all data this step */
x,y,z,id);
printf("\tid\t\tx\t\ty\t\tz\n");
puts("\t----------------------------------------------------");
for(i=0;i<nparticles;i++) {
printf("\t%llu\t%f\t%f\t%f\n\n",id[i],x[i],y[i],z[i]);
}
}
H5PartCloseFile(file);
}
if(x) free(x);
if(y) free(y);
if(z) free(z);
if(id) free(id);
MPI_Barrier(comm);
fprintf(stderr,"proc[%u]: done\n",myproc);
return MPI_Finalize();
}
#else
int main(int argc,char *argv){
const int sz=5;
double x[sz],y[sz],z[sz];
long long id[sz];
char name[64];
H5PartFile *file;
int i,t,nt,nds,myproc;
int nfattribs,nsattribs;
file=H5PartOpenFile("parttest.h5",H5PART_WRITE);
if(!file) {
perror("File open failed: exiting!");
exit(0);
}
for(t=0;t<5;t++){
long long step=t;
printf("Writing timestep %u\n",t);
for(i=0;i<sz;i++) {
x[i]=(double)(i+t);
y[i]=0.1 + (double)(i+t);
z[i]=0.2 + (double)(i+t);
id[i]=i;
}
H5PartSetStep(file,t); /* must set the current timestep in file */
H5PartSetNumParticles(file,sz); /* then set number of particles to store */
/* now write different tuples of data into this timestep of the file */
H5PartWriteDataFloat64(file,"x",x);
H5PartWriteDataFloat64(file,"y",y);
H5PartWriteDataFloat64(file,"z",z);
H5PartWriteDataInt64(file,"id",id);
H5PartWriteStepAttrib(file,"Step",H5T_NATIVE_INT64,&step,1);
}
H5PartCloseFile(file);
printf("OK, close file and reopen for reading\n");
file= H5PartOpenFile("parttest.h5",H5PART_READ);
nt=H5PartGetNumSteps(file); /* get number of steps in file */
H5PartSetStep(file,0);
nds=H5PartGetNumDatasets(file); /* get number of datasets in timestep 0 */
puts("\n\n===============================");
for(i=0;i<nds;i++){ /* and print out those names */
H5PartGetDatasetName(file,i,name,64);
printf("\tDataset[%u] name=[%s]\n",
i,name);
}
puts("===============================\n\n");
nfattribs=H5PartGetNumFileAttribs(file);
printf("Number of datasteps in file is %u num file attribs=%d\n",
nt,nfattribs);
for(t=0;t<nt;t++){
int nparticles;
H5PartSetStep(file,t); /* select a timestep */
nparticles=(int)H5PartGetNumParticles(file);
nsattribs=H5PartGetNumStepAttribs(file);
printf("Step[%u] nparticles this step=%u stepattribs=%u\n",
t,nparticles,nsattribs); /* get num particles this step */
if(nsattribs>0){
char attrname[32];
H5PartGetStepAttribInfo(file,0,attrname,32,0,0);
printf("First Attrib name is [%s]\n",attrname);
}
H5PartReadParticleStep(file,t,/* do a mongo read of all data this step */
x,y,z,id);
printf("\tid\t\tx\t\ty\t\tz\n");
puts("\t----------------------------------------------------");
for(i=0;i<sz;i++) {
printf("\t%llu\t%f\t%f\t%f\n\n",id[i],x[i],y[i],z[i]);
}
}
H5PartCloseFile(file);
}
#endif
#endif
+219
View File
@@ -0,0 +1,219 @@
#ifndef _H5Part_HH_
#define _H5Part_HH_
extern "C" {
#include "H5Part.h"
#ifdef PARALLEL_IO
#include <mpi.h>
#endif
}
/* Add any C++ specific extensions/implementations/wrappers here */
/* here is a sample class wrapping of H5Part for C++ usage */
class H5ParticleFile {
H5PartFile *file;
long long np;
public:
H5ParticleFile(const char *filename,const int flags):np(0){
this->file=H5PartOpenFile(filename,flags);
}
// H5ParticleFile(const std::string fn,const int flags):np(0){
// this->file=H5PartOpenFile(fn.cstr(),flags);
//}
#ifdef PARALLEL_IO
H5ParticleFile(const char *filename,const int flags,const MPI_Comm comm):np(0){
this->file=H5PartOpenFileParallel(filename,flags,comm);
}
// H5ParticleFile(const string fn,const int flags,const MPI_Comm comm):np(0){
// this->file=H5PartOpenFile(fn.cstr(),flags,comm);
//}
#endif
inline int isValid() { return H5PartFileIsValid(this->file);}
~H5ParticleFile(){H5PartCloseFile(this->file);}
inline void setNumParticles(long long nparticles){
np=nparticles;
H5PartSetNumParticles(file,nparticles);
}
// get the current step (-1 means step is invalid)
inline int step(){ return file->timestep; }
// set the current step
inline int step(int s){ H5PartSetStep(this->file,s); return file->timestep; }
inline int nSteps(){ return H5PartGetNumSteps(this->file);}
inline int nFields(){ return H5PartGetNumDatasets(file);}
inline int fieldName(int index,char *name,int maxlen){H5PartGetDatasetName(file,index,name,maxlen);}
inline long long nParticles(){return H5PartGetNumParticles(file);}
inline int write(char *name,double *array){
return H5PartWriteDataFloat64(this->file,name,array);
}
inline int write(char *name,long long *array){
return H5PartWriteDataInt64(this->file,name,array);
}
inline int read(char *name,double *array){
return H5PartReadDataFloat64(this->file,name,array);
}
inline int read(char *name,long long *array){
return H5PartReadDataInt64(this->file,name,array);
}
inline int readStep(int step,
double *x,double *y,double *z,
double *px,double *py,double *pz,
long long *id){
return H5PartReadParticleStep(file,step,
x,y,z,
px,py,pz,
id);
}
// Attribute stuff
// Info on attributes
inline int nStepAttribs(){ return H5PartGetNumStepAttribs(file);}
inline void getStepAttribInfo(int idx,char *name,size_t maxsize,
hid_t &type,int &nelem){
H5PartGetStepAttribInfo(file,idx,name,maxsize,&type,&nelem);
}
inline int nFileAttribs(){ return H5PartGetNumFileAttribs(file);}
inline void getFileAttribInfo(int idx,char *name,size_t maxsize,
hid_t &type,int &nelem){
H5PartGetFileAttribInfo(file,idx,name,maxsize,&type,&nelem);
}
// step attribs
// int writeStepAttrib(char *key,string *valuestring){
// return H5PartWriteStepAttribString(file,key,valuestring.c_str());
//}
inline int writeStepAttrib(char *key,char *valuestring){
return H5PartWriteStepAttribString(file,key,valuestring);
}
inline int writeStepAttrib(char *key,double *value,int nelem=1){
return H5PartWriteStepAttrib(file,key,H5T_NATIVE_DOUBLE,value,nelem);
}
inline int writeStepAttrib(char *key,float *value,int nelem=1){
return H5PartWriteStepAttrib(file,key,H5T_NATIVE_FLOAT,value,nelem);}
inline int writeStepAttrib(char *key,int *value,int nelem=1){
return H5PartWriteStepAttrib(file,key,H5T_NATIVE_INT,value,nelem);}
inline int writeStepAttrib(char *key,long long *value,int nelem=1){
return H5PartWriteStepAttrib(file,key,H5T_NATIVE_INT64,value,nelem);}
inline void readStepAttrib(char *key,void *value){
H5PartReadStepAttrib(file,key,value);
}
// FileAttribs
// Attribute stuff
// int writeFileAttrib(char *key,string *valuestring){
// return H5PartWriteFileAttribString(file,key,valuestring.c_str());
//}
inline int writeFileAttrib(char *key,char *valuestring){
return H5PartWriteFileAttribString(file,key,valuestring);
}
inline int writeFileAttrib(char *key,double *value,int nelem=1){
return H5PartWriteFileAttrib(file,key,H5T_NATIVE_DOUBLE,value,nelem);
}
inline int writeFileAttrib(char *key,float *value,int nelem=1){
return H5PartWriteFileAttrib(file,key,H5T_NATIVE_FLOAT,value,nelem);}
inline int writeFileAttrib(char *key,int *value,int nelem=1){
return H5PartWriteFileAttrib(file,key,H5T_NATIVE_INT,value,nelem);}
inline int writeFileAttrib(char *key,long long *value,int nelem=1){
return H5PartWriteFileAttrib(file,key,H5T_NATIVE_INT64,value,nelem);}
// read file attribs
inline int readFileAttrib(char *key,void *valuestring){
H5PartReadFileAttrib(file,key,valuestring);
}
};
/*
An even wackier idea
file.datasets[0:ndatasets-1]
file.attributes[0:nfileattribs-1]
file.datasets.attributes[0:ndatasetattribs-1]
file.datasets.size()
operators
.size()
.name()
[idx]
["name" or "keyname"]
*/
#if 0
class H5Dataset {
const hid_t dataset;
char *n; // return as const
int d[5]; // simple start
int nd;
public:
H5Dataset(const hid_t ds_handle):dataset(ds_handle){}
const char *name() {return n;}
int nDims(){ return nd; }
const int *dims(){return d;}
};
class H5Attribute{
char *n;
int sz;
public:
const char *name(){return n;}
int size(){return sz;}
}
class H5Group {
hid_t gid;
int sz;
protected:
virtual int computesize(){}
void setGroup(gid_t g){
if(gid>0) H5close(gid);
gid=g;
// must compute size if available
if(gid>0) computesize();
else sz=0;
}
public:
// const hid_t gid;
H5Group(hid_t g):gid(g){}
H5Group():gid(-1){}
~H5Group(){if(gid>0) H5Gclose(gid);}
int size(){return sz;}
};
class H5AttribGroup : public H5Group{
int size;
virtual void computesize(){
// compute the number of items in this group
}
public:
const H5Attribute &operator[](char *name);
const H5Attribute &operator[](int idx);
};
class H5DataGroup : public H5Group {
int size;
public:
const H5Dataset &operator[](int idx);
const H5Dataset &operator[](char *name);
// no name here??
};
class H5FancyParticles {
char *n;
hid_t file;
public:
hid_t mygroup;
const H5AttribGroup attributes;
const H5DataGroup datasets;
H5FancyParticles(char *filename,int readwriteflag);
~H5FancyParticles();
// int size();// return the number of datasets in file
// const char *name(); // return the name of the file?
// const H5Dataset &operator[](int idx); // index dataset by integer
// const H5Dataset &operator[](char *n); // index dataset by name
};
#endif
#endif
+2286
View File
File diff suppressed because it is too large Load Diff
Executable
+234
View File
@@ -0,0 +1,234 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <hdf5.h>
#include "H5Part.hh"
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
#ifdef READTEST
/*
A simple regression test that shows how you use this API
to write and read multi-timestep files of particle data.
*/
#ifdef PARALLEL_IO
#else
int main(int argc,char **argv){
const int sz=5;
double x[sz],y[sz],z[sz];
long long id[sz];
char name[64];
H5PartFile *file;
int i,t,nt,nds,myproc;
int nfattribs,nsattribs;
const string fn = string(argv[1]);
cout << "Open " << fn << endl;
file= H5PartOpenFile(fn.c_str(),H5PART_READ);
nt=H5PartGetNumSteps(file); /* get number of steps in file */
H5PartSetStep(file,0);
nds=H5PartGetNumDatasets(file); /* get number of datasets in timestep 0 */
puts("\n\n===============================");
for(i=0;i<nds;i++){ /* and print out those names */
H5PartGetDatasetName(file,i,name,64);
printf("\tDataset[%u] name=[%s]\n",
i,name);
}
puts("===============================\n\n");
nfattribs=H5PartGetNumFileAttribs(file);
printf("Number of datasteps in file is %u num file attribs=%d\n",
nt,nfattribs);
H5PartCloseFile(file);
}
#endif
#endif
#ifdef REGRESSIONTEST
/*
A simple regression test that shows how you use this API
to write and read multi-timestep files of particle data.
*/
#ifdef PARALLEL_IO
int main(int argc,char *argv[]){
int sz=5;
double *x,*y,*z;
long long *id;
char name[64];
H5PartFile *file;
int i,t,nt,nds;
int nprocs,myproc;
hid_t gid;
MPI_Comm comm=MPI_COMM_WORLD;
MPI_Init(&argc,&argv);
MPI_Comm_size(comm,&nprocs);
MPI_Comm_rank(comm,&myproc);
x=(double*)malloc(sz*nprocs*sizeof(double));
y=(double*)malloc(sz*nprocs*sizeof(double));
z=(double*)malloc(sz*nprocs*sizeof(double));
id=(long long*)malloc(sz*nprocs*sizeof(long long));
/* parallel file creation */
file=H5PartOpenFileParallel("parttest.h5",H5PART_WRITE,comm);
if(!file) {
perror("File open failed: exiting!");
exit(0);
}
for(t=0;t<5;t++){
MPI_Barrier(comm);
for(i=0;i<sz;i++) {
x[i]=(double)(i+t)+10.0*(double)myproc;
y[i]=0.1 + (double)(i+t);
z[i]=0.2 + (double)(i+t*10);
id[i]=i+sz*myproc;
}
printf("Proc[%u] Writing timestep %u file=%u\n",myproc,t,file->file);
H5PartSetStep(file,t); /* must set the current timestep in file */
H5PartSetNumParticles(file,sz); /* then set number of particles to store */
/* now write different tuples of data into this timestep of the file */
H5PartWriteDataFloat64(file,"x",x);
H5PartWriteDataFloat64(file,"y",y);
H5PartWriteDataFloat64(file,"z",z);
H5PartWriteDataInt64(file,"id",id);
}
printf("AllDone p[%u]\n",myproc);
H5PartCloseFile(file);
MPI_Barrier(comm);
printf("p[%u:%u] : OK, close file and reopen for reading \n",myproc,nprocs);
if(myproc==0){ /* now only proc 0 reads the file serially */
file= H5PartOpenFileSerial("parttest.h5",H5PART_READ);
nt=H5PartGetNumSteps(file); /* get number of steps in file */
H5PartSetStep(file,0);
nds=H5PartGetNumDatasets(file); /* get number of datasets in timestep 0 */
puts("\n\n===============================");
for(i=0;i<nds;i++){ /* and print out those names */
H5PartGetDatasetName(file,i,name,64);
printf("\tDataset[%u] name=[%s]\n",
i,name);
}
puts("===============================\n\n");
printf("Number of datasteps in file is %u\n",nt);
for(t=0;t<nt;t++){
int nparticles;
H5PartSetStep(file,t); /* select a timestep */
nparticles=(int)H5PartGetNumParticles(file);
printf("Step[%u] nparticles this step=%u\n",
t,nparticles); /* get num particles this step */
H5PartReadParticleStep(file,t, /* do a mongo read of all data this step */
x,y,z,x,y,z,id);
printf("\tid\t\tx\t\ty\t\tz\n");
puts("\t----------------------------------------------------");
for(i=0;i<nparticles;i++) {
printf("\t%llu\t%f\t%f\t%f\n\n",id[i],x[i],y[i],z[i]);
}
}
H5PartCloseFile(file);
}
if(x) free(x);
if(y) free(y);
if(z) free(z);
if(id) free(id);
MPI_Barrier(comm);
fprintf(stderr,"proc[%u]: done\n",myproc);
return MPI_Finalize();
}
#else
int main(int argc,char *argv){
const int sz=5;
double x[sz],y[sz],z[sz];
long long id[sz];
char name[64];
H5PartFile *file;
int i,t,nt,nds,myproc;
int nfattribs,nsattribs;
file=H5PartOpenFile("parttest.h5",H5PART_WRITE);
if(!file) {
perror("File open failed: exiting!");
exit(0);
}
for(t=0;t<5;t++){
long long step=t;
printf("Writing timestep %u\n",t);
for(i=0;i<sz;i++) {
x[i]=(double)(i+t);
y[i]=0.1 + (double)(i+t);
z[i]=0.2 + (double)(i+t);
id[i]=i;
}
H5PartSetStep(file,t); /* must set the current timestep in file */
H5PartSetNumParticles(file,sz); /* then set number of particles to store */
/* now write different tuples of data into this timestep of the file */
H5PartWriteDataFloat64(file,"x",x);
H5PartWriteDataFloat64(file,"y",y);
H5PartWriteDataFloat64(file,"z",z);
H5PartWriteDataInt64(file,"id",id);
H5PartWriteStepAttrib(file,"Step",H5T_NATIVE_INT64,&step,1);
}
H5PartCloseFile(file);
printf("OK, close file and reopen for reading\n");
file= H5PartOpenFile("parttest.h5",H5PART_READ);
nt=H5PartGetNumSteps(file); /* get number of steps in file */
H5PartSetStep(file,0);
nds=H5PartGetNumDatasets(file); /* get number of datasets in timestep 0 */
puts("\n\n===============================");
for(i=0;i<nds;i++){ /* and print out those names */
H5PartGetDatasetName(file,i,name,64);
printf("\tDataset[%u] name=[%s]\n",
i,name);
}
puts("===============================\n\n");
nfattribs=H5PartGetNumFileAttribs(file);
printf("Number of datasteps in file is %u num file attribs=%d\n",
nt,nfattribs);
for(t=0;t<nt;t++){
int nparticles;
H5PartSetStep(file,t); /* select a timestep */
nparticles=(int)H5PartGetNumParticles(file);
nsattribs=H5PartGetNumStepAttribs(file);
printf("Step[%u] nparticles this step=%u stepattribs=%u\n",
t,nparticles,nsattribs); /* get num particles this step */
if(nsattribs>0){
char attrname[32];
H5PartGetStepAttribInfo(file,0,attrname,32,0,0);
printf("First Attrib name is [%s]\n",attrname);
}
H5PartReadParticleStep(file,t,/* do a mongo read of all data this step */
x,y,z,x,y,z,id);
printf("\tid\t\tx\t\ty\t\tz\n");
puts("\t----------------------------------------------------");
for(i=0;i<sz;i++) {
printf("\t%llu\t%f\t%f\t%f\n\n",id[i],x[i],y[i],z[i]);
}
}
H5PartCloseFile(file);
}
#endif
#endif
+296
View File
@@ -0,0 +1,296 @@
#ifndef _H5Part_H_
#define _H5Part_H_
#include <stdlib.h>
#include <stdarg.h>
#include <hdf5.h>
#ifdef PARALLEL_IO
#include <mpi.h>
#endif
#include "H5PartTypes.h"
#define H5PART_SUCCESS 0
#define H5PART_ERR_NOMEM -12
#define H5PART_ERR_INVAL -22
#define H5PART_ERR_BADFD -77
#define H5PART_ERR_INIT -200
#define H5PART_ERR_NOENTRY -201
#define H5PART_ERR_MPI -201
#define H5PART_ERR_HDF5 -202
#define H5PART_READ 0x01
#define H5PART_WRITE 0x02
#define H5PART_APPEND 0x03
#define H5PART_INT64 ((h5part_int64_t)H5T_NATIVE_INT64)
#define H5PART_FLOAT64 ((h5part_int64_t)H5T_NATIVE_DOUBLE)
#define H5PART_CHAR ((h5part_int64_t)H5T_NATIVE_CHAR)
/*========== File Opening/Closing ===============*/
H5PartFile*
H5PartOpenFile(
const char *filename,
unsigned flags
);
#define H5PartOpenFileSerial(x,y) H5PartOpenFile(x,y)
#ifdef PARALLEL_IO
H5PartFile*
H5PartOpenFileParallel (
const char *filename,
unsigned flags,
MPI_Comm communicator
);
#endif
h5part_int64_t
H5PartCloseFile (
H5PartFile *f
);
/*============== File Writing Functions ==================== */
h5part_int64_t
H5PartSetNumParticles (
H5PartFile *f,
h5part_int64_t nparticles
);
h5part_int64_t
H5PartWriteDataFloat64 (
H5PartFile *f,
char *name,
h5part_float64_t *array
);
h5part_int64_t
H5PartWriteDataInt64 (
H5PartFile *f,
char *name,
h5part_int64_t *array
);
/*================== File Reading Routines =================*/
h5part_int64_t
H5PartSetStep (
H5PartFile *f,
h5part_int64_t step
);
h5part_int64_t
H5PartGetNumSteps (
H5PartFile *f
);
h5part_int64_t
H5PartGetNumDatasets (
H5PartFile *f
);
h5part_int64_t
H5PartGetDatasetName (
H5PartFile *f,
const h5part_int64_t idx,
char *name,
const h5part_int64_t maxlen
);
h5part_int64_t
H5PartGetDatasetInfo (
H5PartFile *f,
const h5part_int64_t idx,
char *name,
const h5part_int64_t maxlen,
h5part_int64_t *type,
h5part_int64_t *nelem);
h5part_int64_t
H5PartGetNumParticles (
H5PartFile *f
);
h5part_int64_t
H5PartSetView (
H5PartFile *f,
h5part_int64_t start,
h5part_int64_t end
);
#define H5PartResetView(f) H5PartSetView(f,-1,-1)
#define H5PartHasView(f) ((f->viewstart<0||f->viewend<0)?0:1)
h5part_int64_t
H5PartGetView (
H5PartFile *f,
h5part_int64_t *start,
h5part_int64_t *end
);
h5part_int64_t
H5PartSetCanonicalView (
H5PartFile *f
);
h5part_int64_t
H5PartReadDataFloat64(
H5PartFile *f,
char *name,
h5part_float64_t *array
);
h5part_int64_t
H5PartReadDataInt64 (
H5PartFile *f,
char *name,
h5part_int64_t *array
);
h5part_int64_t
H5PartReadParticleStep (
H5PartFile *f,
h5part_int64_t step,
h5part_float64_t *x, /* particle positions */
h5part_float64_t *y,
h5part_float64_t *z,
h5part_float64_t *px, /* particle momenta */
h5part_float64_t *py,
h5part_float64_t *pz,
h5part_int64_t *id /* and phase */
);
/**********==============Attributes Interface============***************/
/* currently there is file attributes: Attributes bound to the file
and step attributes which are bound to the current timestep. You
must set the timestep explicitly before writing the attributes (just
as you must do when you write a new dataset. Currently there are no
attributes that are bound to a particular data array, but this could
easily be done if required.
*/
h5part_int64_t
H5PartWriteStepAttrib (
H5PartFile *f,
const char *attrib_name,
const h5part_int64_t attrib_type,
const void *attrib_value,
const h5part_int64_t attrib_nelem
);
h5part_int64_t
H5PartWriteFileAttrib (
H5PartFile *f,
const char *attrib_name,
const h5part_int64_t attrib_type,
const void *attrib_value,
const h5part_int64_t attrib_nelem
);
h5part_int64_t
H5PartWriteFileAttribString (
H5PartFile *f,
const char *name,
const char *attrib
);
h5part_int64_t
H5PartWriteStepAttribString (
H5PartFile *f,
const char *name,
const char *attrib
);
h5part_int64_t
H5PartGetNumStepAttribs ( /* for current filestep */
H5PartFile *f
);
h5part_int64_t
H5PartGetNumFileAttribs (
H5PartFile *f
);
h5part_int64_t
H5PartGetStepAttribInfo (
H5PartFile *f,
const h5part_int64_t attrib_idx,
char *attrib_name,
const h5part_int64_t len_of_attrib_name,
h5part_int64_t *attrib_type,
h5part_int64_t *attrib_nelem
);
h5part_int64_t
H5PartGetFileAttribInfo (
H5PartFile *f,
const h5part_int64_t idx,
char *name,
const h5part_int64_t maxnamelen,
h5part_int64_t *type,
h5part_int64_t *nelem
);
h5part_int64_t
H5PartReadStepAttrib (
H5PartFile *f,
char *name,
void *data
);
h5part_int64_t
H5PartReadAttrib (
H5PartFile *f,
char *name,
void *data
);
h5part_int64_t
H5PartReadFileAttrib (
H5PartFile *f,
char *name,
void *data
);
h5part_int64_t
H5PartSetVerbosityLevel (
unsigned int
);
h5part_int64_t
H5PartSetErrorHandler (
h5part_error_handler handler
);
h5part_int64_t
H5PartGetErrno (
void
);
h5part_error_handler
H5PartGetErrorHandler (
void
);
h5part_int64_t
H5PartDefaultErrorHandler (
const char *funcname,
const h5part_int64_t eno,
const char *fmt,
...
);
h5part_int64_t
H5PartAbortErrorHandler (
const char *funcname,
const h5part_int64_t eno,
const char *fmt,
...
);
#endif
Executable
+11
View File
@@ -0,0 +1,11 @@
#ifndef _H5Part_HH_
#define _H5Part_HH_
extern "C" {
#include "H5PartTypes.h"
#include "H5Part.h"
}
/* Add any C++ specific extensions/implementations/wrappers here */
#endif
+318
View File
@@ -0,0 +1,318 @@
#ifndef __H5PARTERRORS_H
#define __H5PARTERRORS_H
/***************** Error Handling ***************/
#define CHECK_FILEHANDLE( f ) \
if ( _file_is_valid ( f ) != H5PART_SUCCESS ) \
return HANDLE_H5PART_BADFD_ERR;
#define CHECK_WRITABLE_MODE( f ) \
if ( f->mode==H5PART_READ ) \
return (*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_INVAL, \
"Attempting to write to read-only file" );
#define CHECK_TIMEGROUP( f ) \
if ( f->timegroup <= 0 ) \
return (*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_INVAL, \
"Timegroup <= 0.");
/**************** H5Part *********************/
#define HANDLE_H5PART_BADFD_ERR \
(*_err_handler)( \
_H5Part_get_funcname(), \
H5PART_ERR_BADFD, \
"Called with bad filehandle." );
#define HANDLE_H5PART_INIT_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_INIT, \
"Cannot initialize H5Part." );
#define HANDLE_H5PART_NOMEM_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_NOMEM, \
"Out of memory." );
#define HANDLE_H5PART_SETSTEP_ERR( rc, step ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
rc, \
"Cannont set time-step to %lld.", (long long)step );
#define HANDLE_H5PART_FILE_ACCESS_TYPE_ERR( flags ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_INVAL, \
"Invalid file access type \"%d\".", flags);
#define HANDLE_H5PART_STEP_EXISTS_ERR( step ) \
(*_err_handler)( \
_H5Part_get_funcname(), \
H5PART_ERR_INVAL, \
"Step #%lld already exists, step cannot be set to an existing" \
" step in write and append mode", (long long)step );
#define HANDLE_H5PART_SET_VIEW_ERR( rc, start, end ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
rc, \
"Cannot set view to (%d, %d).", start, end );
#define HANDLE_H5PART_GET_NUM_PARTICLES_ERR( rc ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
rc, \
"Cannot get number of particles." );
#define HANDLE_H5PART_NOENTRY_ERR( group_name, type, idx ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_NOENTRY, \
"No entry with index %lld and type %d in group %s!", \
(long long)idx, type, group_name );
/**************** HDF5 *********************/
/* H5A: Attribute */
#define HANDLE_H5A_CLOSE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot terminate access to attribute." );
#define HANDLE_H5A_CREATE_ERR( s ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot create attribute \"%s\".", s );
#define HANDLE_H5A_GET_NAME_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot get attribute name." );
#define HANDLE_H5A_GET_NUM_ATTRS_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot get number of attributes." );
#define HANDLE_H5A_GET_SPACE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot get a copy of dataspace for attribute." );
#define HANDLE_H5A_GET_TYPE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot get attribute datatype." );
#define HANDLE_H5A_OPEN_IDX_ERR( n ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot open attribute specified by index \"%lld\".", \
(long long)n );
#define HANDLE_H5A_OPEN_NAME_ERR( s ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot open attribute specified by name \"%s\".", s );
#define HANDLE_H5A_READ_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot read attribute" );
#define HANDLE_H5A_WRITE_ERR( s ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot write attribute \"%s\".", s );
/* H5D: Dataset */
#define HANDLE_H5D_CLOSE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Close of dataset failed." );
#define HANDLE_H5D_CREATE_ERR( s, n ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot create dataset for name \"%s\", step \"%lld\".", \
s, (long long) n );
#define HANDLE_H5D_GET_SPACE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot get dataspace identifier.");
#define HANDLE_H5D_GET_TYPE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot determine dataset type.");
#define HANDLE_H5D_OPEN_ERR( s ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot open dataset \"%s\".", s );
#define HANDLE_H5D_READ_ERR( s, n ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Read from dataset \"%s\" failed, step \"%lld\".", \
s, (long long) n );
#define HANDLE_H5D_WRITE_ERR( s, n ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Write to dataset \"%s\" failed, step \"%lld\".", \
s, (long long)n );
/* H5F: file */
#define HANDLE_H5F_CLOSE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot terminate access to file." );
#define HANDLE_H5F_OPEN_ERR( filename, flags ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot open file \"%s\" with mode \"%d\"", filename, flags );
/* H5G: group */
#define HANDLE_H5G_CLOSE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot terminate access to datagroup." );
#define HANDLE_H5G_CREATE_ERR( s ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot create datagroup \"%s\".", s );
#define HANDLE_H5G_GET_OBJINFO_ERR( s ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot get information about object \"%s\".", s );
#define HANDLE_H5G_OPEN_ERR( s ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot open group \"%s\".", s );
/* H5P: property */
#define HANDLE_H5P_CLOSE_ERR( s ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot terminate access to property list \"%s\".", s );
#define HANDLE_H5P_CREATE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot create property list." );
#define HANDLE_H5P_SET_DXPL_MPIO_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"MPI: Cannot set data transfer mode." );
#define HANDLE_H5P_SET_FAPL_MPIO_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot store IO communicator information to the " \
"file access property list.");
/* H5S: dataspace */
#define HANDLE_H5S_CREATE_SIMPLE_ERR( n ) \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot create dataspace with len \"%lld\".", (long long) n );
#define HANDLE_H5S_CLOSE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot terminate access to dataspace." );
#define HANDLE_H5S_GET_SELECT_NPOINTS_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot determine the number of elements in dataspace selection." );
#define HANDLE_H5S_GET_SIMPLE_EXTENT_NPOINTS_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot determine number of elements in dataspace." );
#define HANDLE_H5S_SELECT_HYPERSLAB_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot set select hyperslap region or add the specified region" );
/* H5T: type */
#define HANDLE_H5T_CLOSE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_HDF5, \
"Cannot release datatype." );
/* MPI */
#define HANDLE_MPI_ALLGATHER_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_MPI, \
"Cannot gather data." );
#define HANDLE_MPI_COMM_SIZE_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_MPI, \
"Cannot get number of processes in my group." );
#define HANDLE_MPI_COMM_RANK_ERR \
(*_err_handler) ( \
_H5Part_get_funcname(), \
H5PART_ERR_MPI, \
"Cannot get rank of the calling process in my group." );
#endif
Executable
+561
View File
@@ -0,0 +1,561 @@
#include "H5Part.h"
#include "Underscore.h"
#include <hdf5.h>
/*
********* Perhaps call this pfile **********
Determine underscores using perl and then send through one stage of preprocessing
to get the F77NAME fixed up. Otherwise, must include correct flag each time.
Or just don't declare F77NAME in the header (only in source as symbols).
All pointers are cast to haddr_t (a unint64_t) within the C/C++ code
In fortran, these pointers (handles) are carried as INTEGER*8
*/
#ifdef F77_SINGLE_UNDERSCORE
#define F77NAME(a,b,c) a
#elif defined(F77_NO_UNDERSCORE)
#define F77NAME(a,b,c) b
#elif defined(F77_CRAY_UNDERSCORE)
#define F77NAME(a,b,c) c
#else
#error Error, no way to determine how to construct fortran bindings
#endif
#if 0
#define f_h5pt_openr F77NAME(h5prt_openr_,h5prt_openr,H5PRT_OPENR)
#define f_h5pt_openw F77NAME(h5prt_openw_,h5prt_openw,H5PRT_OPENW)
#define f_h5pt_close F77NAME(h5prt_close_,h5prt_close,H5PRT_CLOSE)
#define f_h5pt_npoints F77NAME(h5prt_npoints_,h5prt_npoints,H5PRT_NPOINTS)
#define f_h5pt_ndata F77NAME(h5prt_ndata_,h5prt_ndata,H5PRT_NDATA)
#define f_h5pt_nstep F77NAME(h5prt_nstep_,h5prt_nstep,H5PRT_NSTEP)
#define f_h5pt_readstep F77NAME(h5prt_readstep_,h5prt_readstep,H5PRT_READSTEP)
#define f_h5pt_step F77NAME(h5prt_step_,h5prt_step,H5PRT_STEP)
#define f_h5pt_wreal8 F77NAME(h5prt_wreal8_,h5prt_wreal8,H5PRT_WREAL8)
#define f_h5pt_wint8 F77NAME(h5prt_wint8_,h5prt_wint8,H5PRT_WINT8)
#endif
/* open/close interface */
#define f_h5pt_openr F77NAME(h5pt_openr_,h5pt_openr,H5PT_OPENR) /* func returns INT8 */
#define f_h5pt_openw F77NAME(h5pt_openw_,h5pt_openw,H5PT_OPENW) /* func returns INT8 */
#define f_h5pt_openr_par F77NAME(h5pt_openr_par_,h5pt_openr_par,H5PT_OPENR_PAR) /* func returns INT8 */
#define f_h5pt_openw_par F77NAME(h5pt_openw_par_,h5pt_openw_par,H5PT_OPENW_PAR) /* func returns INT8 */
#define f_h5pt_close F77NAME(h5pt_close_,h5pt_close,H5PT_CLOSE)
/* writing interface */
#define f_h5pt_setnpoints F77NAME(h5pt_setnpoints_,h5pt_setnpoints,H5PT_SETNPOINTS)
#define f_h5pt_setstep F77NAME(h5pt_setstep_,h5pt_setstep,H5PT_SETSTEP)
#define f_h5pt_writedata_r8 F77NAME(h5pt_writedata_r8_,h5pt_writedata_r8,H5PT_WRITEDATA_R8)
#define f_h5pt_writedata_i8 F77NAME(h5pt_writedata_i8_,h5pt_writedata_i8,H5PT_WRITEDATA_I8)
/* Reading interface (define dataset, step, particles, attributes) */
#define f_h5pt_getnsteps F77NAME(h5pt_getnsteps_,h5pt_getnsteps,H5PT_GETNSTEPS)
#define f_h5pt_getndatasets F77NAME(h5pt_getndatasets_,h5pt_getndatasets,H5PT_GETNDATASETS)
#define f_h5pt_getnpoints F77NAME(h5pt_getnpoints_,h5pt_getnpoints,H5PT_GETNPOINTS)
#define f_h5pt_getdatasetname F77NAME(h5pt_getdatasetname_,h5pt_getdatasetname,H5PT_GETDATASETNAME)
#define f_h5pt_getnumpoints F77NAME(h5pt_getnumpoints_,h5pt_getnumpoints,H5PT_GETNUMPOINTS)
/* Views and parallelism */
#define f_h5pt_setview F77NAME(h5pt_setview_,h5pt_setview,H5PT_SETVIEW)
#define f_h5pt_resetview F77NAME(h5pt_resetview_,h5pt_resetview,H5PT_RESETVIEW)
#define f_h5pt_hasview F77NAME(h5pt_hasview_,h5pt_hasview,H5PT_HASVIEW)
#define f_h5pt_getview F77NAME(h5pt_getview_,h5pt_getview,H5PT_GETVIEW)
/* Reading data */
#define f_h5pt_readdata_r8 F77NAME(h5pt_readdata_r8_,h5pt_readdata_r8,H5PT_READDATA_R8)
#define f_h5pt_readdata_i8 F77NAME(h5pt_readdata_i8_,h5pt_readdata_i8,H5PT_READDATA_I8)
#define f_h5pt_readdata F77NAME(h5pt_readdata_,h5pt_readdata,H5PT_READDATA)
/* Attributes */
/* writing */
#define f_h5pt_writefileattrib_r8 F77NAME(h5pt_writefileattrib_r8_,h5pt_writefileattrib_r8,H5PT_WRITEFILEATTRIB_R8)
#define f_h5pt_writefileattrib_i8 F77NAME(h5pt_writefileattrib_i8_,h5pt_writefileattrib_i8,H5PT_WRITEFILEATTRIB_I8)
#define f_h5pt_writefileattrib_string F77NAME(h5pt_writefileattrib_string_,h5pt_writefileattrib_string,H5PT_writefileattrib_string)
#define f_h5pt_writestepattrib_r8 F77NAME(h5pt_writestepattrib_r8_,h5pt_writestepattrib_r8,H5PT_WRITESTEPATTRIB_R8)
#define f_h5pt_writestepattrib_i8 F77NAME(h5pt_writestepattrib_i8_,h5pt_writestepattrib_i8,H5PT_WRITESTEPATTRIB_I8)
#define f_h5pt_writestepattrib_string F77NAME(h5pt_writestepattrib_string_,h5pt_writestepattrib_string,H5PT_WRITESTEPATTRIB_STRING)
/* reading */
#define f_h5pt_getnstepattribs F77NAME(h5pt_getnstepattribs_,h5pt_getnstepattribs,H5PT_GETNSTEPATTRIBS)
#define f_h5pt_getnfileattribs F77NAME(h5pt_getnfileattribs_,h5pt_getnfileattribs,H5PT_GETNFILEATTRIBS)
#define f_h5pt_getstepattribinfo F77NAME(h5pt_getstepattribinfo_,h5pt_getstepattribinfo,H5PT_GETSTEPATTRIBINFO)
#define f_h5pt_getfileattribinfo F77NAME(h5pt_getfileattribinfo_,h5pt_getfileattribinfo,H5PT_GETFILEATTRIBINFO)
#define f_h5pt_readstepattrib F77NAME(h5pt_readstepattrib_,h5pt_readstepattrib,H5PT_READSTEPATTRIB)
#define f_h5pt_readfileattrib F77NAME(h5pt_readfileattrib_,h5pt_readfileattrib,H5PT_READFILEATTRIB)
/* open/close interface */
haddr_t
f_h5pt_openr (
char *file,
int flen
) { /* func returns INT8 */
haddr_t fh;
H5PartFile* f;
char *newname = (char*)malloc(flen+1); /* be safe? */
strncpy(newname,file,flen);
newname[flen]='\0';
f = (H5PartOpenFile(newname,H5PART_READ));
/* printf("openr file=[%s] flen=%u haddr=%u\n",file,flen,f); */
fh = (haddr_t)f;
/* printf("FileHandle=%llu\n",fh); */
return fh;
}
haddr_t
f_h5pt_openw (
char *file,
int flen) { /* func returns INT8 */
haddr_t fh;
H5PartFile* f;
char *newname = (char*)malloc(flen+1); /* be safe? */
strncpy(newname,file,flen);
newname[flen]='\0';
f = (H5PartOpenFile(newname,H5PART_WRITE));
/* printf("openr file=[%s] flen=%u haddr=%u\n",file,flen,f); */
fh = (haddr_t)f;
/* printf("FileHandle=%llu\n",fh); */
return fh;
}
#ifdef PARALLEL_IO
haddr_t
f_h5pt_openr_par (
char *file,
MPI_Comm *c,
int flen ) { /* func returns INT8 */
haddr_t fh;
H5PartFile* f;
char *newname = (char*)malloc(flen+1); /* be safe? */
strncpy(newname,file,flen);
newname[flen]='\0';
f = H5PartOpenFileParallel(newname,H5PART_READ,*((MPI_Comm*)c));
/* printf("openr file=[%s] flen=%u haddr=%u\n",file,flen,f); */
fh = (haddr_t)f;
/* printf("FileHandle=%llu\n",fh); */
return fh;
}
haddr_t
f_h5pt_openw_par (
char *file,
MPI_Comm *c,
int flen ) { /* func returns INT8 */
haddr_t fh;
H5PartFile* f;
char *newname = (char*)malloc(flen+1); /* be safe? */
strncpy(newname,file,flen);
newname[flen]='\0';
f = H5PartOpenFileParallel(newname,H5PART_WRITE,*((MPI_Comm*)c));
/* printf("openr file=[%s] flen=%u haddr=%u\n",file,flen,f); */
fh = (haddr_t)f;
/* printf("FileHandle=%llu\n",fh); */
return fh;
}
#endif
h5part_int64_t
f_h5pt_close (
haddr_t *file
) {
return H5PartCloseFile((H5PartFile*)*file);
}
/*==============Writing and Setting Dataset info========*/
#if 0
h5part_int64_t
f_h5pt_readstep (
haddr_t *file,
h5part_int64_t *step,
h5part_float64_t *x,
h5part_float64_t *y,
h5part_float64_t *z,
h5part_float64_t *px,
h5part_float64_t *py,
h5part_float64_t *pz,
h5part_int64_t *id
) {
return H5PartReadParticleStep((H5PartFile*)*file,(*step)-1,x,y,z,px,py,pz,id);
}
#endif
h5part_int64_t
f_h5pt_setnpoints (
haddr_t *file,
h5part_int64_t *np
) {
return H5PartSetNumParticles((H5PartFile*)*file,*np);
}
h5part_int64_t
f_h5pt_setstep (
haddr_t *file,
h5part_int64_t *step ) {
return H5PartSetStep((H5PartFile*)*file,(*step)-1);
}
h5part_int64_t
f_h5pt_writedata_r8 (
haddr_t *file,
char *name,
h5part_float64_t *data,
int flen ) {
h5part_int64_t rc;
char *newname = (char*)malloc(flen+1); /* be safe? */
strncpy(newname,name,flen);
newname[flen]='\0';
rc = H5PartWriteDataFloat64((H5PartFile*)*file,newname, data);
free(newname);
return rc;
}
h5part_int64_t
f_h5pt_writedata_i8 (
haddr_t *file,
char *name,
h5part_int64_t *data,
int flen ) {
h5part_int64_t rc;
char *newname = (char*)malloc(flen+1); /* be safe? */
strncpy(newname,name,flen);
newname[flen]='\0';
rc = H5PartWriteDataInt64((H5PartFile*)*file,newname,data);
free(newname);
return rc;
}
/*==============Reading Data Characteristics============*/
h5part_int64_t
f_h5pt_getnsteps (
haddr_t *file
) {
/* printf("nstep Haddr=%llu\n",file); */
return H5PartGetNumSteps((H5PartFile*)*file);
}
h5part_int64_t
f_h5pt_getndatasets (
haddr_t *file
) {
/* printf("ndata Haddr=%llu\n",file); */
return H5PartGetNumDatasets((H5PartFile*)*file);
}
h5part_int64_t
f_h5pt_getnpoints (
haddr_t *file
) {
/* printf("nprt Haddr=%llu\n",file); */
return H5PartGetNumParticles((H5PartFile*)*file);
}
/* probably should get index from name */
h5part_int64_t
f_h5pt_getdatasetname (
haddr_t *file,
h5part_int64_t *index,
char *name,
int namelen){
return H5PartGetDatasetName((H5PartFile *)*file,*index,name,namelen);
}
h5part_int64_t
f_h5pt_getnumpoints (
haddr_t *file) {
return H5PartGetNumParticles((H5PartFile*)*file);
}
/*=============Setting and getting views================*/
h5part_int64_t
f_h5pt_setview (
haddr_t *file,
h5part_int64_t *start,
h5part_int64_t *end ) {
return H5PartSetView((H5PartFile*)*file,*start,*end);
}
h5part_int64_t
f_h5pt_resetview (
haddr_t *file
) {
return H5PartResetView((H5PartFile*)*file);
}
h5part_int64_t
f_h5pt_hasview (
haddr_t *file
) {
return H5PartHasView(((H5PartFile*)*file));
}
h5part_int64_t
f_h5pt_getview (
haddr_t *file,
h5part_int64_t *start,
h5part_int64_t *end
) {
return H5PartGetView((H5PartFile*)*file, start, end);
}
/*==================Reading data ============*/
h5part_int64_t
f_h5pt_readdata_r8 (
haddr_t *file,
char *name,
h5part_float64_t *array,
int namelen
) {
h5part_int64_t rc;
char *newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
rc = H5PartReadDataFloat64((H5PartFile*)*file,newname, array);
free(newname);
return rc;
}
h5part_int64_t
f_h5pt_readdata_i8 (
haddr_t *file,
char *name,
h5part_int64_t *array,
int namelen ) {
h5part_int64_t rc;
char *newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
rc = H5PartReadDataInt64((H5PartFile*)*file,newname, array);
free(newname);
return rc;
}
/*=================== Attributes ================*/
/* Attributes */
/* writing */
h5part_int64_t
f_h5pt_writefileattrib_r8 (
haddr_t *f,
char *name,
void *attrib,
h5part_int64_t *nelem,
int namelen ) {
h5part_int64_t rc;
char *newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
rc = H5PartWriteFileAttrib((H5PartFile *)*f,newname,
H5T_NATIVE_DOUBLE,attrib,*nelem);
free(newname);
return rc;
}
h5part_int64_t
f_h5pt_writefileattrib_i8 (
haddr_t *f,
char *name,
void *attrib,
h5part_int64_t *nelem,
int namelen
) {
h5part_int64_t rc;
char *newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
rc = H5PartWriteFileAttrib((H5PartFile *)*f,newname,
H5T_NATIVE_INT64,attrib,*nelem);
free(newname);
return rc;
}
h5part_int64_t
f_h5pt_writefileattrib_string (
haddr_t *f,
char *name,
char *attrib,
int namelen,
int attriblen
) {
h5part_int64_t rc;
char *newattrib;
char *newname;
newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
newattrib = (char*)malloc(attriblen+1); /* be safe? */
strncpy(newattrib,attrib,attriblen);
newattrib[attriblen]='\0';
rc = H5PartWriteFileAttribString((H5PartFile *)*f,newname,newattrib);
free(newname);
free(newattrib);
return rc;
}
h5part_int64_t
f_h5pt_writestepattrib_r8 (
haddr_t *f,
char *name,
void *attrib,
h5part_int64_t *nelem,
int namelen){
h5part_int64_t rc;
char *newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
rc = H5PartWriteStepAttrib((H5PartFile *)*f,newname,
H5T_NATIVE_DOUBLE,attrib,*nelem);
free(newname);
return rc;
}
h5part_int64_t
f_h5pt_writestepattrib_i8 (
haddr_t *f,
char *name,
void *attrib,
h5part_int64_t *nelem,
int namelen
) {
h5part_int64_t rc;
char *newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
rc = H5PartWriteStepAttrib((H5PartFile *)*f,newname,
H5T_NATIVE_INT64,attrib,*nelem);
free(newname);
return rc;
}
h5part_int64_t
f_h5pt_writestepattrib_string (
haddr_t *f,
char *name,
char *attrib,
int namelen,
int attriblen ) {
h5part_int64_t rc;
char *newattrib;
char *newname;
newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
newattrib = (char*)malloc(attriblen+1); /* be safe? */
strncpy(newattrib,attrib,attriblen);
newattrib[attriblen]='\0';
rc = H5PartWriteStepAttribString((H5PartFile *)*f,newname,newattrib);
free(newname);
free(newattrib);
return rc;
}
/* reading attributes ************************* */
h5part_int64_t
f_h5pt_getnstepattribs (
haddr_t *f
) {
return H5PartGetNumStepAttribs((H5PartFile*)*f);
}
h5part_int64_t
f_h5pt_getnfileattribs (
haddr_t *f
) {
return H5PartGetNumFileAttribs((H5PartFile*)*f);
}
h5part_int64_t
f_h5pt_getstepattribinfo (
haddr_t *f,
h5part_int64_t *idx,
char *name,
h5part_int64_t *nelem,
int maxnamelen
) {
hid_t type;
return H5PartGetStepAttribInfo((H5PartFile*)*f,*idx,name,maxnamelen,&type,nelem);
}
h5part_int64_t
f_h5pt_getfileattribinfo (
haddr_t *f,
h5part_int64_t *idx,
char *name,
h5part_int64_t *nelem,
int maxnamelen ) {
hid_t type;
return H5PartGetFileAttribInfo((H5PartFile*)*f,*idx,name,maxnamelen,&type,nelem);
}
h5part_int64_t
f_h5pt_readstepattrib (
haddr_t *f,
char *name,
void *data,
int namelen
) {
h5part_int64_t rc;
char *newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
rc = H5PartReadStepAttrib((H5PartFile*)*f,newname,data);
free( newname );
return rc;
}
h5part_int64_t
f_h5pt_readfileattrib (
haddr_t *f,
char *name,
void *data,
int namelen
) {
int rc;
char *newname = (char*)malloc(namelen+1); /* be safe? */
strncpy(newname,name,namelen);
newname[namelen]='\0';
rc = H5PartReadFileAttrib((H5PartFile*)*f,newname,data);
free( newname );
return rc;
}
+208
View File
@@ -0,0 +1,208 @@
! Declaration of subroutines for Fortran Bindings
! open/close interface
INTERFACE
INTEGER*8 FUNCTION h5pt_openr ( filename )
CHARACTER(LEN=*), INTENT(IN) :: filename ! the filename to open for reading
END FUNCTION
INTEGER*8 FUNCTION h5pt_openw ( filename )
CHARACTER(LEN=*), INTENT(IN) :: filename ! the filename to open for writing
END FUNCTION
INTEGER*8 FUNCTION h5pt_openr_par ( filename, mpi_communicator )
CHARACTER(LEN=*), INTENT(IN) :: filename ! the filename to open for writing
INTEGER, INTENT(IN) :: mpi_communicator ! the MPI_Communicator used by the program
END FUNCTION
INTEGER*8 FUNCTION h5pt_openw_par ( filename, mpi_communicator )
CHARACTER(LEN=*), INTENT(IN) :: filename ! the filename to open for writing
INTEGER, INTENT(IN) :: mpi_communicator ! the MPI_Communicator used by the program
END FUNCTION
INTEGER*8 FUNCTION h5pt_close ( filehandle )
INTEGER*8, INTENT(IN) :: filehandle ! close this open filehandle
END FUNCTION
!==============Writing and Setting Dataset info========
INTEGER*8 FUNCTION h5pt_setnpoints ( filehandle, npoints )
INTEGER*8, INTENT(IN) :: filehandle
INTEGER*8, INTENT(IN) :: npoints ! The number of particles on *this* processor
END FUNCTION
INTEGER*8 FUNCTION h5pt_setstep (filehandle,step)
INTEGER*8, INTENT(IN) :: filehandle
INTEGER*8, INTENT(IN) :: step ! Set the current timestep in the file to this
END FUNCTION
INTEGER*8 FUNCTION h5pt_writedata_r8 ( filehandle, name, data )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name ! The name of the data we are writing
REAL*8, INTENT(IN) :: data(:) ! The dataarray to write. The number of
! elements is presumably set earlier with
! h5pt_setnpoints(f,npoints)
END FUNCTION
INTEGER*8 FUNCTION h5pt_writedata_i8 ( filehandle, name, data )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name ! The name of the data we are writing
INTEGER*8, INTENT(IN) :: data(:)
END FUNCTION
!==============Reading Data Characteristics============
INTEGER*8 FUNCTION h5pt_getnsteps (filehandle)
INTEGER*8, INTENT(IN) :: filehandle
END FUNCTION
INTEGER*8 FUNCTION h5pt_getndatasets (filehandle)
INTEGER*8, INTENT(IN) :: filehandle
END FUNCTION
! returns total number of points in this timestep
! If a "view" has been set using h5pt_setview()
! then it returns the number of points that are
! in the current view.
INTEGER*8 FUNCTION h5pt_getnpoints (filehandle)
INTEGER*8, INTENT(IN) :: filehandle
END FUNCTION
INTEGER*8 FUNCTION h5pt_getdatasetname (filehandle,index,name)
INTEGER*8, INTENT(IN) :: filehandle
INTEGER*8, INTENT(IN) :: index ! Index for a given dataset name
CHARACTER(LEN=*), INTENT(OUT) :: name ! returns the name of the dataset at that index
END FUNCTION
!=============Setting and getting views================
INTEGER*8 FUNCTION h5pt_setview (filehandle,start,end)
INTEGER*8, INTENT(IN) :: filehandle
INTEGER*8, INTENT(IN) :: start ! offset of the first particle in the view
INTEGER*8, INTENT(IN) :: end ! offset of the first particle after the end of the view
END FUNCTION
INTEGER*8 FUNCTION h5pt_resetview (filehandle)
INTEGER*8, INTENT(IN) :: filehandle ! reset the view on this filehandle to default
END FUNCTION
INTEGER*8 FUNCTION h5pt_hasview (filehandle)
INTEGER*8, INTENT(IN) :: filehandle
END FUNCTION
INTEGER*8 FUNCTION h5pt_getview (filehandle,start,end)
INTEGER*8, INTENT(IN) :: filehandle
INTEGER*8, INTENT(OUT) :: start ! offset of first particle in the view
INTEGER*8, INTENT(OUT) :: end ! offset of first particle beyond the current view
END FUNCTION
!==============Reading Data=========================
INTEGER*8 FUNCTION h5pt_readdata_r8 (filehandle,name,data)
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name ! The name of the data we are writing
REAL*8, INTENT(OUT) :: data(:) ! The dataarray to read. Number of points
! read is either the number within the view set
! by h5pt_setview() or the default (the total
! number of particles in the file.
END FUNCTION
INTEGER*8 FUNCTION h5pt_readdata_i8 (filehandle,name,data)
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: name ! The name of the data we are writing
INTEGER*8, INTENT(OUT) :: data(:) ! The dataarray to read. Number of points
! read is either the number within the view set
! by h5pt_setview() or the default (the total
! number of particles in the file.
END FUNCTION
!=================== Attributes ================
INTEGER*8 FUNCTION h5pt_writefileattrib_r8 (filehandle,attrib_name,attrib_value,attrib_nelem)
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! The name of the attribute
REAL*8, INTENT(IN) :: attrib_value(:) ! The array of data to write into the attribute
INTEGER*8, INTENT(IN) :: attrib_nelem ! Number of elements in the attrib array
END FUNCTION
INTEGER*8 FUNCTION h5pt_writefileattrib_i8 (filehandle,attrib_name,attrib_value,attrib_nelem)
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! The name of the attribute
INTEGER*8, INTENT(IN) :: attrib_value(:) ! The array of data to write into the attribute
INTEGER*8, INTENT(IN) :: attrib_nelem ! Number of elements in the attrib array
END FUNCTION
INTEGER*8 FUNCTION h5pt_writefileattrib_string (filehandle,attrib_name,attrib_value)
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! The name of the attribute
CHARACTER(LEN=*), INTENT(IN) :: attrib_value ! The array of data to write into the attribute
END FUNCTION
INTEGER*8 FUNCTION h5pt_writestepattrib_r8 (filehandle,attrib_name,attrib_value,attrib_nelem)
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! The name of the attribute
REAL*8, INTENT(IN) :: attrib_value(:) ! The array of data to write into the attribute
INTEGER*8, INTENT(IN) :: attrib_nelem ! Number of elements in the attrib array
END FUNCTION
INTEGER*8 FUNCTION h5pt_writestepattrib_i8 (filehandle,attrib_name,attrib_value,attrib_nelem)
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! The name of the attribute
INTEGER*8, INTENT(IN) :: attrib_value(:) ! The array of data to write into the attribute
INTEGER*8, INTENT(IN) :: attrib_nelem ! Number of elements in the attrib array
END FUNCTION
INTEGER*8 FUNCTION h5pt_writestepattrib_string (filehandle,attrib_name,attrib_value)
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! The name of the attribute
CHARACTER(LEN=*), INTENT(IN) :: attrib_value ! The array of data to write into the attribute
END FUNCTION
INTEGER*8 FUNCTION h5pt_getnstepattribs (filehandle)
INTEGER*8, INTENT(IN) :: filehandle
END FUNCTION
INTEGER*8 FUNCTION h5pt_getnfileattribs (filehandle)
INTEGER*8, INTENT(IN) :: filehandle
END FUNCTION
INTEGER*8 FUNCTION h5pt_getstepattribinfo (filehandle,idx,attrib_name,attrib_nelem)
INTEGER*8, INTENT(IN) :: filehandle
INTEGER*8, INTENT(IN) :: idx ! index of the attribute being queried
CHARACTER(LEN=*), INTENT(OUT) :: attrib_name ! The name of the attribute
INTEGER*8, INTENT(OUT) :: attrib_nelem ! Number of elements in the attrib array
END FUNCTION
INTEGER*8 FUNCTION h5pt_getfileattribinfo (filehandle,idx,attrib_name,attrib_nelem)
INTEGER*8, INTENT(IN) :: filehandle
INTEGER*8, INTENT(IN) :: idx ! index of the attribute being queried
CHARACTER(LEN=*), INTENT(OUT) :: attrib_name ! The name of the attribute
INTEGER*8, INTENT(OUT) :: attrib_nelem ! Number of elements in the attrib array
END FUNCTION
INTEGER*8 FUNCTION h5pt_readstepattrib_i8 ( filehandle, attrib_name, attrib_value )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! name of the attribute to read
INTEGER*8, INTENT(OUT) :: attrib_value(:) ! the attribute data will be read into this array
END FUNCTION
INTEGER*8 FUNCTION h5pt_readstepattrib_r8 ( filehandle, attrib_name, attrib_value )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! name of the attribute to read
REAL*8, INTENT(OUT) :: attrib_value(:) ! the attribute data will be read into this array
END FUNCTION
INTEGER*8 FUNCTION h5pt_readfileattrib_i8 (filehandle, attrib_name, attrib_value )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! name of the attribute to read
INTEGER*8, INTENT(OUT) :: attrib_value(:) ! the attribute data will be read into this array
END FUNCTION
INTEGER*8 FUNCTION h5pt_readfileattrib_r8 (filehandle, attrib_name, attrib_value )
INTEGER*8, INTENT(IN) :: filehandle
CHARACTER(LEN=*), INTENT(IN) :: attrib_name ! name of the attribute to read
REAL*8, INTENT(OUT) :: attrib_value(:) ! the attribute data will be read into this array
END FUNCTION
END INTERFACE
+163
View File
@@ -0,0 +1,163 @@
#ifndef __H5PARTPRIVATE_H
#define __H5PARTPRIVATE_H
/*!
The functions declared here are not part of the API, but may be used
in extensions like H5Block. We name these functions "private".
\note
Private function may change there interface even in stable versions.
Don't use them in applications!
*/
struct _iter_op_data {
int stop_idx;
int count;
int type;
char *name;
size_t len;
char *pattern;
};
herr_t
_H5Part_iteration_operator (
hid_t group_id,
const char *member_name,
void *operator_data
);
void
_H5Part_set_funcname (
char * const fname
);
const char *
_H5Part_get_funcname (
void
);
#define SET_FNAME( fname ) _H5Part_set_funcname( fname );
hid_t
_H5Part_normalize_h5_type (
hid_t type
);
h5part_int64_t
_H5Part_read_attrib (
hid_t id,
const char *attrib_name,
void *attrib_value
);
h5part_int64_t
_H5Part_write_attrib (
hid_t id,
const char *attrib_name,
const hid_t attrib_type,
const void *attrib_value,
const hsize_t attrib_nelem
);
h5part_int64_t
_H5Part_get_attrib_info (
hid_t id,
const h5part_int64_t attrib_idx,
char *attrib_name,
const h5part_int64_t len_attrib_name,
h5part_int64_t *attrib_type,
h5part_int64_t *attrib_nelem
);
h5part_int64_t
_H5Part_get_num_objects (
hid_t group_id,
const char *group_name,
const hid_t type
);
h5part_int64_t
_H5Part_get_num_objects_matching_pattern (
hid_t group_id,
const char *group_name,
const hid_t type,
char * const pattern
);
h5part_int64_t
_H5Part_get_object_name (
hid_t group_id,
const char *group_name,
const hid_t type,
const h5part_int64_t idx,
char *obj_name,
const h5part_int64_t len_obj_name
);
void
_H5Part_vprint_error (
const char *fmt,
va_list ap
);
void
_H5Part_print_error (
const char *fmt,
... )
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
;
void
_H5Part_vprint_warn (
const char *fmt,
va_list ap
);
void
_H5Part_print_warn (
const char *fmt,
...
)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
;
void
_H5Part_vprint_info (
const char *fmt,
va_list ap
);
void
_H5Part_print_info (
const char *fmt,
...
)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
;
void
_H5Part_vprint_debug (
const char *fmt,
va_list ap
);
void
_H5Part_print_debug (
const char *fmt,
...
)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
;
#endif
+81
View File
@@ -0,0 +1,81 @@
/*
System dependend definitions
*/
#ifndef _H5PARTTYPES_H_
#define _H5PARTTYPES_H_
typedef int64_t h5part_int64_t;
typedef double h5part_float64_t;
typedef h5part_int64_t (*h5part_error_handler)( const char*, const h5part_int64_t, const char*,...)
#ifdef __GNUC__
__attribute__ ((format (printf, 3, 4)))
#endif
;
struct H5BlockFile;
/**
\struct H5PartFile
This is an essentially opaque datastructure that
acts as the filehandle for all practical purposes.
It is created by H5PartOpenFile<xx>() and destroyed by
H5PartCloseFile().
*/
struct H5PartFile {
hid_t file;
h5part_int64_t timestep;
hsize_t nparticles;
hid_t timegroup;
hid_t shape;
unsigned mode;
hid_t xfer_prop;
hid_t create_prop;
hid_t access_prop;
hid_t diskshape;
hid_t memshape; /* for parallel I/O (this is on-disk) H5S_ALL
if serial I/O */
h5part_int64_t viewstart; /* -1 if no view is available: A "view" looks */
h5part_int64_t viewend; /* at a subset of the data. */
/**
the number of particles in each processor.
With respect to the "VIEW", these numbers
can be regarded as non-overlapping subsections
of the particle array stored in the file.
So they can be used to compute the offset of
the view for each processor
*/
h5part_int64_t *pnparticles;
/**
Number of processors
*/
int nprocs;
/**
The index of the processor this process is running on.
*/
int myproc;
#ifdef PARALLEL_IO
/**
MPI comnunicator
*/
MPI_Comm comm;
#endif
struct H5BlockStruct *block;
h5part_int64_t (*close_block)(struct H5PartFile *f);
};
typedef struct H5PartFile H5PartFile;
#ifdef IPL_XT3
# define SEEK_END 2
#endif
#endif
+303
View File
@@ -0,0 +1,303 @@
#ifndef _H5UNITS_H_
#define _H5UNITS_H_
/*!
Defines Units and conversion factors
\note Derived from GEANT 4 header files G4SIunits.hh
The basic units are those of the International System:
meter
second
kilogram
ampere
degree kelvin
the amount of substance (mole)
luminous intensity (candela)
radian
steradian
We also define some accelerator specific units
MeV
beta
Idea of usage: For each attribute (for example x) we have two additional
informations, namely the attributes unit and the attributes conversion factor,
which is the factor to convert the attributes unit into SI units.
Example:
We have a lenght attribute x and the values in x are stored in mm we then would
have to add the following information to the attribute x: METER, 1000
Using the following prototypes
H5PartWriteUnit (H5PartFile *f, char *name, const int unit );
H5PartWriteUnitConversionFac (H5PartFile *f, char *name, const double fac);
one would write
H5PartWriteUnit (fp,"x", METER );
H5PartWriteUnitConversionFac (fp, "x", 1000);
Note: in case of BETA and GAMMA one has the know the particles mass
not sure if that is the best solution
Author: Andreas Adelmann (PSI)
Date: 15.8.2006
*/
// Define SI units
// \note enum type would be much better, have to check f77 implications
#define METER 1
#define SECOND 2
#define KILOGRAM 3
#define AMPERE 4
#define DEGREE_KELVIN 5
#define MOLE 6
#define CANDELA 7
#define RADIAN 8
#define STERADIAN 9
// Define some accelerator specific units
#define MEV 10
#define BETA 11
#define GAMMA 12
//
// Length [L]
//
static const double meter = 1.;
static const double meter2 = meter*meter;
static const double meter3 = meter*meter*meter;
static const double millimeter = 0.001*meter;
static const double millimeter2 = millimeter*millimeter;
static const double millimeter3 = millimeter*millimeter*millimeter;
static const double centimeter = 10.*millimeter;
static const double centimeter2 = centimeter*centimeter;
static const double centimeter3 = centimeter*centimeter*centimeter;
static const double kilometer = 1000.*meter;
static const double kilometer2 = kilometer*kilometer;
static const double kilometer3 = kilometer*kilometer*kilometer;
static const double parsec = 3.0856775807e+16*meter;
static const double micrometer = 1.e-6 *meter;
static const double nanometer = 1.e-9 *meter;
static const double angstrom = 1.e-10*meter;
static const double fermi = 1.e-15*meter;
static const double barn = 1.e-28*meter2;
static const double millibarn = 1.e-3 *barn;
static const double microbarn = 1.e-6 *barn;
static const double nanobarn = 1.e-9 *barn;
static const double picobarn = 1.e-12*barn;
// symbols
static const double mm = millimeter;
static const double mm2 = millimeter2;
static const double mm3 = millimeter3;
static const double cm = centimeter;
static const double cm2 = centimeter2;
static const double cm3 = centimeter3;
static const double m = meter;
static const double m2 = meter2;
static const double m3 = meter3;
static const double km = kilometer;
static const double km2 = kilometer2;
static const double km3 = kilometer3;
static const double pc = parsec;
//
// Angle
//
static const double radian = 1.;
static const double milliradian = 1.e-3*radian;
static const double degree = (3.14159265358979323846/180.0)*radian;
static const double steradian = 1.;
// symbols
static const double rad = radian;
static const double mrad = milliradian;
static const double sr = steradian;
static const double deg = degree;
//
// Time [T]
//
static const double second = 1.;
static const double nanosecond = 1.e-9 *second;
static const double millisecond = 1.e-3 *second;
static const double microsecond = 1.e-6 *second;
static const double picosecond = 1.e-12*second;
static const double hertz = 1./second;
static const double kilohertz = 1.e+3*hertz;
static const double megahertz = 1.e+6*hertz;
// symbols
static const double ns = nanosecond;
static const double s = second;
static const double ms = millisecond;
//
// Mass [E][T^2][L^-2]
//
static const double kilogram = 1.;
static const double gram = 1.e-3*kilogram;
static const double milligram = 1.e-3*gram;
// symbols
static const double kg = kilogram;
static const double g = gram;
static const double mg = milligram;
//
// Electric current [Q][T^-1]
//
static const double ampere = 1.;
static const double milliampere = 1.e-3*ampere;
static const double microampere = 1.e-6*ampere;
static const double nanoampere = 1.e-9*ampere;
//
// Electric charge [Q]
//
static const double coulomb = ampere*second;
static const double e_SI = 1.60217733e-19; // positron charge in coulomb
static const double eplus = e_SI*coulomb ; // positron charge
//
// Energy [E]
//
static const double joule = kg*m*m/(s*s);
static const double electronvolt = e_SI*joule;
static const double kiloelectronvolt = 1.e+3*electronvolt;
static const double megaelectronvolt = 1.e+6*electronvolt;
static const double gigaelectronvolt = 1.e+9*electronvolt;
static const double teraelectronvolt = 1.e+12*electronvolt;
static const double petaelectronvolt = 1.e+15*electronvolt;
// symbols
static const double MeV = megaelectronvolt;
static const double eV = electronvolt;
static const double keV = kiloelectronvolt;
static const double GeV = gigaelectronvolt;
static const double TeV = teraelectronvolt;
static const double PeV = petaelectronvolt;
//
// Power [E][T^-1]
//
static const double watt = joule/second; // watt = 6.24150 e+3 * MeV/ns
//
// Force [E][L^-1]
//
static const double newton = joule/meter; // newton = 6.24150 e+9 * MeV/mm
//
// Pressure [E][L^-3]
//
#define pascal hep_pascal // a trick to avoid warnings
static const double hep_pascal = newton/m2; // pascal = 6.24150 e+3 * MeV/mm3
static const double bar = 100000*pascal; // bar = 6.24150 e+8 * MeV/mm3
static const double atmosphere = 101325*pascal; // atm = 6.32420 e+8 * MeV/mm3
//
// Electric potential [E][Q^-1]
//
static const double megavolt = megaelectronvolt/eplus;
static const double kilovolt = 1.e-3*megavolt;
static const double volt = 1.e-6*megavolt;
//
// Electric resistance [E][T][Q^-2]
//
static const double ohm = volt/ampere; // ohm = 1.60217e-16*(MeV/eplus)/(eplus/ns)
//
// Electric capacitance [Q^2][E^-1]
//
static const double farad = coulomb/volt; // farad = 6.24150e+24 * eplus/Megavolt
static const double millifarad = 1.e-3*farad;
static const double microfarad = 1.e-6*farad;
static const double nanofarad = 1.e-9*farad;
static const double picofarad = 1.e-12*farad;
//
// Magnetic Flux [T][E][Q^-1]
//
static const double weber = volt*second; // weber = 1000*megavolt*ns
//
// Magnetic Field [T][E][Q^-1][L^-2]
//
static const double tesla = volt*second/meter2; // tesla =0.001*megavolt*ns/mm2
static const double gauss = 1.e-4*tesla;
static const double kilogauss = 1.e-1*tesla;
//
// Inductance [T^2][E][Q^-2]
//
static const double henry = weber/ampere; // henry = 1.60217e-7*MeV*(ns/eplus)**2
//
// Temperature
//
static const double kelvin = 1.;
//
// Amount of substance
//
static const double mole = 1.;
//
// Activity [T^-1]
//
static const double becquerel = 1./second ;
static const double curie = 3.7e+10 * becquerel;
//
// Absorbed dose [L^2][T^-2]
//
static const double gray = joule/kilogram ;
//
// Luminous intensity [I]
//
static const double candela = 1.;
//
// Luminous flux [I]
//
static const double lumen = candela*steradian;
//
// Illuminance [I][L^-2]
//
static const double lux = lumen/meter2;
//
// Miscellaneous
//
static const double perCent = 0.01 ;
static const double perThousand = 0.001;
static const double perMillion = 0.000001;
#endif
+112
View File
@@ -0,0 +1,112 @@
# src level Makefile.am
# PATH SETTING (IMPORTED FROM CONFIGURE)
HDF5ROOT = @HDF5ROOT@
PHDF5ROOT = @PHDF5ROOT@
# COMPILERS
CC = @CC@
MPICC = @MPICC@
# COMPILER FLAGS
CFLAGS = @CFLAGS@
PCFLAGS = $(CFLAGS) -DPARALLEL_IO -DH5_HAVE_PARALLEL -DMPICH_IGNORE_CXX_SEEK
#INCLUDES
HDFINC = -I$(HDF5ROOT)/include
PHDFINC = -I$(PHDF5ROOT)/include
PINC = $(PHDFINC) $(MPIINC)
INC = $(HDFINC)
MPIINC = @MPIINC@
# H5Part header file location
H5PINC = -I@prefix@/include
# H5Part compiled library location
H5PLIB = -L@prefix@/lib
# HDF5 LIBRARY
HDFLIB = -L$(HDF5ROOT)/lib -lhdf5 -lz $(SZLIB) @LDFLAGS@
# SZ LIBRARY
SZLIB = @SZLIB@
# Extra files that I wish to include in the dist tar ball.
EXTRA_DIST = H5Part.cc H5Part++.cc H5Part++.hh TestUnderscoreC.c TestUnderscore.f COPYRIGHT
# Files that I don't want to include in the dist tar ball
nodist_include_HEADERS = @UNDERSCORE_H@
# What to build... Will be determined by configure script.
lib_LIBRARIES = @MTARGET@
# Listing of all possible targets that I may build.
EXTRA_LIBRARIES = libH5Part.a libH5PartF.a libpH5Part.a libpH5PartF.a
# Header files that I wish to install in $(prefix)/include
include_HEADERS = H5Part.inc H5Part.h H5Part.hh @UNDERSCORE_H@
# Listing of all possible headers that I may include
EXTRA_HEADERS = H5Part.inc H5Part.h H5Part.hh Underscore.h
# Listing of sources
libH5Part_a_SOURCES = H5Part.c H5Block.c
libH5PartF_a_SOURCES = H5Part.c H5PartF.c H5Block.c
libpH5Part_a_SOURCES = H5Part.c H5Block.c
libpH5PartF_a_SOURCES = H5Part.c H5PartF.c H5Block.c
H5Part.inc: H5PartF90.inc
grep "INTEGER.* FUNCTION" $< | while read type func name rest; do echo " $$type $$name"; done > $@
# Specific building instruction (What compilers to use...)
# ------------ Serial Lib build commands ------------
libH5Part.a: H5Part.o H5Block.o
${AR} rucs $@ $^
libH5PartF.a: H5Part.o H5PartF.o H5Block.o
${AR} rucs $@ $^
H5Part.o: H5Part.c H5Part.h H5PartPrivate.h H5PartTypes.h
$(CC) $(CFLAGS) $(INC) -c $<
H5Block.o: H5Block.c H5Part.h H5PartPrivate.h H5PartTypes.h H5Block.h H5BlockTypes.h
$(CC) $(CFLAGS) $(INC) -c $<
H5PartF.o: H5PartF.c Underscore.h H5Part.h
$(CC) $(CFLAGS) $(INC) -w -c $<
# ----------- Build Parallel H5Part Stuff ------------
libpH5Part.a: pH5Part.o pH5Block.o
${AR} rucs $@ $^
libpH5PartF.a: pH5Part.o pH5PartF.o pH5Block.o
${AR} rucs $@ $^
pH5Part.o: H5Part.c H5Part.h H5PartPrivate.h H5PartTypes.h
$(MPICC) $(CFLAGS) $(INC) -c $< -o $@
pH5Block.o: H5Block.c H5Part.h H5PartPrivate.h H5PartTypes.h H5Block.h H5BlockTypes.h
$(MPICC) $(CFLAGS) $(INC) -c $< -o $@
pH5PartF.o: H5PartF.c Underscore.h H5Part.h
$(MPICC) $(PCFLAGS) $(PINC) -w -c $< -o $@
clean:
rm -f *~ *.o *.a *.so
distclean: clean
rm -f *.a
rm -rf .deps
rm -rf .libs
rm -f Underscore.h
rm -f H5Part_py_wrap.c
rm -f H5Part.py
rm -f Makefile
+12
View File
@@ -0,0 +1,12 @@
c ==============
c
c Simple Fortran program works in conjunction with C program
c to determine how many underscores are generated
c by the fortran compiler
c
c ==============
program TestUnderscoreF
implicit none
call FindUnderscores
end
+36
View File
@@ -0,0 +1,36 @@
#include <stdio.h>
void findunderscores(void){
printf("#ifndef F77_NO_UNDERSCORE\n");
printf("#define F77_NO_UNDERSCORE\n");
printf("#endif\n");
printf("#ifndef F77_NO_CAPS\n");
printf("#define F77_NO_CAPS\n");
printf("#endif\n");
}
void FindUnderscores(void){
printf("#ifndef F77_NO_UNDERSCORE\n");
printf("#define F77_NO_UNDERSCORE\n");
printf("#endif\n");
}
void FindUnderscores_(void){
printf("#ifndef F77_SINGLE_UNDERSCORE\n");
printf("#define F77_SINGLE_UNDERSCORE\n");
printf("#endif\n");
}
void findunderscores_(void){
printf("#ifndef F77_SINGLE_UNDERSCORE\n");
printf("#define F77_SINGLE_UNDERSCORE\n");
printf("#endif\n");
printf("#ifndef F77_NO_CAPS\n");
printf("#define F77_NO_CAPS\n");
printf("#endif\n");
}
void FINDUNDERSCORES(void){
printf("#ifndef F77_CRAY_UNDERSCORE\n");
printf("#define F77_CRAY_UNDERSCORE\n");
printf("#endif\n");
}
+24
View File
@@ -0,0 +1,24 @@
/*! \mainpage
<H1>H5Part: a Portable High Performance Parallel Data Interface to HDF5
</H1>
<P>
<B>
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.
<P>
H5Part consists of Particles, Block structured Fields and unstructured data (Topo). <P>
Developed by .
</B>
<P>
For further information contact: <a href="mailto:xxxxx">xxxxxx</a> -
xxxx xxxxx, (xxx) xxx.
<P>
Last modified on xxx xx, 2006.
<p>
Papers:
<P>
<a href="http://www-vis.lbl.gov/Research/AcceleratorSAPP/index.html">LBNL Vis Group </a><br>
*/
+235
View File
@@ -0,0 +1,235 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mpi.h>
/* #include <mpio.h> */
#include <unistd.h>
#include <sys/types.h>
#ifndef PARALLEL_IO
#define PARALLEL_IO
#endif
#ifndef DISABLE_H5PART
#include "H5Part.h"
#endif
#define FILENAME "testio"
/* normally 64 steps for real benchmark */
#define NSTEPS 5
/* normally 51e6 for real benchmark */
#define NPARTICLES 51e4
#define NTRIALS 3
/*
bench <nParticles>
*/
int main(int argc,char *argv[]){
MPI_Info info;
int npdims=1;
int nprocs,rank;
int trial;
int i,j,n; /* iteration variables */
double starttime,curtime, endtime;
int nparticles = atoi(argv[1]);
double *x,*y,*z,*px,*py,*pz;
typedef double *ddouble;
ddouble data[6];
int64_t *id;
MPI_Datatype chunktype;
int offset;
int localnp;
int err1,err2;
char filename[128]; /*= FILENAME; */
#ifndef DISABLE_H5PART
H5PartFile *f;
#endif
char newfilename[128];
FILE *fd;
MPI_File file;
MPI_Info bogusinfo;
MPI_Offset foffset;
MPI_Comm comm,dcomm = MPI_COMM_WORLD;
MPI_Init(&argc,&argv);
MPI_Comm_rank(dcomm,&rank);
MPI_Comm_size(dcomm,&nprocs);
localnp=nparticles/(int64_t)nprocs;
for(offset=0,i=0;i<rank;i++){
offset+=localnp;
}
data[0]=x=(double*)malloc(sizeof(double)*(size_t)localnp);
data[1]=y=(double*)malloc(sizeof(double)*(size_t)localnp);
data[2]=z=(double*)malloc(sizeof(double)*(size_t)localnp);
data[3]=px=(double*)malloc(sizeof(double)*(size_t)localnp);
data[4]=py=(double*)malloc(sizeof(double)*(size_t)localnp);
data[5]=pz=(double*)malloc(sizeof(double)*(size_t)localnp);
/* printf("about to call create subarray with nparticles=%u localnp=%u offset=%u\n",
nparticles,localnp,offset); */
MPI_Type_create_subarray(1, /* rank */
&nparticles, /* size of the global array */
&localnp, /* size of my local chunk */
&offset, /* offset of this chunk in global */
MPI_ORDER_FORTRAN, /* fortran storage order */
MPI_DOUBLE,
&chunktype);
MPI_Type_commit(&chunktype);
MPI_Info_create(&info);
if(rank==0) printf("Nprocs=%u Particles=%u*6attribs*sizeof(double) Particles/proc=%u Nsteps=%u Ntrials=%u\n",
nprocs,nparticles,localnp,NSTEPS,NTRIALS);
for(trial=0;trial<NTRIALS;trial++){
if(rank==0) printf("---------------------- Trial %u of %u ---------------------\n",trial+1,NTRIALS);
MPI_Barrier(MPI_COMM_WORLD); /* to prevent unlink from interfering with file open */
sprintf(filename,"%s.%u.mpio.dat",FILENAME,nprocs);
if(rank==0) unlink(filename);
MPI_Barrier(MPI_COMM_WORLD); /* to prevent unlink from interfering with file open */
MPI_File_open(MPI_COMM_WORLD,filename,
MPI_MODE_CREATE | MPI_MODE_RDWR,
info,&file);
MPI_File_set_view(file,0,MPI_DOUBLE,chunktype,"native",info);
/* now a barrier to get the start timers roughly synced*/
MPI_Barrier(MPI_COMM_WORLD);
curtime = starttime = MPI_Wtime();
endtime = starttime+5.0*60.0; /* end in 5 minutes */
MPI_Bcast(&endtime,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
/* must touch the entire array after each write */
/* ensures cache-invalidation */
foffset=0;
i=0;
curtime=starttime;
for(i=0;i<NSTEPS;i++){
int n;
MPI_Status status;
for(j=0;j<6;j++){
/* touch data */
for(n=0;n<localnp;n++)
(data[j])[n]=(double)rank;
/* write to that file */
/* MPI_File_set_view(file,foffset,MPI_DOUBLE,chunktype,"native",info);*/
MPI_File_write_at_all(file,
foffset,
data[j],
localnp,
MPI_DOUBLE,&status);
foffset+=nparticles/nprocs;
}
curtime=MPI_Wtime(); /* ensure no race condition by broadcasting time */
MPI_Bcast(&curtime,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
}
MPI_File_close(&file);
MPI_Barrier(MPI_COMM_WORLD);
endtime=MPI_Wtime();
sprintf(filename,"%s.%u.h5.dat",FILENAME,nprocs);
/* foffset*=nprocs; if we want total megabytes written */
if(rank==0){
puts("*");
unlink(filename);
puts("======================================================");
printf("Raw MPI-IO Total Duration %lf seconds, iterations=%u %lf Megabytes written per processor Nprocs= %u \n",
(endtime-starttime),i,((double)foffset)/(1024.0*1024.0),nprocs);
printf("Raw MPI-IO Effective Data Rate = %lf Megabytes/sec global and %lf Megabytes/sec per task Nprocs= %u \n",
(double)(nprocs*localnp*sizeof(double))*((double)NSTEPS)*6.0/((endtime-starttime)*1024.0*1024.0),
(double)(localnp*sizeof(double))*((double)NSTEPS)*6.0/((endtime-starttime)*1024.0*1024.0),nprocs);
puts("======================================================");
}
MPI_Barrier(MPI_COMM_WORLD); /* to prevent unlink from interfering with file open */
/* OK, now we do this using H5Part */
sprintf(newfilename,"testio%u.%u.dat",rank,nprocs);
unlink(newfilename);
MPI_Barrier(MPI_COMM_WORLD); /* to prevent unlink from interfering with file open */
fd = fopen(newfilename,"w");
/* start the timer */
starttime=endtime=MPI_Wtime();
for(i=0;i<NSTEPS;i++){
for(j=0;j<6;j++){
/* touch data */
for(n=0;n<localnp;n++)
(data[j])[n]=(double)rank;
fwrite(data[j],sizeof(double),localnp,fd);
}
curtime=MPI_Wtime(); /* ensure no race condition by broadcasting time */
MPI_Bcast(&curtime,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
}
fclose(fd);
MPI_Barrier(MPI_COMM_WORLD);
endtime=MPI_Wtime();
if(rank==0) puts("*");
MPI_Barrier(MPI_COMM_WORLD); /* to prevent unlink from interfering with file open */
unlink(newfilename);
MPI_Barrier(MPI_COMM_WORLD);
if(rank==0){
puts("======================================================");
printf("Raw 1-file-per-proc Total Duration %lf seconds, iterations=%u %lf Megabytes written Nprocs= %u \n",
(endtime-starttime),NSTEPS,((double)foffset)/(1024.0*1024.0),nprocs);
printf("Raw 1-file-per-proc Effective Data Rate = %lf Megabytes/sec global and %lf Megabytes/sec per task Nprocs= %u \n",
(double)(nprocs*localnp*sizeof(double))*((double)NSTEPS)*6.0/((endtime-starttime)*1024.0*1024.0),
(double)(localnp*sizeof(double))*((double)NSTEPS)*6.0/((endtime-starttime)*1024.0*1024.0),nprocs);
puts("======================================================");
}
#ifndef DISABLE_H5PART
MPI_Barrier(MPI_COMM_WORLD); /* to prevent unlink from interfering with file open */
/* OK, now we do this using H5Part */
f = H5PartOpenFileParallel(filename,H5PART_WRITE,MPI_COMM_WORLD);
MPI_Barrier(MPI_COMM_WORLD); /* to prevent unlink from interfering with file open */
/* start the timer */
starttime=endtime=MPI_Wtime();
H5PartSetNumParticles(f,localnp);
for(i=0;i<NSTEPS;i++){
for(j=0;j<6;j++){
/* touch data */
for(n=0;n<localnp;n++)
(data[j])[n]=(double)rank;
}
H5PartSetStep(f,i);
H5PartWriteDataFloat64(f,"x",x);
H5PartWriteDataFloat64(f,"y",y);
H5PartWriteDataFloat64(f,"z",z);
H5PartWriteDataFloat64(f,"px",px);
H5PartWriteDataFloat64(f,"py",py);
H5PartWriteDataFloat64(f,"pz",pz);
curtime=MPI_Wtime(); /* ensure no race condition by broadcasting time */
MPI_Bcast(&curtime,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
}
H5PartCloseFile(f);
MPI_Barrier(MPI_COMM_WORLD);
endtime=MPI_Wtime();
if(rank==0){
puts("*");
unlink(filename);
puts("======================================================");
printf("H5Part Total Duration %lf seconds, iterations=%u %lf Megabytes written Nprocs= %u \n",
(endtime-starttime),NSTEPS,((double)foffset)/(1024.0*1024.0),nprocs);
printf("H5Part Effective Data Rate = %lf Megabytes/sec global and %lf Megabytes/sec per task Nprocs= %u \n",
(double)(nprocs*localnp*sizeof(double))*((double)NSTEPS)*6.0/((endtime-starttime)*1024.0*1024.0),
(double)(localnp*sizeof(double))*((double)NSTEPS)*6.0/((endtime-starttime)*1024.0*1024.0),nprocs);
puts("======================================================");
}
MPI_Barrier(MPI_COMM_WORLD);
#endif
} /* trials */
MPI_Finalize();
}
+207
View File
@@ -0,0 +1,207 @@
#include <stdio.h>
#include <stdlib.h>
#include <hdf5.h>
#include "H5Part.h"
#include "H5Block.h"
#if 0
int ReadFile(const char *fn){
char name[64];
H5PartFile *file;
h5part_int64_t i,t,nt,nds,myproc;
unsigned int steps;
printf ( "Open %s\n", fn );
file = H5PartOpenFile (fn, H5PART_READ);
nt=H5PartGetNumSteps(file);
H5PartSetStep(file,0);
nds=H5PartGetNumDatasets(file);
printf ( "Timesteps = %d; dataSets per timestep = %d\n", nt, nds );
printf ( "\n\n===============================" );
for(i=0;i<nds;i++){
H5PartGetDatasetName(file,i,name,64);
printf("\tDataset[%u] name=[%s]\n",
i,name);
}
printf ( "===============================\n\n" );
for (steps=0; steps<nt; steps++) {
H5PartSetStep(file,steps);
h5part_int64_t n = H5PartGetNumParticles(file);
printf ( "number of particles this step = %d\n", n );
double *x = malloc ( n * sizeof ( *x ) );
double *y = malloc ( n * sizeof ( *y ) );
double *z = malloc ( n * sizeof ( *z ) );
double *px= malloc ( n * sizeof ( *px ) );
double *py= malloc ( n * sizeof ( *py ) );
double *pz= malloc ( n * sizeof ( *pz ) );
h5part_int64_t *id = malloc ( n * sizeof ( *id ) );
H5PartReadParticleStep(file,steps,x,y,z,px,py,pz,id);
double sumx = 0.0;
double sumpz = 0.0;
for ( i=0; i<n; i++ ) {
sumx += x[i];
sumpz += pz[i];
}
printf ("\tstep=%d sum(x)= %d sum(pz)=%d\n",
steps, sumx, sumpz );
printf ("\tfirst x is %d\tlast x is %d\n",
x[0], x[n-1] );
printf ("\tFor fake data, expect sumx to be = %f\n",
x[0]*((double)n) );
free ( x );
free ( y );
free ( z );
free ( px );
free ( py );
free ( pz );
free ( id );
}
{
h5part_float64_t *data = malloc ( 4*6*8* sizeof(*data) );
h5part_int64_t herr;
h5part_int64_t i, j, k;
h5part_int64_t i_max, j_max, k_max;
i_max = 3;
j_max = 5;
k_max = 7;
herr = H5BlockOpen ( file );
if ( herr < 0 ) {
printf ("Ops!\n");
exit ( 2 );
}
herr = H5BlockDefine3DFieldLayout ( file, 0, i_max, 0, j_max, 0, k_max );
if ( herr < 0 ) {
printf ("Ops!\n");
exit ( 2 );
}
herr = H5Block3dReadScalarField ( file, "test", data );
if ( herr < 0 ) {
printf ("Ops!\n");
exit ( 2 );
}
for ( i = 0; i <= i_max; i++ ) {
for ( j = 0; j <= j_max; j++ ) {
for ( k = 0; k <= k_max; k++ ) {
if ( *(data+ i + j*(i_max+1) + k*(i_max+1)*(j_max+1)) != i + 100*j + 10000*k ) {
printf ( "Block data error!\n" );
exit ( 2 );
}
}
}
}
i_max = 2;
j_max = 2;
k_max = 2;
herr = H5BlockDefine3DFieldLayout ( file, 0, i_max, 0, j_max, 0, k_max );
if ( herr < 0 ) {
printf ("Ops!\n");
exit ( 2 );
}
herr = H5Block3dReadScalarField ( file, "test", data );
if ( herr < 0 ) {
printf ("Ops!\n");
exit ( 2 );
}
for ( i = 0; i <= i_max; i++ ) {
for ( j = 0; j <= j_max; j++ ) {
for ( k = 0; k <= k_max; k++ ) {
printf ( "%f\n", *(data+ i + j*(i_max+1) + k*(i_max+1)*(j_max+1)) );
}
}
}
herr = H5BlockClose ( file );
if ( herr < 0 ) {
printf ("Ops!\n");
exit ( 2 );
}
free ( data );
}
H5PartCloseFile(file);
return 1;
}
#endif
int WriteFile(const char *fn){
H5PartFile *f;
h5part_int64_t i, j, k;
int timestep;
int timesteps = 5;
h5part_int64_t herr;
h5part_float64_t *data;
h5part_int64_t i_dims, j_dims, k_dims;
printf ("Open %s\n", fn );
f = H5PartOpenFileParallel ( fn, H5PART_WRITE, MPI_COMM_WORLD );
herr = H5BlockOpen ( f );
if ( herr < 0 ) exit ( 2 );
for ( timestep = 0; timestep < timesteps; timestep++){
herr = H5PartSetStep ( f, timestep );
if ( herr < 0 ) exit ( 2 );
printf ( "Write Step %d\n", timestep );
i_dims = 4;
j_dims = 6;
k_dims = 8;
data = (h5part_float64_t*) malloc ( i_dims * j_dims * k_dims * sizeof(*data) );
for ( i = 0; i < i_dims; i++ ) {
for ( j = 0; j < j_dims; j++ ) {
for ( k = 0; k < k_dims; k++ ) {
*(data+ i + j*i_dims + k*i_dims*j_dims) = i+ 10*j + 100*k + 1000*f->myproc;
}
}
}
herr = H5BlockDefine3DFieldLayout ( f, f->myproc*2, f->myproc*2+i_dims-1, 0, j_dims-1, 0, k_dims-1 );
if ( herr < 0 ) exit ( 2 );
herr = H5Block3dWriteScalarField ( f, "test", data );
if ( herr < 0 ) exit ( 2 );
free ( data );
}
herr = H5BlockClose ( f );
if ( herr < 0 ) exit ( 2 );
H5PartCloseFile ( f );
return 1;
}
int main(int argc,char **argv){
char *fn = "testfile.h5";
MPI_Init(&argc,&argv);
H5PartSetVerbosityLevel ( 40 );
if(!WriteFile(fn)){
printf ("Failed to write file %s\n", fn );
exit ( 2 );
}
#if 0
if(!ReadFile(fn)){
printf ("Failed to read file %s\n", fn );
exit ( 2 );
}
#endif
return 0;
}
+224
View File
@@ -0,0 +1,224 @@
#include <stdio.h>
#include <stdlib.h>
#include <hdf5.h>
#include "H5Part.h"
#include "H5Block.h"
#include <mpi.h>
static h5part_int64_t
calc_index_KJI (
h5part_int64_t i,
h5part_int64_t x_extent,
h5part_int64_t j,
h5part_int64_t y_extent,
h5part_int64_t k,
h5part_int64_t z_extent
) {
return i + j*x_extent + k*x_extent*y_extent;
}
static int
_define_3dlayout (
H5PartFile *f,
h5part_int64_t *dims,
int myproc
) {
h5part_int64_t i_start = 0;
h5part_int64_t i_end = 63;
h5part_int64_t j_start = 0;
h5part_int64_t j_end = 63;
h5part_int64_t k_start = 64 * myproc;
h5part_int64_t k_end = k_start + 63;
herr_t herr = H5BlockDefine3DFieldLayout ( f,
i_start, i_end,
j_start, j_end,
k_start, k_end );
if ( herr < 0 ) return -1;
dims[0] = i_end - i_start + 1;
dims[1] = j_end - j_start + 1;
dims[2] = k_end - k_start + 1;
return 0;
}
static int
_read3d_scalar (
H5PartFile *f,
const char *name,
h5part_int64_t *dims,
int myproc
) {
h5part_float64_t *data;
int i, j, k, idx;
data = (h5part_float64_t*) malloc (
dims[0] * dims[1] * dims[2] * sizeof(*data) );
herr_t herr = H5Block3dReadScalarField ( f, name, data );
if ( herr < 0 ) return -1;
for ( i = 0; i < dims[0]; i++ ) {
for ( j = 0; j < dims[1]; j++ ) {
printf ("(%d,%d,0): ", i, j );
for ( k = 0; k < dims[2]; k++ ) {
idx = calc_index_KJI ( i, dims[0], j, dims[1], k, dims[2] );
printf ( "%.0f ", *(data+idx) );
}
printf ( "\n" );
}
}
return 0;
}
static int
_read3d_3d_vector (
H5PartFile *f,
const char *name,
h5part_int64_t *dims
) {
h5part_float64_t *x_data;
h5part_float64_t *y_data;
h5part_float64_t *z_data;
x_data = (h5part_float64_t*) malloc (
dims[0] * dims[1] * dims[2] * sizeof(*x_data) );
y_data = (h5part_float64_t*) malloc (
dims[0] * dims[1] * dims[2] * sizeof(*y_data) );
z_data = (h5part_float64_t*) malloc (
dims[0] * dims[1] * dims[2] * sizeof(*z_data) );
herr_t herr = H5Block3dRead3dVectorField ( f, name,
x_data, y_data, z_data );
if ( herr < 0 ) return -1;
return 0;
}
static int
_read_field (
H5PartFile *f,
h5part_int64_t idx,
int myproc
) {
char name[256];
h5part_int64_t grid_rank;
h5part_int64_t grid_dims[16];
h5part_int64_t field_dims;
herr_t herr = H5BlockGetFieldInfo (
f,
idx,
name, sizeof(name),
&grid_rank,
grid_dims,
&field_dims );
if ( herr < 0 ) return -1;
printf ( "Field #%lld has name \"%s\"\n", (long long) idx, name );
switch ( grid_rank ) {
case 3:
printf ( "\tGrid dimension of \"%s\" is 3\n", name );
printf ( "\tThe dimesion sizes are: (%lld, %lld, %lld)\n",
(long long)grid_dims[0], (long long)grid_dims[1], (long long)grid_dims[2] );
if ( field_dims == 1 ) {
printf ( "\tField data are scalar\n" );
} else {
printf ( "\tField data are %lld vectors\n",
(long long)field_dims );
}
_define_3dlayout ( f, grid_dims, myproc );
if ( field_dims == 1 ) {
_read3d_scalar ( f, name, grid_dims, myproc );
} else if ( field_dims == 3 ) {
_read3d_3d_vector ( f, name, grid_dims );
}
break;
default:
printf ( "unknown grid rank %lld!!!\n", (long long)grid_rank );
}
return 0;
}
static int
ReadFile (
const char *fn,
MPI_Comm comm,
int myproc
) {
H5PartFile *f;
h5part_int64_t herr;
h5part_int64_t timestep;
h5part_int64_t timesteps;
h5part_int64_t i, n;
printf ("Opening file %s for reading\n", fn );
f = H5PartOpenFileParallel ( fn, H5PART_READ, comm );
if ( f == NULL ) return -1;
timesteps = H5PartGetNumSteps ( f );
printf ( "Timesteps = %lld\n", (long long)timesteps );
printf ( "\n===============================\n" );
for ( timestep = 0; timestep < timesteps; timestep++) {
herr = H5PartSetStep ( f, timestep );
if ( herr < 0 ) return -1;
n = H5BlockGetNumFields ( f );
if ( n < 0 ) return -1;
printf ( "Number of fields in time-step #%lld: %lld \n",
(long long)timestep, (long long)n );
for ( i = 0; i < n; i++ ) {
_read_field ( f, i, myproc );
}
}
return H5PartCloseFile ( f );
}
int
main (
int argc,
char **argv
) {
char *fn = "blockfile1.h5";
int myproc;
int nprocs;
H5PartSetVerbosityLevel ( 10 );
MPI_Comm comm=MPI_COMM_WORLD;
MPI_Init(&argc,&argv);
MPI_Comm_size(comm,&nprocs);
MPI_Comm_rank(comm,&myproc);
if ( ReadFile ( fn, comm, 1 ) < 0 ){
printf ("Failed to read file %s\n", fn );
exit ( 2 );
}
return 0;
}
+311
View File
@@ -0,0 +1,311 @@
#include <stdio.h>
#include <stdlib.h>
#include <hdf5.h>
#include "H5Part.h"
#include "H5Block.h"
static h5part_int64_t
calc_index_KJI (
h5part_int64_t i,
h5part_int64_t x_extent,
h5part_int64_t j,
h5part_int64_t y_extent,
h5part_int64_t k,
h5part_int64_t z_extent
) {
return i + j*x_extent + k*x_extent*y_extent;
}
static int
_define_3dlayout (
H5PartFile *f,
h5part_int64_t *dims
) {
herr_t herr = H5BlockDefine3DFieldLayout ( f,
0, dims[0]-1,
0, dims[1]-1,
0, dims[2]-1 );
if ( herr < 0 ) return -1;
return 0;
}
static int
_read3d_scalar (
H5PartFile *f,
const char *name,
h5part_int64_t *dims
) {
h5part_float64_t *data;
int i, j, k, idx;
data = (h5part_float64_t*) malloc (
dims[0] * dims[1] * dims[2] * sizeof(*data) );
herr_t herr = H5Block3dReadScalarField ( f, name, data );
if ( herr < 0 ) return -1;
herr = H5BlockDefine3DFieldLayout ( f,
1, 3,
1, 4,
0, 4 );
if ( herr < 0 ) return -1;
herr = H5Block3dReadScalarField ( f, name, data );
if ( herr < 0 ) return -1;
for ( i = 0; i < 3; i++ ) {
for ( j = 0; j < 4; j++ ) {
printf ("(%d,%d,0): ", i, j );
for ( k = 0; k < 5; k++ ) {
idx = calc_index_KJI ( i, 3, j, 4, k, 5 );
printf ( "%.0f ", *(data+idx) );
}
printf ( "\n" );
}
}
herr = H5BlockDefine3DFieldLayout ( f,
0, dims[0]-1,
0, dims[1]-1,
0, dims[2]-1 );
if ( herr < 0 ) return -1;
herr = H5Block3dReadScalarField ( f, name, data );
if ( herr < 0 ) return -1;
for ( i = 0; i < dims[0]; i++ ) {
for ( j = 0; j < dims[1]; j++ ) {
printf ("(%d,%d,0): ", i, j );
for ( k = 0; k < dims[2]; k++ ) {
idx = calc_index_KJI ( i, dims[0], j, dims[1], k, dims[2] );
printf ( "%.0f ", *(data+idx) );
}
printf ( "\n" );
}
}
return 0;
}
static int
_read3d_3d_vector (
H5PartFile *f,
const char *name,
h5part_int64_t *dims
) {
h5part_float64_t *x_data;
h5part_float64_t *y_data;
h5part_float64_t *z_data;
x_data = (h5part_float64_t*) malloc (
dims[0] * dims[1] * dims[2] * sizeof(*x_data) );
y_data = (h5part_float64_t*) malloc (
dims[0] * dims[1] * dims[2] * sizeof(*y_data) );
z_data = (h5part_float64_t*) malloc (
dims[0] * dims[1] * dims[2] * sizeof(*z_data) );
herr_t herr = H5Block3dRead3dVectorField ( f, name,
x_data, y_data, z_data );
if ( herr < 0 ) return -1;
return 0;
}
static int
_read_field (
H5PartFile *f,
h5part_int64_t idx
) {
char name[256];
h5part_int64_t grid_rank;
h5part_int64_t grid_dims[16];
h5part_int64_t field_dims;
herr_t herr = H5BlockGetFieldInfo (
f,
idx,
name, sizeof(name),
&grid_rank,
grid_dims,
&field_dims );
if ( herr < 0 ) return -1;
printf ( "Field #%lld has name \"%s\"\n", (long long) idx, name );
switch ( grid_rank ) {
case 3:
printf ( "\tGrid dimension of \"%s\" is 3\n", name );
printf ( "\tThe dimesion sizes are: (%lld, %lld, %lld)\n",
(long long)grid_dims[0], (long long)grid_dims[1], (long long)grid_dims[2] );
if ( field_dims == 1 ) {
printf ( "\tField data are scalar\n" );
} else {
printf ( "\tField data are %lld vectors\n",
(long long)field_dims );
}
_define_3dlayout ( f, grid_dims );
if ( field_dims == 1 ) {
_read3d_scalar ( f, name, grid_dims );
} else if ( field_dims == 3 ) {
_read3d_3d_vector ( f, name, grid_dims );
}
break;
default:
printf ( "unknown grid rank %lld!!!\n", (long long)grid_rank );
}
#if 0
for ( i = 0; i < i_dims; i++ ) {
for ( j = 0; j < j_dims; j++ ) {
for ( k = 0; k < k_dims; k++ ) {
h5part_int64_t idx;
idx = k + j*k_dims + i*k_dims*j_dims;
if ( *(data+idx) != i + 10*j + 100*k ) {
printf ( "Block data error!\n" );
return -1;
}
}
}
}
free ( data );
#endif
return 0;
}
static int
ReadFile (
const char *fn
) {
H5PartFile *f;
h5part_int64_t herr;
h5part_int64_t timestep;
h5part_int64_t timesteps;
h5part_int64_t i, n;
printf ("Opening file %s\n", fn );
f = H5PartOpenFile ( fn, H5PART_READ );
if ( herr < 0 ) return -1;
timesteps = H5PartGetNumSteps ( f );
printf ( "Timesteps = %lld\n", (long long)timesteps );
printf ( "\n===============================\n" );
for ( timestep = 0; timestep < timesteps; timestep++) {
herr = H5PartSetStep ( f, timestep );
if ( herr < 0 ) return -1;
n = H5BlockGetNumFields ( f );
if ( n < 0 ) return -1;
printf ( "Number of fields in time-step #%lld: %lld \n",
(long long)timestep, (long long)n );
for ( i = 0; i < n; i++ ) {
_read_field ( f, i );
}
}
return H5PartCloseFile ( f );
}
int
WriteFile (
const char *fn
) {
H5PartFile *f;
h5part_int64_t i, j, k;
int timestep;
int timesteps = 5;
h5part_int64_t herr;
h5part_float64_t *data;
h5part_int64_t i_dims, j_dims, k_dims;
printf ("Opening file \"%s\" for writing\n", fn );
i_dims = 4;
j_dims = 6;
k_dims = 8;
data = (h5part_float64_t*) malloc (
i_dims * j_dims * k_dims * sizeof(*data) );
f = H5PartOpenFile ( fn, H5PART_WRITE );
if ( herr < 0 ) return -1;
for ( timestep = 0; timestep < timesteps; timestep++){
herr = H5PartSetStep ( f, timestep );
if ( herr < 0 ) return -1;
printf ( "Write Step %d\n", timestep );
for ( i = 0; i < i_dims; i++ ) {
for ( j = 0; j < j_dims; j++ ) {
for ( k = 0; k < k_dims; k++ ) {
h5part_int64_t idx;
idx = calc_index_KJI ( i, i_dims, j, j_dims, k, k_dims );
*(data + idx) = k+ 10*j + 100*i;
}
}
}
herr = H5BlockDefine3DFieldLayout ( f,
0, i_dims-1,
0, j_dims-1,
0, k_dims-1 );
if ( herr < 0 ) return -1;
herr = H5Block3dWriteScalarField ( f, "scalar", data );
if ( herr < 0 ) return -1;
herr = H5Block3dWrite3dVectorField ( f, "3dVector",
data, data, data );
if ( herr < 0 ) return -1;
}
free ( data );
return H5PartCloseFile ( f );
}
int
main (
int argc,
char **argv
) {
char *fn;
char dstr[]="testfile.h5";
if ( argc > 1 )
fn = argv[1];
else
fn = dstr;
H5PartSetVerbosityLevel ( 10 );
if ( WriteFile ( fn ) < 0 ){
printf (" Failed to write file %s\n", fn );
exit ( 2 );
}
if ( ReadFile ( fn ) < 0 ){
printf ("Failed to read file %s\n", fn );
exit ( 2 );
}
return 0;
}
+92
View File
@@ -0,0 +1,92 @@
#include <stdio.h>
#include <stdlib.h>
#include <hdf5.h>
#include "H5Part.h"
#include "H5Block.h"
static h5part_int64_t
calc_index_KJI (
h5part_int64_t i,
h5part_int64_t x_extent,
h5part_int64_t j,
h5part_int64_t y_extent,
h5part_int64_t k,
h5part_int64_t z_extent
) {
return i + j*x_extent + k*x_extent*y_extent;
}
int
WriteFile (
const char *fn,
h5part_int64_t i_dims,
h5part_int64_t j_dims,
h5part_int64_t k_dims
) {
H5PartFile *f;
h5part_int64_t i, j, k;
int timestep;
int timesteps = 1;
h5part_int64_t herr;
h5part_float64_t *data;
printf ("Opening file \"%s\" for writing\n", fn );
data = (h5part_float64_t*) malloc (
i_dims * j_dims * k_dims * sizeof(*data) );
f = H5PartOpenFile ( fn, H5PART_WRITE );
if ( herr < 0 ) return -1;
for ( timestep = 0; timestep < timesteps; timestep++){
herr = H5PartSetStep ( f, timestep );
if ( herr < 0 ) return -1;
printf ( "Write Step %d\n", timestep );
for ( i = 0; i < i_dims; i++ ) {
for ( j = 0; j < j_dims; j++ ) {
for ( k = 0; k < k_dims; k++ ) {
h5part_int64_t idx;
idx = calc_index_KJI ( i, i_dims, j, j_dims, k, k_dims );
*(data + idx) = k+ 1000*j + 100000*i;
}
}
}
herr = H5BlockDefine3DFieldLayout ( f,
0, i_dims-1,
0, j_dims-1,
0, k_dims-1 );
if ( herr < 0 ) return -1;
herr = H5Block3dWriteScalarField ( f, "scalar", data );
if ( herr < 0 ) return -1;
}
free ( data );
return H5PartCloseFile ( f );
}
int
main (
int argc,
char **argv
) {
char *fn = "blockfile1.h5";
H5PartSetVerbosityLevel ( 10 );
if ( WriteFile ( fn, 64, 64, 512 ) < 0 ){
printf (" Failed to write file %s\n", fn );
exit ( 2 );
}
return 0;
}

Some files were not shown because too many files have changed in this diff Show More