Commit 0d1f2740 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

moving H5PartReader to VTK

fixes #19017.
parent a629ae7b
......@@ -1414,7 +1414,7 @@ set (ResetToVisibleRange_DISABLE_CRS TRUE)
# - Clip, UndoRedo, UndoRedo[1-8]
#
# Contains Plugin Loading actions:
# - LoadPlugins, NiftiReaderWriterPlugin, H5PartReaderPlugin
# - LoadPlugins, NiftiReaderWriterPlugin
#
# Does not work in CS or CRS mode
# - ViewSettingsDialog, RectilinearFractal, NewColorEditor
......
......@@ -520,13 +520,13 @@ list(APPEND paraview_requested_modules
ParaView::ServerManagerApplication
ParaView::ServerManagerDefault
ParaView::VTKExtensionsCGNSReader
ParaView::VTKExtensionsH5PartReader
ParaView::VTKExtensionsPoints
ParaView::WrapClientServer
VTK::FiltersFlowPaths
VTK::FiltersVerdict
VTK::IOAMR
VTK::IOAsynchronous # needed for cinema, but no harm adding always.
VTK::IOH5part
VTK::IOParallelLSDyna
VTK::IOTecplotTable
VTK::IOTRUCHAS
......
......@@ -8780,8 +8780,7 @@ series.
<SourceProxy
name="vtkVeraOutReader"
class="vtkVeraOutReader"
label="VERA OUT Reader"
>
label="VERA OUT Reader" >
<Documentation
long_help="Reads VERA OUT HDF5 data."
short_help="Reads VERA OUT HDF5 data."
......@@ -8868,5 +8867,124 @@ series.
<FileListDomain name="files"/>
</StringVectorProperty>
</SourceProxy>
<SourceProxy name="H5PartReader" class="vtkH5PartReader">
<Documentation>
Reader for H5Part (HDF5) particle files.
</Documentation>
<StringVectorProperty name="FileName"
command="SetFileName"
number_of_elements="1"
panel_visibility="never">
<FileListDomain name="files"/>
</StringVectorProperty>
<DoubleVectorProperty name="TimestepValues"
information_only="1">
<TimeStepsInformationHelper/>
</DoubleVectorProperty>
<StringVectorProperty name="XarrayInfo"
command="GetXarray"
information_only="1">
</StringVectorProperty>
<StringVectorProperty name="YarrayInfo"
command="GetYarray"
information_only="1">
</StringVectorProperty>
<StringVectorProperty name="ZarrayInfo"
command="GetZarray"
information_only="1">
</StringVectorProperty>
<StringVectorProperty name="Xarray"
command="SetXarray"
number_of_elements="1"
information_property="XarrayInfo">
<Documentation>
This property lists which point array to use for coordinates.
</Documentation>
<StringListDomain name="array_list">
<RequiredProperties>
<Property name="PointArrayInfo" function="ArrayList" />
</RequiredProperties>
</StringListDomain>
</StringVectorProperty>
<StringVectorProperty name="Yarray"
command="SetYarray"
number_of_elements="1"
information_property="YarrayInfo">
<Documentation>
This property lists which point array to use for coordinates.
</Documentation>
<StringListDomain name="array_list">
<RequiredProperties>
<Property name="PointArrayInfo" function="ArrayList" />
</RequiredProperties>
</StringListDomain>
</StringVectorProperty>
<StringVectorProperty name="Zarray"
command="SetZarray"
number_of_elements="1"
information_property="ZarrayInfo">
<Documentation>
This property lists which point array to use for coordinates.
</Documentation>
<StringListDomain name="array_list">
<RequiredProperties>
<Property name="PointArrayInfo" function="ArrayList" />
</RequiredProperties>
</StringListDomain>
</StringVectorProperty>
<StringVectorProperty name="PointArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="Point"/>
</StringVectorProperty>
<StringVectorProperty name="PointArrayStatus"
command="SetPointArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="PointArrayInfo"
label="Point Arrays">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="PointArrayInfo" function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
<Documentation>
This property lists which point-centered arrays to read.
</Documentation>
</StringVectorProperty>
<IntVectorProperty name="GenerateVertexCells"
command="SetGenerateVertexCells"
number_of_elements="1"
default_values="1"
panel_visibility="advanced">
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty name="MaskOutOfTimeRangeOutput"
command="SetMaskOutOfTimeRangeOutput"
number_of_elements="1"
default_values="0"
panel_visibility="advanced">
<BooleanDomain name="bool"/>
</IntVectorProperty>
<Hints>
<ReaderFactory extensions="h5part"
file_description="H5Part particle files" />
</Hints>
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration>
## Thanks to John Biddiscombe of
## CSCS - Swiss National Supercomputing Centre for creating and contributing
## this plugin.
set(classes
vtkH5PartReader)
set(sources
# TODO: Move H5Part to ThirdParty/
H5Part/src/H5Block.c
H5Part/src/H5Part.c)
set_source_files_properties(${sources}
PROPERTIES
LANGUAGE CXX)
vtk_module_add_module(ParaView::VTKExtensionsH5PartReader
CLASSES ${classes}
SOURCES ${sources})
if (PARAVIEW_USE_MPI)
vtk_module_definitions(ParaView::VTKExtensionsH5PartReader
PRIVATE
H5PART_HAS_MPI)
endif ()
vtk_module_definitions(ParaView::VTKExtensionsH5PartReader
PRIVATE
H5_USE_16_API)
vtk_module_include(ParaView::VTKExtensionsH5PartReader
PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/H5Part/src")
paraview_add_server_manager_xmls(
XMLS H5PartServerManager.xml)
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.
*** 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.
Error Handling
--------------
Now all functions, in which an error could occur, 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 successful execution. This is similar 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 occurred.
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
);
==============================================================================
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
(6) Cray XT3 @ CSCS gele
1) modules/3.1.6 9) PrgEnv-pgi/1.4.26 17) xt-lustre-ss/1.4.26
2) MySQL/4.0.26 10) xt-pbs/5.3.4 18) Base-opts/1.4.26
3) acml/3.0 11) xt-service/1.4.26 19) subversion/1.3.2
4) pgi/6.1.4 12) xt-libc/1.4.26 20) zlib/1.2.3
5) totalview/7.2.0 13) xt-os/1.4.26 21) szip/2.0
6) xt-libsci/1.4.26 14) xt-catamount/1.4.26 22) hdf5/1.6.5
7) xt-mpt/1.4.26 15) xt-boot/1.4.26