Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1bda4e3c70 | |||
| 819ddc4704 | |||
| 3894452bc9 | |||
| 58be7a8318 | |||
| 9a06157427 | |||
| a44e2b6a05 | |||
| ac8d16c0b6 | |||
| 6c944f2b16 | |||
| b1aa655b22 | |||
| efb1e39233 | |||
| 5b611ab155 | |||
| 66449ee44d | |||
| d368a60202 | |||
| 6b4b556ff1 | |||
| 0857443617 | |||
| e3b93e4383 | |||
| 3e99a8ccfa | |||
| bb41cc3288 | |||
| cf1368291d | |||
| 698b5e0c76 | |||
| ea40b3272e | |||
| 90f8506628 | |||
| a7727635a7 | |||
| 66476adf6a | |||
| 1c4c62192d | |||
| fb660f8459 | |||
| 20bff7f87c | |||
| 64c2b96f27 |
+5
-3
@@ -9,9 +9,6 @@
|
|||||||
/NEWS -text
|
/NEWS -text
|
||||||
/README -text
|
/README -text
|
||||||
/autogen.sh -text
|
/autogen.sh -text
|
||||||
/config.guess -text
|
|
||||||
/config.h.in -text
|
|
||||||
/config.sub -text
|
|
||||||
/configure-crayxt -text
|
/configure-crayxt -text
|
||||||
/configure.ac -text
|
/configure.ac -text
|
||||||
/depcomp -text
|
/depcomp -text
|
||||||
@@ -19,7 +16,12 @@ doc/Doxyfile -text
|
|||||||
doc/H5X_File_Format.txt -text
|
doc/H5X_File_Format.txt -text
|
||||||
doc/Makefile.am -text
|
doc/Makefile.am -text
|
||||||
doc/doxyfooter -text
|
doc/doxyfooter -text
|
||||||
|
examples/core_vfd.c -text
|
||||||
|
examples/fields.c -text
|
||||||
|
examples/particles.c -text
|
||||||
|
examples/simplef.F90 -text
|
||||||
examples/stridedf.F90 -text
|
examples/stridedf.F90 -text
|
||||||
|
examples/write_setview.c -text
|
||||||
/install-sh -text
|
/install-sh -text
|
||||||
/license.txt -text
|
/license.txt -text
|
||||||
/missing -text
|
/missing -text
|
||||||
|
|||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
/Makefile.in
|
||||||
|
/aclocal.m4
|
||||||
|
/autom4te.cache
|
||||||
|
/build
|
||||||
|
/config.h.in
|
||||||
|
/configure
|
||||||
|
doc/Makefile.in
|
||||||
|
/ltmain.sh
|
||||||
|
/m4
|
||||||
|
src/H5PartF.h
|
||||||
|
src/Makefile.in
|
||||||
|
test/Makefile.in
|
||||||
|
tools/Makefile.in
|
||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
# Trial by Antino Kim
|
ACLOCAL_AMFLAGS=-I m4
|
||||||
# Top level Makefile.am
|
|
||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
doc \
|
doc \
|
||||||
|
|||||||
@@ -1,3 +1,75 @@
|
|||||||
|
#### H5PART 1.6.4 ############################################################
|
||||||
|
|
||||||
|
Fixed bug where H5PartSetViewIndices was not setting an empty view when the
|
||||||
|
number of elements is 0.
|
||||||
|
|
||||||
|
Set a threshold on the HDF5 alignment parameter so that small metadata writes
|
||||||
|
are not aligned, which causes large gaps in the file.
|
||||||
|
|
||||||
|
#### H5PART 1.6.3 ############################################################
|
||||||
|
|
||||||
|
New build system uses libtool and can build shared libraries.
|
||||||
|
|
||||||
|
Fixed a bug that incorrectly identifies the number of selected points in a view
|
||||||
|
when using H5PartSetViewIndices.
|
||||||
|
|
||||||
|
Fixed bug in Fortran test reported by several people, as well as several
|
||||||
|
incorrect views set in the C test that were causing segfaults.
|
||||||
|
|
||||||
|
Fixed name mismatches in the Fortran interface, and an off-by-one indexing
|
||||||
|
problem.
|
||||||
|
|
||||||
|
#### H5PART 1.6.2 ############################################################
|
||||||
|
|
||||||
|
Removed H5PartSetViewEmpty
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
An empty view can now be selected with:
|
||||||
|
H5PartSetNumParticles(file, 0);
|
||||||
|
|
||||||
|
Bug Fixes to Attribute Calls in Fortran API
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
Fixed a problem where attribute values were reverting to zero.
|
||||||
|
|
||||||
|
#### H5PART 1.6.1 ############################################################
|
||||||
|
|
||||||
|
Chunking in the H5Part API
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
There is now an H5Part equivalent H5PartSetChunkSize to the existing
|
||||||
|
H5BlockDefine3DChunkDims call. Both of these calls enable the chunking
|
||||||
|
mechanism in the underlying HDF5 layer. Chunking is used in combination
|
||||||
|
with the aligned open calls to pad datasets to alignment multiples
|
||||||
|
on disk.
|
||||||
|
|
||||||
|
All Steps Available on Write
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Previously, existing steps in a file were only accessible in read-only mode.
|
||||||
|
Now, all steps are available in all modes, including write-truncate and
|
||||||
|
write-append. Thus, it is now possible to overwrite existing data in write
|
||||||
|
mode. To help alert the user to this possibility, a warning is issued every
|
||||||
|
time an existing dataset is written to. Warnings can be printed by setting
|
||||||
|
the verbosity to H5PART_VERB_WARN or higher.
|
||||||
|
|
||||||
|
New Throttling Routine
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Previously, a throttle factor of N meant that for P processors, the total
|
||||||
|
number of P writes were divided into N batches of P/N writes.
|
||||||
|
|
||||||
|
To better accommodate round-robin lustre striping, the new policy is to
|
||||||
|
execute P/N batches of N writes. Thus, matching N to the number of stripes
|
||||||
|
results in the desirable 1-1 matching of writers to stripes.
|
||||||
|
|
||||||
|
Other Fixes
|
||||||
|
-----------
|
||||||
|
|
||||||
|
* The configure script should correctly detect PGI compilers now.
|
||||||
|
* There was a small memory leak in the Fortran file open calls.
|
||||||
|
* There was a compile error with HDF5 1.6.x due to a missing assignment.
|
||||||
|
|
||||||
#### H5PART 1.6 ##############################################################
|
#### H5PART 1.6 ##############################################################
|
||||||
|
|
||||||
Updated Documentation
|
Updated Documentation
|
||||||
@@ -122,7 +194,7 @@ calls.
|
|||||||
Previously, a user could overrun internal buffers for dataset names. Now, a
|
Previously, a user could overrun internal buffers for dataset names. Now, a
|
||||||
fixed limit of 64 chars is imposed. Dataset names that are longer than this are
|
fixed limit of 64 chars is imposed. Dataset names that are longer than this are
|
||||||
truncated and a warning is printed. We expect that most users are using
|
truncated and a warning is printed. We expect that most users are using
|
||||||
short canoncical names like x, px, id, etc.
|
short canonical names like x, px, id, etc.
|
||||||
|
|
||||||
Changes to Existing API
|
Changes to Existing API
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|||||||
+26
-24
@@ -1,46 +1,48 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Run this to generate all the initial makefiles, etc.
|
# Run this to generate all the initial makefiles, etc.
|
||||||
|
|
||||||
|
ACLOCAL_FLAGS="-I m4 $ACLOCAL_FLAGS"
|
||||||
|
LIBTOOLIZE_FLAGS="--force $LIBTOOLIZE_FLAGS"
|
||||||
|
AUTOMAKE_FLAGS="--add-missing --copy --foreign $AUTOMAKE_FLAGS"
|
||||||
|
|
||||||
|
LIBTOOLIZE=`which libtoolize`
|
||||||
|
if [ "$LIBTOOLIZE" = "" ]; then
|
||||||
|
LIBTOOLIZE=`which glibtoolize`
|
||||||
|
fi
|
||||||
|
if [ "$LIBTOOLIZE" = "" ]; then
|
||||||
|
echo "libtoolize not found" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "+ making misc files ..."
|
echo "+ making misc files ..."
|
||||||
touch NEWS README AUTHORS ChangeLog
|
touch NEWS README AUTHORS ChangeLog
|
||||||
echo
|
echo
|
||||||
echo
|
$LIBTOOLIZE $LIBTOOLIZE_FLAGS || {
|
||||||
|
echo "libtoolize failed"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
echo
|
echo
|
||||||
echo "+ running aclocal ..."
|
echo "+ running aclocal ..."
|
||||||
aclocal $ACLOCAL_FLAGS || {
|
aclocal $ACLOCAL_FLAGS || {
|
||||||
echo
|
echo "aclocal failed - check that all needed development files are present on system"
|
||||||
echo "aclocal failed - check that all needed development files are present on system"
|
exit 1
|
||||||
exit 1
|
|
||||||
}
|
}
|
||||||
echo
|
echo
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "+ running autoheader ... "
|
echo "+ running autoheader ... "
|
||||||
autoheader || {
|
autoheader || {
|
||||||
echo
|
echo "autoheader failed"
|
||||||
echo "autoheader failed"
|
exit 1
|
||||||
exit 1
|
|
||||||
}
|
}
|
||||||
echo
|
echo
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "+ running autoconf ... "
|
echo "+ running autoconf ... "
|
||||||
autoconf || {
|
autoconf || {
|
||||||
echo
|
echo "autoconf failed"
|
||||||
echo "autoconf failed"
|
exit 1
|
||||||
exit 1
|
|
||||||
}
|
}
|
||||||
echo
|
echo
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "+ running automake ... "
|
echo "+ running automake ... "
|
||||||
automake -a -c --foreign || {
|
automake $AUTOMAKE_FLAGS || {
|
||||||
echo
|
echo "automake failed"
|
||||||
echo "automake failed"
|
exit 1
|
||||||
exit 1
|
|
||||||
}
|
}
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
|
|
||||||
|
|||||||
Vendored
-1469
File diff suppressed because it is too large
Load Diff
-99
@@ -1,99 +0,0 @@
|
|||||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
||||||
#undef HAVE_INTTYPES_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#undef HAVE_MEMORY_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
|
||||||
#undef HAVE_STDINT_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
||||||
#undef HAVE_STDLIB_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
|
||||||
#undef HAVE_STRINGS_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
|
||||||
#undef HAVE_STRING_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
||||||
#undef HAVE_SYS_STAT_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
||||||
#undef HAVE_SYS_TYPES_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
|
||||||
#undef HAVE_UNISTD_H
|
|
||||||
|
|
||||||
/* "" */
|
|
||||||
#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
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
|
||||||
#undef STDC_HEADERS
|
|
||||||
|
|
||||||
/* Enable extensions on AIX 3, Interix. */
|
|
||||||
#ifndef _ALL_SOURCE
|
|
||||||
# undef _ALL_SOURCE
|
|
||||||
#endif
|
|
||||||
/* Enable GNU extensions on systems that have them. */
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
# undef _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
/* Enable threading extensions on Solaris. */
|
|
||||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
|
||||||
# undef _POSIX_PTHREAD_SEMANTICS
|
|
||||||
#endif
|
|
||||||
/* Enable extensions on HP NonStop. */
|
|
||||||
#ifndef _TANDEM_SOURCE
|
|
||||||
# undef _TANDEM_SOURCE
|
|
||||||
#endif
|
|
||||||
/* Enable general extensions on Solaris. */
|
|
||||||
#ifndef __EXTENSIONS__
|
|
||||||
# undef __EXTENSIONS__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Version number of package */
|
|
||||||
#undef VERSION
|
|
||||||
|
|
||||||
/* Define to 1 if on MINIX. */
|
|
||||||
#undef _MINIX
|
|
||||||
|
|
||||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
|
||||||
this defined. */
|
|
||||||
#undef _POSIX_1_SOURCE
|
|
||||||
|
|
||||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
|
||||||
#undef _POSIX_SOURCE
|
|
||||||
Vendored
-1563
File diff suppressed because it is too large
Load Diff
+7
-5
@@ -1,18 +1,20 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
F90=gfortran
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
$@ \
|
$@ \
|
||||||
--enable-parallel \
|
--enable-parallel \
|
||||||
--enable-fortran \
|
--enable-fortran \
|
||||||
--enable-tools \
|
--enable-tools \
|
||||||
CC=cc CXX=CC FC=pgf90 \
|
CC=cc CXX=CC FC=$F90 \
|
||||||
MPICC=cc MPICXX=CC MPIFC=ftn
|
MPICC=cc MPICXX=CC MPIFC=ftn
|
||||||
sed -e 's/pgf90/ftn/g' <Makefile > newMakefile
|
sed -e 's/$F90/ftn/g' <Makefile > newMakefile
|
||||||
mv newMakefile Makefile
|
mv newMakefile Makefile
|
||||||
sed -e 's/pgf90/ftn/g' <src/Makefile > newMakefile
|
sed -e 's/$F90/ftn/g' <src/Makefile > newMakefile
|
||||||
mv newMakefile src/Makefile
|
mv newMakefile src/Makefile
|
||||||
sed -e 's/pgf90/ftn/g' <test/Makefile > newMakefile
|
sed -e 's/$F90/ftn/g' <test/Makefile > newMakefile
|
||||||
mv newMakefile test/Makefile
|
mv newMakefile test/Makefile
|
||||||
sed -e 's/pgf90/ftn/g' <tools/Makefile > newMakefile
|
sed -e 's/$F90/ftn/g' <tools/Makefile > newMakefile
|
||||||
mv newMakefile tools/Makefile
|
mv newMakefile tools/Makefile
|
||||||
|
|
||||||
|
|||||||
+184
-471
@@ -1,18 +1,24 @@
|
|||||||
# Every configure script must call AC_INIT before doing anything else.
|
# Every configure script must call AC_INIT before doing anything else.
|
||||||
# AC_INIT (package, version, [bug-report], [tarname])
|
# AC_INIT (package, version, [bug-report], [tarname])
|
||||||
AC_INIT([H5Part], [1.6.0], [h5part@lists.psi.ch], H5Part)
|
AC_INIT([H5Part], [1.6.4], [h5part@lists.psi.ch], H5Part)
|
||||||
|
|
||||||
|
|
||||||
# Ensure that a recent enough version of Autoconf is being used.
|
# 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,
|
# 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.
|
# print an error message to the standard error output and do not create configure.
|
||||||
#AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
|
|
||||||
|
|
||||||
# should be called right after AC_INIT.
|
# should be called right after AC_INIT.
|
||||||
# configure scripts can create a C header file containing `#define' directives.
|
# configure scripts can create a C header file containing `#define' directives.
|
||||||
# The AC_CONFIG_HEADERS macro selects this kind of output.
|
# The AC_CONFIG_HEADERS macro selects this kind of output.
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADERS(config.h)
|
||||||
|
|
||||||
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
|
# AM_INIT_AUTOMAKE is required to use autoconf with automake
|
||||||
|
AM_INIT_AUTOMAKE
|
||||||
|
|
||||||
|
BUILD_LIBS='libH5Part'
|
||||||
|
BUILD_TESTS='test'
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
################# --enable-xxx and --with-xxx Argument ########################
|
################# --enable-xxx and --with-xxx Argument ########################
|
||||||
@@ -21,32 +27,20 @@ AC_CONFIG_HEADER(config.h)
|
|||||||
AC_ARG_ENABLE(
|
AC_ARG_ENABLE(
|
||||||
[debug],
|
[debug],
|
||||||
[AC_HELP_STRING([--enable-debug],
|
[AC_HELP_STRING([--enable-debug],
|
||||||
[Compile with debug support [default=no]])],
|
[Compile with debug flags [default=no]])],
|
||||||
[USE_DEBUG=$enableval])
|
[USE_DEBUG=$enableval])
|
||||||
|
|
||||||
AC_ARG_ENABLE(
|
|
||||||
[shared],
|
|
||||||
[AC_HELP_STRING([--enable-shared],
|
|
||||||
[Compile with shared library support [default=no]])],
|
|
||||||
[USE_SHARED=$enableval])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(
|
|
||||||
[64],
|
|
||||||
[AC_HELP_STRING([--enable-64],
|
|
||||||
[Compile using 64-bit flags [default=no]])],
|
|
||||||
[USE_64=$enableval])
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(
|
AC_ARG_ENABLE(
|
||||||
[fortran],
|
[fortran],
|
||||||
[AC_HELP_STRING([--enable-fortran],
|
[AC_HELP_STRING([--enable-fortran],
|
||||||
[Compile the Fortran interface [default=no]])],
|
[Compile the Fortran interface [default=no]])],
|
||||||
[USE_FORTRAN=$enableval])
|
[USE_FORTRAN=$enableval])
|
||||||
|
|
||||||
AC_ARG_ENABLE(
|
AC_ARG_ENABLE(
|
||||||
[parallel],
|
[parallel],
|
||||||
[AC_HELP_STRING([--enable-parallel],
|
[AC_HELP_STRING([--enable-parallel],
|
||||||
[Compile the MPI/IO interface [default=no]])],
|
[Compile the MPI/IO interface [default=no]])],
|
||||||
[USE_PARALLEL=$enableval])
|
[USE_PARALLEL=$enableval])
|
||||||
|
|
||||||
AC_ARG_ENABLE(
|
AC_ARG_ENABLE(
|
||||||
[tools],
|
[tools],
|
||||||
@@ -55,35 +49,11 @@ AC_ARG_ENABLE(
|
|||||||
[USE_TOOLS=$enableval])
|
[USE_TOOLS=$enableval])
|
||||||
|
|
||||||
AC_ARG_WITH(
|
AC_ARG_WITH(
|
||||||
[mpipath],
|
[hdf5],
|
||||||
[AC_HELP_STRING([--with-mpipath],
|
[AC_HELP_STRING([--with-hdf5],
|
||||||
[path to MPI installation [default=""]])],
|
|
||||||
[MPIPATH=$withval], [MPIPATH=""])
|
|
||||||
|
|
||||||
AC_ARG_WITH(
|
|
||||||
[hdf5path],
|
|
||||||
[AC_HELP_STRING([--with-hdf5path],
|
|
||||||
[path to HDF5 installation [default=""]])],
|
[path to HDF5 installation [default=""]])],
|
||||||
[HDF5PATH=$withval], [HDF5PATH=""])
|
[HDF5PATH=$withval], [HDF5PATH=""])
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
################# 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_LDFLAGS=$LDFLAGS
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
############### PATH SERACH FUNCTION - to be used later... ####################
|
############### PATH SERACH FUNCTION - to be used later... ####################
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -96,35 +66,26 @@ SAVE_LDFLAGS=$LDFLAGS
|
|||||||
# @enddesc
|
# @enddesc
|
||||||
#@@*/
|
#@@*/
|
||||||
|
|
||||||
PATH_Search()
|
PATH_Search() {
|
||||||
{
|
eval $1=""
|
||||||
eval $1=""
|
if test $# -lt 4 ; then
|
||||||
if test $# -lt 4 ; then
|
h5part_basedir=""
|
||||||
h5part_basedir=""
|
else
|
||||||
else
|
h5part_basedir="$4/"
|
||||||
h5part_basedir="$4/"
|
fi
|
||||||
fi
|
for h5part_place in $2; do
|
||||||
for h5part_place in $2
|
AC_MSG_CHECKING([looking in $h5part_place ... ])
|
||||||
do
|
if test -r "$h5part_basedir$h5part_place/$3" ; then
|
||||||
echo -n "looking in $h5part_place ... $ac_c" #1>&6
|
AC_MSG_RESULT([found])
|
||||||
if test -r "$h5part_basedir$h5part_place/$3" ; then
|
eval $1="$h5part_place"
|
||||||
echo "$ac_t"" found" #1>&6
|
break
|
||||||
eval $1="$h5part_place"
|
fi
|
||||||
break
|
AC_MSG_RESULT([no])
|
||||||
fi
|
done
|
||||||
if test -d "$h5part_basedir$h5part_place/$3" ; then
|
return
|
||||||
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 ################
|
############# MISC SETTINGS INCLUDING C & C++ COMPILER SETTING ################
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -132,82 +93,37 @@ PATH_Search()
|
|||||||
# individual parts host_cpu, host_vendor, and host_os.
|
# individual parts host_cpu, host_vendor, and host_os.
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
|
||||||
uname=`uname -s`
|
# Determine a C/C++ compiler to use.
|
||||||
if test $uname = "AIX"; then
|
|
||||||
AC_MSG_CHECKING([if system is AIX])
|
|
||||||
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
|
# If CC is not already set in the environment, check for gcc and cc, then
|
||||||
# for other C compilers.
|
# for other C compilers.
|
||||||
# Set output variable CC to the name of the compiler found.
|
# Set output variable CC to the name of the compiler found.
|
||||||
AC_PROG_CC(pathcc icc cc_r gcc cc)
|
if test "x$USE_PARALLEL" = "xyes"; then
|
||||||
|
CCOMPILERS="mpicc cc"
|
||||||
|
CXXCOMPILERS="mpic++ mpicxx CC"
|
||||||
|
else
|
||||||
|
CCOMPILERS="pgcc pathcc icc gcc cc_r cc"
|
||||||
|
CXXCOMPILERS="pgCC pathCC icpc g++"
|
||||||
|
fi
|
||||||
|
|
||||||
# AC_PROG_CC doesn't pick up cc_r in Bassi. The following AC_PATH_PROGS
|
AC_PROG_CC($CCOMPILERS)
|
||||||
# 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)
|
|
||||||
|
|
||||||
|
# Only need C++ for some of the tools
|
||||||
|
#if test "x$USE_TOOLS" = "xyes"; then
|
||||||
|
AC_PROG_CXX($CXXCOMPILERS)
|
||||||
|
#fi
|
||||||
|
|
||||||
# Set output variable INSTALL to the path of a BSD-compatible install program,
|
# Set output variable INSTALL to the path of a BSD-compatible install program,
|
||||||
# if one is found in the current PATH.
|
# if one is found in the current PATH.
|
||||||
# Otherwise, set INSTALL to `dir/install-sh -c`
|
# Otherwise, set INSTALL to `dir/install-sh -c`
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
|
AC_PROG_AWK
|
||||||
# AM_INIT_AUTOMAKE is required to use autoconf with automake
|
|
||||||
AM_INIT_AUTOMAKE()
|
|
||||||
|
|
||||||
|
|
||||||
AC_PROG_RANLIB
|
|
||||||
|
|
||||||
# Default prefix for bindir, etc... (eg >> ./build/bin)
|
# Default prefix for bindir, etc... (eg >> ./build/bin)
|
||||||
AC_PREFIX_DEFAULT(`pwd`/build)
|
AC_PREFIX_DEFAULT(`pwd`/build)
|
||||||
|
|
||||||
|
|
||||||
# AC_DEFINE_UNQUOTED (variable, value, [description])
|
# AC_DEFINE_UNQUOTED (variable, value, [description])
|
||||||
# Define the C preprocessor variable variable to value
|
# Define the C preprocessor variable variable to value
|
||||||
# Use this macro instead of AC_DEFINE when variable or value is a shell variable.
|
# Use this macro instead of AC_DEFINE when variable or value is a shell variable.
|
||||||
@@ -218,7 +134,6 @@ AC_DEFINE_UNQUOTED(MY_GNUNAME, "${host_cpu}-${host_vendor}-${host_os}", "")
|
|||||||
AC_DEFINE_UNQUOTED(MY_UNAME, "$uname", "")
|
AC_DEFINE_UNQUOTED(MY_UNAME, "$uname", "")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
######################## CONFIGURE LINE OPTIONS ###############################
|
######################## CONFIGURE LINE OPTIONS ###############################
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -228,215 +143,92 @@ AC_MSG_CHECKING([if debug is enabled])
|
|||||||
if test "X$USE_DEBUG" = "Xyes"; then
|
if test "X$USE_DEBUG" = "Xyes"; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
CFLAGS="$CFLAGS -g"
|
CFLAGS="$CFLAGS -g"
|
||||||
|
CXXFLAGS="$CXXFLAGS -g"
|
||||||
|
FFLAGS="$FFLAGS -g"
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shared library
|
|
||||||
AC_MSG_CHECKING([if shared libraries are enabled])
|
|
||||||
|
|
||||||
if test "X$USE_SHARED" = "Xyes"; then
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
CFLAGS="$CFLAGS -fPIC"
|
|
||||||
FFLAGS="$FFLAGS -fPIC"
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
fi
|
|
||||||
|
|
||||||
###################### 64-bit compilation enabled #############################
|
|
||||||
AC_MSG_CHECKING([if 64-bit compilation is enabled])
|
|
||||||
|
|
||||||
|
|
||||||
# If --enable-64 is set in the configure line
|
|
||||||
if test "X$USE_64" = "Xyes"; then
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
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
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
############################ fortran enabled ##################################
|
############################ fortran enabled ##################################
|
||||||
AC_MSG_CHECKING([if fortran interface enabled])
|
AC_MSG_CHECKING([if fortran interface enabled])
|
||||||
if test "X$USE_FORTRAN" = "Xyes"; then
|
if test "X$USE_FORTRAN" = "Xyes"; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
|
LIB_FORTRAN="libH5PartF.la"
|
||||||
|
BUILD_LIBS="$BUILD_LIBS libH5PartF"
|
||||||
|
BUILD_TESTS="$BUILD_TESTS testf"
|
||||||
|
|
||||||
AC_PROG_FC(ifort xlf_r pathf90 g95 g90 ftn gfortran)
|
if test "X$USE_PARALLEL" = "Xyes"; then
|
||||||
if test -z "$FC" ; then
|
AC_PROG_FC(mpif90 mpif77 ftn)
|
||||||
AC_MSG_ERROR([Cannot find a fortran compiler!!!])
|
else
|
||||||
exit 1
|
AC_PROG_FC(pgf90 pathf90 ifort ftn xlf_r g95 g90 gfortran)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test ! $uname = "AIX"; then
|
if test -z "$FC" ; then
|
||||||
FFLAGS="${FFLAGS} -fPIC"
|
AC_MSG_ERROR([Cannot find a Fortran compiler!])
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if test $FC = "g90"; then
|
if test $FC = "g90"; then
|
||||||
FFLAGS="${FFLAGS} -fno-second-underscore"
|
FFLAGS="${FFLAGS} -fno-second-underscore"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $FC = "g95"; then
|
if test $FC = "g95"; then
|
||||||
FFLAGS="${FFLAGS} -fno-second-underscore"
|
FFLAGS="${FFLAGS} -fno-second-underscore"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $FC = "gfortran"; then
|
AC_MSG_CHECKING([symbol convention in object files])
|
||||||
FFLAGS="${FFLAGS} -DHAVE_GFORTRAN"
|
`cd src && rm -f TestUnderscore.o TestUnderscoreC.o TestUnderscore`
|
||||||
fi
|
`cd src && ${FC} ${FFLAGS} -c TestUnderscore.f`
|
||||||
|
`cd src && ${CC} ${CFLAGS} -c TestUnderscoreC.c`
|
||||||
|
`cd src && ${FC} ${FFLAGS} -o TestUnderscore TestUnderscore.o TestUnderscoreC.o`
|
||||||
|
|
||||||
AC_MSG_CHECKING([symbol convention in object files])
|
if test -f src/TestUnderscore ; then
|
||||||
`cd src && rm -f TestUnderscore.o TestUnderscoreC.o TestUnderscore`
|
UNDERSCORE_H=Underscore.h
|
||||||
`cd src && ${FC} ${FFLAGS} -c TestUnderscore.f`
|
`cd src && ./TestUnderscore > Underscore.h`
|
||||||
`cd src && ${CC} ${CFLAGS} -c TestUnderscoreC.c`
|
AC_MSG_RESULT([ok])
|
||||||
`cd src && ${FC} ${FFLAGS} -o TestUnderscore TestUnderscore.o TestUnderscoreC.o -lc`
|
else
|
||||||
|
AC_MSG_RESULT([nok])
|
||||||
|
AC_MSG_ERROR([Cannot determine the symbon convention for Fortran object files!])
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if test -f src/TestUnderscore ; then
|
|
||||||
UNDERSCORE_H=Underscore.h
|
|
||||||
`cd src && ./TestUnderscore > Underscore.h`
|
|
||||||
AC_MSG_RESULT([ok])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([nok])
|
|
||||||
AC_MSG_ERROR([Cannot build fortran executables!!!])
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Disable shared libraries by default: can be enabled with --enable-shared
|
||||||
|
LT_INIT([disable-shared])
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
|
||||||
######################## parallel interface enabled ###########################
|
######################## parallel interface enabled ###########################
|
||||||
AC_MSG_CHECKING([if parallel interface enabled])
|
AC_MSG_CHECKING([if parallel interface enabled])
|
||||||
if test "X$USE_PARALLEL" = "Xyes"; then
|
if test "X$USE_PARALLEL" = "Xyes"; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
|
|
||||||
CFLAGS="${CFLAGS} -DPARALLEL_IO -DH5_HAVE_PARALLEL -DMPICH_IGNORE_CXX_SEEK"
|
CFLAGS="${CFLAGS} -DPARALLEL_IO -DMPICH_IGNORE_CXX_SEEK"
|
||||||
|
CXXFLAGS="${CXXFLAGS} -DPARALLEL_IO -DMPICH_IGNORE_CXX_SEEK"
|
||||||
|
FFLAGS="${FFLAGS} -DPARALLEL_IO"
|
||||||
|
|
||||||
AC_MSG_CHECKING([if we can compile MPI code without setting flags])
|
AC_MSG_CHECKING([if we can compile MPI code without setting flags])
|
||||||
AC_TRY_LINK([#include "mpi.h"], [
|
AC_TRY_LINK([#include "mpi.h"], [
|
||||||
MPI_Comm comm;
|
MPI_Comm comm;
|
||||||
int n;
|
int n;
|
||||||
MPI_Comm_size( comm, &n ); ],
|
MPI_Comm_size( comm, &n ); ],
|
||||||
[echo 'yes'; r='yes'], [echo "no"; r='no'] )
|
[AC_MSG_RESULT([yes]); r='yes'], [AC_MSG_RESULT([no]); r='no'] )
|
||||||
|
|
||||||
if test "X$r" = "Xno"; then
|
if test "X$r" = "Xno"; then
|
||||||
AC_PATH_PROGS([MPICC], [mpicc mpcc_r], [], [$PATH])
|
AC_MSG_ERROR([MPI wrapper can't compile or link MPI program! Please set the INCLUDE and LIBS variables manually.])
|
||||||
AC_PATH_PROGS([MPICXX], [mpicxx mpcc_r], [], [$PATH])
|
exit 1
|
||||||
if test -z "$MPICC" -o -z "$MPICXX"; then
|
|
||||||
AC_MSG_CHECKING([for MPI root ])
|
|
||||||
AC_MSG_RESULT([])
|
|
||||||
if test -n "$MPIROOT"; then
|
|
||||||
P=${MPIROOT}
|
|
||||||
elif test -n "$MPIHOME"; then
|
|
||||||
P=${MPIHOME}
|
|
||||||
elif test -n "$MPIPATH"; then
|
|
||||||
P=${MPIPATH}
|
|
||||||
else
|
|
||||||
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"
|
|
||||||
fi
|
|
||||||
PATH_Search MPIROOT "$P" include/mpi.h
|
|
||||||
if test ! -n "$MPIROOT"; then
|
|
||||||
AC_MSG_ERROR([Cannot determine MPI root!!!])
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -e "${MPIROOT}/bin/mpicc"; then
|
|
||||||
MPICC=${MPIROOT}/bin/mpicc
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -e "${MPIROOT}/bin/mpicxx"; then
|
|
||||||
MPICXX=${MPIROOT}/bin/mpicxx
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$MPICC" -o -z "$MPICXX"; then
|
|
||||||
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
|
|
||||||
|
|
||||||
if test -n "$MPICC"; then
|
|
||||||
CC=${MPICC}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$MPICXX"; then
|
|
||||||
CXX=${MPICXX}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
H5P_LIB_NAME="-lpH5Part"
|
|
||||||
MTARGET="libpH5Part.a"
|
|
||||||
TTARGET="test"
|
|
||||||
|
|
||||||
|
|
||||||
# parallel + fortran
|
|
||||||
if test "X$USE_FORTRAN" = "Xyes"; then
|
|
||||||
AC_PATH_PROGS([MPIFC], [mpxlf_r mpif90], [], [$PATH])
|
|
||||||
|
|
||||||
FFLAGS="${FFLAGS} -DPARALLEL_IO"
|
|
||||||
|
|
||||||
if test -z "${MPIFC}" ; then
|
|
||||||
if test -e "${MPIROOT}/bin/mpif90"; then
|
|
||||||
MPIFC=${MPIROOT}/bin/mpif90
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if MPIFC empty
|
|
||||||
if test ! -n "$MPIFC"; then
|
|
||||||
AC_MSG_CHECKING([ No MPIFC detected. Setting MPIFC to FC.])
|
|
||||||
MPIFC=$FC
|
|
||||||
echo "MPIFC = $MPIFC ..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$MPIFC"; then
|
|
||||||
FC=${MPIFC}
|
|
||||||
fi
|
|
||||||
|
|
||||||
H5P_LIB_NAME="-lpH5PartF"
|
|
||||||
MTARGET="${MTARGET} libpH5PartF.a"
|
|
||||||
TTARGET="${TTARGET} testf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
else # --enable-parallel=no
|
else # --enable-parallel=no
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
|
|
||||||
H5P_LIB_NAME="-lH5Part"
|
|
||||||
MTARGET="libH5Part.a"
|
|
||||||
TTARGET="test"
|
|
||||||
|
|
||||||
if test "X$USE_FORTRAN" = "Xyes"; then
|
|
||||||
H5P_LIB_NAME="-lH5PartF"
|
|
||||||
MTARGET="${MTARGET} libH5PartF.a"
|
|
||||||
TTARGET="${TTARGET} testf"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
######################## tools enabled ###########################
|
||||||
AC_MSG_CHECKING([whether tools are enabled])
|
AC_MSG_CHECKING([whether tools are enabled])
|
||||||
if test "X$USE_TOOLS" = "Xyes"; then
|
if test "X$USE_TOOLS" = "Xyes"; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@@ -449,171 +241,96 @@ else
|
|||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
######################### PATH CHECKING & SETTING #############################
|
######################### PATH CHECKING & SETTING #############################
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
AC_MSG_CHECKING([for HDF5 root ])
|
AC_MSG_CHECKING([for HDF5 root ])
|
||||||
AC_MSG_RESULT([])
|
AC_MSG_RESULT([])
|
||||||
if test -n "${HDF5ROOT}"; then
|
if test -n "${HDF5PATH}" ; then
|
||||||
P=${HDF5ROOT}
|
P=${HDF5PATH}
|
||||||
|
elif test -n "${HDF5ROOT}"; then
|
||||||
|
P=${HDF5ROOT}
|
||||||
elif test -n "${HDF5HOME}" ; then
|
elif test -n "${HDF5HOME}" ; then
|
||||||
P=${HDF5HOME}
|
P=${HDF5HOME}
|
||||||
elif test -n "${HDF5PATH}" ; then
|
elif test -n "${HDF5_DIR}" ; then
|
||||||
P=${HDF5PATH}
|
P=${HDF5_DIR}
|
||||||
else
|
else
|
||||||
P=''
|
P=''
|
||||||
P="$P /usr"
|
P="$P /usr"
|
||||||
P="$P /usr/local"
|
P="$P /usr/local"
|
||||||
P="$P /usr/local/hdf5"
|
P="$P /usr/local/hdf5"
|
||||||
P="$P /usr/local/packages/hdf5"
|
P="$P /usr/local/packages/hdf5"
|
||||||
P="$P /apps/hdf5"
|
P="$P /apps/hdf5"
|
||||||
|
P="$P /opt/hdf5"
|
||||||
if test "X$USE_PARALLEL" = "Xyes"; then
|
|
||||||
P="$P /usr/local/phdf5"
|
|
||||||
P="$P /usr/local/hdf5/hdf5_par"
|
|
||||||
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
|
|
||||||
else
|
|
||||||
P="$P /usr/local/hdf5/hdf5_serial"
|
|
||||||
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
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
PATH_Search HDF5ROOT "$P" include/hdf5.h
|
PATH_Search HDF5ROOT "$P" include/hdf5.h
|
||||||
if test -z "$HDF5ROOT"; then
|
if test -z "$HDF5ROOT"; then
|
||||||
AC_MSG_ERROR([Cannot determine HDF5 root!!!])
|
AC_MSG_ERROR([Cannot find an HDF5 library!])
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
INCLUDES="$INCLUDES -I$HDF5ROOT/include"
|
||||||
|
LDFLAGS="$LDFLAGS -L$HDF5ROOT/lib"
|
||||||
|
LIBS="$LIBS -lhdf5"
|
||||||
|
|
||||||
AC_MSG_CHECKING([if we need to link to libsz ])
|
AC_MSG_CHECKING([if we need to link to libsz ])
|
||||||
if test -n "$HDF5ROOT"; then
|
if test -n "$HDF5ROOT"; then
|
||||||
if test -f $HDF5ROOT/lib/libsz.a; then
|
if test -f $HDF5ROOT/lib/libsz.a; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
SZLIB="-L$HDF5ROOT/lib/ -lsz"
|
LDFLAGS="$LDFLAGS -L$HDF5ROOT/lib"
|
||||||
else
|
LIBS="$LIBS -lsz"
|
||||||
AC_MSG_RESULT([no])
|
else
|
||||||
SZLIB=""
|
AC_MSG_RESULT([no])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([for static zlib root ])
|
LIBS="$LIBS -lz -lm"
|
||||||
echo
|
|
||||||
PATH_Search ZLIBROOT '/apps/zlib' lib/libz.a
|
|
||||||
if test -n "$ZLIBROOT"; then
|
|
||||||
LDFLAGS="$LDFLAGS -L$ZLIBROOT/lib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
FCFLAGS=${FFLAGS}
|
|
||||||
CXXFLAGS=${CFLAGS}
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
# Checks for header files.
|
||||||
#################### MISC SETTINGS - path, flags, etc #########################
|
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
H5P_LIB_LOC=`pwd`/src
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_HEADER_STDBOOL
|
||||||
|
AC_TYPE_INT64_T
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_TYPE_SSIZE_T
|
||||||
|
|
||||||
###############################################################################
|
# Checks for library functions.
|
||||||
################# A SIMPLE WORK AROUND TO USE ENV. VARS #######################
|
AC_FUNC_MALLOC
|
||||||
###############################################################################
|
AC_CHECK_FUNCS([memset pow strchr strdup])
|
||||||
|
|
||||||
#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 ${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_LDFLAGS"; then
|
|
||||||
LDFLAGS=$SAVE_LDFLAGS
|
|
||||||
fi
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
############## EXPORTING VARIABLES & CREATING OUTPUT FILES ####################
|
############## EXPORTING VARIABLES & CREATING OUTPUT FILES ####################
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# AC_SUBST (variable, [value])
|
# AC_SUBST (variable, [value])
|
||||||
# Create an output variable from a shell variable.
|
# Create an output variable from a shell variable. Make AC_OUTPUT substitute
|
||||||
# Make AC_OUTPUT substitute the variable variable into output files (typically one or more `Makefile's).
|
# 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
|
# This means that AC_OUTPUT will replace instances of `@variable@' in input
|
||||||
# the shell variable variable has when AC_OUTPUT is called.
|
# files with the value that the shell variable variable has when AC_OUTPUT is
|
||||||
# This value of variable should not contain literal newlines.
|
# called. This value of variable should not contain literal newlines. If
|
||||||
# If value is given, in addition assign it to variable.
|
# value is given, in addition assign it to variable.
|
||||||
AC_SUBST(MPIROOT)
|
|
||||||
AC_SUBST(HDF5ROOT)
|
|
||||||
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(CFLAGS)
|
||||||
|
AC_SUBST(CXXFLAGS)
|
||||||
AC_SUBST(FFLAGS)
|
AC_SUBST(FFLAGS)
|
||||||
AC_SUBST(STDCXX)
|
AC_SUBST(INCLUDES)
|
||||||
AC_SUBST(H5P_LIB_LOC)
|
|
||||||
AC_SUBST(H5P_LIB_NAME)
|
|
||||||
AC_SUBST(UNDERSCORE_H)
|
|
||||||
AC_SUBST(BUILD_TOOLS)
|
|
||||||
AC_SUBST(LDFLAGS)
|
AC_SUBST(LDFLAGS)
|
||||||
|
AC_SUBST(LIBS)
|
||||||
|
AC_SUBST(UNDERSCORE_H)
|
||||||
|
AC_SUBST(LIB_FORTRAN)
|
||||||
|
AC_SUBST(BUILD_TESTS)
|
||||||
|
AC_SUBST(BUILD_TOOLS)
|
||||||
|
|
||||||
# Make AC_OUTPUT create each `file' by copying an input file (by default `file.in'),
|
# Make AC_OUTPUT create each `file' by copying an input file (by default `file.in'),
|
||||||
# substituting the output variable values.
|
# substituting the output variable values.
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
doc/Makefile
|
src/Makefile
|
||||||
src/Makefile
|
doc/Makefile
|
||||||
test/Makefile
|
test/Makefile
|
||||||
tools/Makefile
|
tools/Makefile
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
@@ -621,27 +338,23 @@ AC_OUTPUT
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
########################## PRINTING SUMMARY ###################################
|
########################## PRINTING SUMMARY ###################################
|
||||||
###############################################################################
|
###############################################################################
|
||||||
echo
|
AC_MSG_RESULT([ ])
|
||||||
echo
|
AC_MSG_RESULT([Summary:])
|
||||||
echo "Summary for `(hostname || uname -n) 2>/dev/null | sed 1q`:"
|
AC_MSG_RESULT([ ])
|
||||||
echo
|
AC_MSG_RESULT([Host OS: $host_os])
|
||||||
echo "Host OS: $host_os"
|
AC_MSG_RESULT([Host CPU: $host_cpu])
|
||||||
echo "Host CPU: $host_cpu"
|
AC_MSG_RESULT([Host vendor: $host_vendor])
|
||||||
echo "Host vendor: $host_vendor"
|
AC_MSG_RESULT([Build libraries: $BUILD_LIBS])
|
||||||
echo "Build libraries: $MTARGET"
|
AC_MSG_RESULT([Build test programs: $BUILD_TESTS])
|
||||||
echo "Build test programs: $TTARGET"
|
AC_MSG_RESULT([Build tools: $BUILD_TOOLS])
|
||||||
echo "Build tools: $BUILD_TOOLS"
|
AC_MSG_RESULT([CC = $CC])
|
||||||
echo "CC = $CC"
|
AC_MSG_RESULT([CXX = $CXX])
|
||||||
echo "CXX = $CXX"
|
AC_MSG_RESULT([FC = $FC])
|
||||||
echo "FC = $FC"
|
AC_MSG_RESULT([CFLAGS = $CFLAGS])
|
||||||
echo "MPICC = $MPICC"
|
AC_MSG_RESULT([CXXFLAGS = $CXXFLAGS])
|
||||||
echo "MPICXX = $MPICXX"
|
AC_MSG_RESULT([FFLAGS = $FFLAGS])
|
||||||
echo "MPIFC = $MPIFC"
|
AC_MSG_RESULT([INCLUDES = $INCLUDES])
|
||||||
echo "CFLAGS = $CFLAGS"
|
AC_MSG_RESULT([LDFLAGS = $LDFLAGS])
|
||||||
echo "FFLAGS = $FFLAGS"
|
AC_MSG_RESULT([LIBS = $LIBS])
|
||||||
echo "MPILIB = $MPILIB"
|
AC_MSG_RESULT([HDF5ROOT = $HDF5ROOT])
|
||||||
echo "MPIINC = $MPIINC"
|
AC_MSG_RESULT([ ])
|
||||||
echo "MPIROOT = $MPIROOT"
|
|
||||||
echo "HDF5ROOT = $HDF5ROOT"
|
|
||||||
echo "LDFLAGS = $LDFLAGS"
|
|
||||||
echo
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
# Project related configuration options
|
# Project related configuration options
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
PROJECT_NAME = H5Part
|
PROJECT_NAME = H5Part
|
||||||
PROJECT_NUMBER = 1.6.0
|
PROJECT_NUMBER = 1.6.1
|
||||||
OUTPUT_DIRECTORY = ./ReferencePages
|
OUTPUT_DIRECTORY = ./ReferencePages
|
||||||
CREATE_SUBDIRS = NO
|
CREATE_SUBDIRS = NO
|
||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <mpi.h>
|
||||||
|
#include <H5Part.h>
|
||||||
|
|
||||||
|
#define DATASIZE 32
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
int i, rank, nprocs;
|
||||||
|
h5part_int32_t data[DATASIZE];
|
||||||
|
h5part_int64_t stat;
|
||||||
|
H5PartFile *file;
|
||||||
|
|
||||||
|
// initialize MPI
|
||||||
|
MPI_Init (&argc, &argv);
|
||||||
|
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
|
||||||
|
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
|
||||||
|
|
||||||
|
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
|
||||||
|
|
||||||
|
char filename[8];
|
||||||
|
sprintf (filename, "%d.h5", rank);
|
||||||
|
|
||||||
|
file = H5PartOpenFileParallel(
|
||||||
|
filename,
|
||||||
|
H5PART_WRITE | H5PART_VFD_CORE,
|
||||||
|
MPI_COMM_SELF);
|
||||||
|
assert (file != NULL);
|
||||||
|
|
||||||
|
stat = H5PartSetStep(file, 0);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
|
||||||
|
stat = H5PartSetNumParticles(file, DATASIZE);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
|
||||||
|
// create fake data
|
||||||
|
for (i=0; i<DATASIZE; i++) {
|
||||||
|
data[i] = i + rank * DATASIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// write the data
|
||||||
|
stat = H5PartWriteDataInt32(file, "data", data);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
|
||||||
|
H5PartCloseFile(file);
|
||||||
|
|
||||||
|
MPI_Finalize();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <mpi.h>
|
||||||
|
#include <H5Part.h>
|
||||||
|
|
||||||
|
#define XSIZE 8
|
||||||
|
#define YSIZE 8
|
||||||
|
#define ZSIZE 8
|
||||||
|
#define DATASIZE XSIZE*YSIZE*ZSIZE
|
||||||
|
#define H5OpenFileParallel H5PartOpenFileParallel
|
||||||
|
#define H5SetStep H5PartSetStep
|
||||||
|
#define H5Block3dSetLayout H5BlockDefine3DFieldLayout
|
||||||
|
#define H5CloseFile H5PartCloseFile
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
int rank, nprocs;
|
||||||
|
h5part_float64_t ex[DATASIZE];
|
||||||
|
h5part_float64_t ey[DATASIZE];
|
||||||
|
h5part_float64_t ez[DATASIZE];
|
||||||
|
h5part_float64_t q[DATASIZE];
|
||||||
|
h5part_int64_t nparticles = DATASIZE;
|
||||||
|
H5PartFile *file;
|
||||||
|
|
||||||
|
// initialize MPI
|
||||||
|
MPI_Init (&argc, &argv);
|
||||||
|
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
|
||||||
|
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
|
||||||
|
|
||||||
|
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
|
||||||
|
|
||||||
|
file = H5OpenFileParallel("fields.h5", H5PART_WRITE, MPI_COMM_WORLD);
|
||||||
|
H5SetStep(file, 0);
|
||||||
|
H5Block3dSetLayout(file,
|
||||||
|
rank*XSIZE, (rank+1)*XSIZE - 1,
|
||||||
|
0, YSIZE - 1,
|
||||||
|
0, ZSIZE - 1);
|
||||||
|
H5Block3dWriteScalarFieldFloat64(file, "Q", q);
|
||||||
|
H5Block3dWrite3dVectorFieldFloat64(file, "E", ex, ez, ey);
|
||||||
|
H5CloseFile(file);
|
||||||
|
|
||||||
|
MPI_Finalize();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <mpi.h>
|
||||||
|
#include <H5Part.h>
|
||||||
|
|
||||||
|
#define DATASIZE 32
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
int rank, nprocs;
|
||||||
|
h5part_float64_t x[DATASIZE];
|
||||||
|
h5part_float64_t y[DATASIZE];
|
||||||
|
h5part_float64_t z[DATASIZE];
|
||||||
|
h5part_float64_t px[DATASIZE];
|
||||||
|
h5part_float64_t py[DATASIZE];
|
||||||
|
h5part_float64_t pz[DATASIZE];
|
||||||
|
h5part_int64_t nparticles = DATASIZE;
|
||||||
|
H5PartFile *file;
|
||||||
|
|
||||||
|
// initialize MPI
|
||||||
|
MPI_Init (&argc, &argv);
|
||||||
|
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
|
||||||
|
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
|
||||||
|
|
||||||
|
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
|
||||||
|
|
||||||
|
file = H5PartOpenFileParallel("particles.h5", H5PART_WRITE, MPI_COMM_WORLD);
|
||||||
|
H5PartSetStep(file, 0);
|
||||||
|
H5PartSetNumParticles(file, nparticles);
|
||||||
|
H5PartWriteDataFloat64(file, "x", x);
|
||||||
|
H5PartWriteDataFloat64(file, "y", y);
|
||||||
|
H5PartWriteDataFloat64(file, "z", z);
|
||||||
|
H5PartWriteDataFloat64(file, "px", px);
|
||||||
|
H5PartWriteDataFloat64(file, "py", py);
|
||||||
|
H5PartWriteDataFloat64(file, "pz", pz);
|
||||||
|
H5PartCloseFile(file);
|
||||||
|
|
||||||
|
MPI_Finalize();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
program H5PartTest
|
||||||
|
implicit none
|
||||||
|
|
||||||
|
include 'mpif.h'
|
||||||
|
include 'H5PartF.h'
|
||||||
|
|
||||||
|
integer :: comm, rank, ierr
|
||||||
|
integer*8 :: file_id, status, npoints, i
|
||||||
|
real*8, allocatable :: particles(:)
|
||||||
|
integer*8, allocatable :: id(:)
|
||||||
|
real*8 :: r8val
|
||||||
|
integer*8 :: i8val
|
||||||
|
|
||||||
|
comm = MPI_COMM_WORLD
|
||||||
|
call mpi_init(ierr)
|
||||||
|
call mpi_comm_rank(comm, rank, ierr)
|
||||||
|
|
||||||
|
! open the a file for parallel writing
|
||||||
|
file_id = h5pt_set_verbosity_level(5)
|
||||||
|
file_id = h5pt_openw_par('test.h5', comm)
|
||||||
|
|
||||||
|
! in the Fortran API, time steps start at 1
|
||||||
|
status = h5pt_setstep(file_id, 1_8)
|
||||||
|
|
||||||
|
! write an attribute to the file
|
||||||
|
status = h5pt_writefileattrib_string(file_id, 'desc', 'This is a test.')
|
||||||
|
|
||||||
|
r8val = 0.5
|
||||||
|
i8val = 1
|
||||||
|
status = h5pt_writefileattrib_r8(file_id, 'double', r8val, i8val)
|
||||||
|
|
||||||
|
! create fake data
|
||||||
|
npoints = 99
|
||||||
|
allocate(particles(npoints), id(npoints))
|
||||||
|
do i=1,npoints
|
||||||
|
particles(i) = real(i+npoints*rank)
|
||||||
|
id(i) = i+npoints*rank
|
||||||
|
enddo
|
||||||
|
|
||||||
|
! set the size of the 1D array
|
||||||
|
status = h5pt_setnpoints(file_id, npoints)
|
||||||
|
|
||||||
|
! write the particles
|
||||||
|
status = h5pt_writedata_r8(file_id, "x", particles)
|
||||||
|
|
||||||
|
! write the ids
|
||||||
|
status = h5pt_writedata_i8(file_id, "id", id)
|
||||||
|
|
||||||
|
! close the file
|
||||||
|
status = h5pt_close(file_id)
|
||||||
|
|
||||||
|
deallocate(particles, id)
|
||||||
|
|
||||||
|
call mpi_finalize(ierr)
|
||||||
|
|
||||||
|
end program H5PartTest
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <mpi.h>
|
||||||
|
#include <H5Part.h>
|
||||||
|
|
||||||
|
#define DATASIZE 32
|
||||||
|
#define ITERS 4
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
int i, rank, nprocs;
|
||||||
|
h5part_int32_t data[ITERS*DATASIZE];
|
||||||
|
h5part_int64_t stat;
|
||||||
|
h5part_int64_t offset;
|
||||||
|
H5PartFile *file;
|
||||||
|
|
||||||
|
// initialize MPI
|
||||||
|
MPI_Init (&argc, &argv);
|
||||||
|
MPI_Comm_rank (MPI_COMM_WORLD, &rank);
|
||||||
|
MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
|
||||||
|
|
||||||
|
H5PartSetVerbosityLevel(H5PART_VERB_DEBUG);
|
||||||
|
|
||||||
|
file = H5PartOpenFileParallel("test.h5", H5PART_WRITE, MPI_COMM_WORLD);
|
||||||
|
assert (file != NULL);
|
||||||
|
|
||||||
|
stat = H5PartSetStep(file, 0);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
|
||||||
|
stat = H5PartSetNumParticles(file, ITERS*DATASIZE);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
|
||||||
|
// create fake data
|
||||||
|
for (i=0; i<ITERS*DATASIZE; i++) {
|
||||||
|
data[i] = i + rank * ITERS * DATASIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
offset = rank * ITERS * DATASIZE;
|
||||||
|
|
||||||
|
// iterate over arrays
|
||||||
|
for (i=0; i<ITERS; i++) {
|
||||||
|
// set the "view" to select a subset of the dataset
|
||||||
|
stat = H5PartSetView(file,
|
||||||
|
offset + i*DATASIZE,
|
||||||
|
offset + (i+1)*DATASIZE - 1);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
// write the data
|
||||||
|
stat = H5PartWriteDataInt32(file, "data", data + i*DATASIZE);
|
||||||
|
assert (stat == H5PART_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
H5PartCloseFile(file);
|
||||||
|
|
||||||
|
MPI_Finalize();
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
+27
-2
@@ -721,8 +721,13 @@ _release_hyperslab (
|
|||||||
/*!
|
/*!
|
||||||
\ingroup h5block_model
|
\ingroup h5block_model
|
||||||
|
|
||||||
Define the field layout given the dense index space at the actual
|
Defines the partition of the field that this processor owns, using
|
||||||
time step.
|
Fortran ordering: the fastest moving index is \c i.
|
||||||
|
|
||||||
|
This routine uses an MPI_Allgather, so at large concurrency it should
|
||||||
|
be called as infrequently as possible. For instance, if several timesteps
|
||||||
|
use the same field dimensions, set the layout only once before the
|
||||||
|
first timestep.
|
||||||
|
|
||||||
\return \c H5PART_SUCCESS on success<br>
|
\return \c H5PART_SUCCESS on success<br>
|
||||||
\c H5PART_ERR_MPI<br>
|
\c H5PART_ERR_MPI<br>
|
||||||
@@ -1186,6 +1191,11 @@ _H5Block_read_data (
|
|||||||
herr = _H5Block_select_hyperslab_for_reading ( f, dataset_id );
|
herr = _H5Block_select_hyperslab_for_reading ( f, dataset_id );
|
||||||
if ( herr < 0 ) return herr;
|
if ( herr < 0 ) return herr;
|
||||||
|
|
||||||
|
#ifdef PARALLEL_IO
|
||||||
|
herr = _H5Part_start_throttle ( f );
|
||||||
|
if ( herr < 0 ) return herr;
|
||||||
|
#endif
|
||||||
|
|
||||||
herr = H5Dread (
|
herr = H5Dread (
|
||||||
dataset_id,
|
dataset_id,
|
||||||
type,
|
type,
|
||||||
@@ -1195,6 +1205,11 @@ _H5Block_read_data (
|
|||||||
data );
|
data );
|
||||||
if ( herr < 0 ) return HANDLE_H5D_READ_ERR ( name, f->timestep );
|
if ( herr < 0 ) return HANDLE_H5D_READ_ERR ( name, f->timestep );
|
||||||
|
|
||||||
|
#ifdef PARALLEL_IO
|
||||||
|
herr = _H5Part_end_throttle ( f );
|
||||||
|
if ( herr < 0 ) return herr;
|
||||||
|
#endif
|
||||||
|
|
||||||
herr = H5Dclose ( dataset_id );
|
herr = H5Dclose ( dataset_id );
|
||||||
if ( herr < 0 ) return HANDLE_H5D_CLOSE_ERR;
|
if ( herr < 0 ) return HANDLE_H5D_CLOSE_ERR;
|
||||||
|
|
||||||
@@ -1443,6 +1458,11 @@ _H5Block_write_data (
|
|||||||
);
|
);
|
||||||
if ( dataset < 0 ) return HANDLE_H5D_CREATE_ERR ( name, f->timestep );
|
if ( dataset < 0 ) return HANDLE_H5D_CREATE_ERR ( name, f->timestep );
|
||||||
|
|
||||||
|
#ifdef PARALLEL_IO
|
||||||
|
herr = _H5Part_start_throttle ( f );
|
||||||
|
if ( herr < 0 ) return herr;
|
||||||
|
#endif
|
||||||
|
|
||||||
herr = H5Dwrite (
|
herr = H5Dwrite (
|
||||||
dataset,
|
dataset,
|
||||||
type,
|
type,
|
||||||
@@ -1452,6 +1472,11 @@ _H5Block_write_data (
|
|||||||
data );
|
data );
|
||||||
if ( herr < 0 ) return HANDLE_H5D_WRITE_ERR ( name, f->timestep );
|
if ( herr < 0 ) return HANDLE_H5D_WRITE_ERR ( name, f->timestep );
|
||||||
|
|
||||||
|
#ifdef PARALLEL_IO
|
||||||
|
herr = _H5Part_end_throttle ( f );
|
||||||
|
if ( herr < 0 ) return herr;
|
||||||
|
#endif
|
||||||
|
|
||||||
herr = H5Dclose ( dataset );
|
herr = H5Dclose ( dataset );
|
||||||
if ( herr < 0 ) return HANDLE_H5D_CLOSE_ERR;
|
if ( herr < 0 ) return HANDLE_H5D_CLOSE_ERR;
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -365,7 +365,7 @@ h5bl_has_fielddata (
|
|||||||
}
|
}
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
h5b_3d_get_field_spacing (
|
h5bl_3d_get_field_spacing (
|
||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *field_name,
|
const char *field_name,
|
||||||
h5part_float64_t *x,
|
h5part_float64_t *x,
|
||||||
@@ -386,7 +386,7 @@ h5b_3d_get_field_spacing (
|
|||||||
}
|
}
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
h5b_3d_set_field_spacing (
|
h5bl_3d_set_field_spacing (
|
||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *field_name,
|
const char *field_name,
|
||||||
const h5part_float64_t *x,
|
const h5part_float64_t *x,
|
||||||
@@ -407,7 +407,7 @@ h5b_3d_set_field_spacing (
|
|||||||
}
|
}
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
h5b_3d_get_field_origin (
|
h5bl_3d_get_field_origin (
|
||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *field_name,
|
const char *field_name,
|
||||||
h5part_float64_t *x,
|
h5part_float64_t *x,
|
||||||
@@ -428,7 +428,7 @@ h5b_3d_get_field_origin (
|
|||||||
}
|
}
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
h5b_3d_set_field_origin (
|
h5bl_3d_set_field_origin (
|
||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *field_name,
|
const char *field_name,
|
||||||
const h5part_float64_t *x,
|
const h5part_float64_t *x,
|
||||||
|
|||||||
@@ -10,8 +10,11 @@
|
|||||||
#include "H5MultiBlockErrors.h"
|
#include "H5MultiBlockErrors.h"
|
||||||
#include "H5MultiBlockPrivate.h"
|
#include "H5MultiBlockPrivate.h"
|
||||||
|
|
||||||
|
#ifdef PARALLEL_IO
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup h5multiblock_write
|
\ingroup h5multiblock_data
|
||||||
|
|
||||||
Write a multiblock field \c name from the buffer starting at \c data
|
Write a multiblock field \c name from the buffer starting at \c data
|
||||||
to the current time-step using the defined block decomposition and dimensions.
|
to the current time-step using the defined block decomposition and dimensions.
|
||||||
@@ -39,7 +42,7 @@ H5MultiBlock3dWriteFieldFloat64 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup h5multiblock_read
|
\ingroup h5multiblock_data
|
||||||
|
|
||||||
Allocate a buffer to hold a block from a multiblock field and place the
|
Allocate a buffer to hold a block from a multiblock field and place the
|
||||||
pointer in \c data, then read the block into the buffer. Uses the block
|
pointer in \c data, then read the block into the buffer. Uses the block
|
||||||
@@ -68,7 +71,7 @@ H5MultiBlock3dReadFieldFloat64 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup h5multiblock_write
|
\ingroup h5multiblock_data
|
||||||
|
|
||||||
Write a multiblock field \c name from the buffer starting at \c data
|
Write a multiblock field \c name from the buffer starting at \c data
|
||||||
to the current time-step using the defined block decomposition and dimensions.
|
to the current time-step using the defined block decomposition and dimensions.
|
||||||
@@ -96,7 +99,7 @@ H5MultiBlock3dWriteFieldFloat32 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup h5multiblock_read
|
\ingroup h5multiblock_data
|
||||||
|
|
||||||
Allocate a buffer to hold a block from a multiblock field and place the
|
Allocate a buffer to hold a block from a multiblock field and place the
|
||||||
pointer in \c data, then read the block into the buffer. Uses the block
|
pointer in \c data, then read the block into the buffer. Uses the block
|
||||||
@@ -125,7 +128,7 @@ H5MultiBlock3dReadFieldFloat32 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup h5multiblock_write
|
\ingroup h5multiblock_data
|
||||||
|
|
||||||
Write a multiblock field \c name from the buffer starting at \c data
|
Write a multiblock field \c name from the buffer starting at \c data
|
||||||
to the current time-step using the defined block decomposition and dimensions.
|
to the current time-step using the defined block decomposition and dimensions.
|
||||||
@@ -153,7 +156,7 @@ H5MultiBlock3dWriteFieldInt64 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup h5multiblock_read
|
\ingroup h5multiblock_data
|
||||||
|
|
||||||
Allocate a buffer to hold a block from a multiblock field and place the
|
Allocate a buffer to hold a block from a multiblock field and place the
|
||||||
pointer in \c data, then read the block into the buffer. Uses the block
|
pointer in \c data, then read the block into the buffer. Uses the block
|
||||||
@@ -182,7 +185,7 @@ H5MultiBlock3dReadFieldInt64 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup h5multiblock_write
|
\ingroup h5multiblock_data
|
||||||
|
|
||||||
Write a multiblock field \c name from the buffer starting at \c data
|
Write a multiblock field \c name from the buffer starting at \c data
|
||||||
to the current time-step using the defined block decomposition and dimensions.
|
to the current time-step using the defined block decomposition and dimensions.
|
||||||
@@ -210,7 +213,7 @@ H5MultiBlock3dWriteFieldInt32 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup h5multiblock_read
|
\ingroup h5multiblock_data
|
||||||
|
|
||||||
Allocate a buffer to hold a block from a multiblock field and place the
|
Allocate a buffer to hold a block from a multiblock field and place the
|
||||||
pointer in \c data, then read the block into the buffer. Uses the block
|
pointer in \c data, then read the block into the buffer. Uses the block
|
||||||
@@ -237,3 +240,5 @@ H5MultiBlock3dReadFieldInt32 (
|
|||||||
|
|
||||||
return H5PART_SUCCESS;
|
return H5PART_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // PARALLEL_IO
|
||||||
|
|||||||
+352
-280
File diff suppressed because it is too large
Load Diff
@@ -108,17 +108,32 @@ END FUNCTION
|
|||||||
!> \ingroup h5partf_open
|
!> \ingroup h5partf_open
|
||||||
!! Opens a parallel file for reading and specifies an HDF5 alignment.
|
!! Opens a parallel file for reading and specifies an HDF5 alignment.
|
||||||
!! See \ref H5PartOpenFileParallelAlign
|
!! See \ref H5PartOpenFileParallelAlign
|
||||||
|
!!
|
||||||
|
!! Flags are specified as a comma separated string that can include:
|
||||||
|
!!
|
||||||
|
!! - \c fs_lustre - enable optimizations for the Lustre file system
|
||||||
|
!! - \c vfd_mpiposix - use the HDF5 MPI-POSIX virtual file driver
|
||||||
|
!! - \c vfd_mpio_ind - use MPI-IO in indepedent mode
|
||||||
|
!!
|
||||||
!! \return 0 on success or error code
|
!! \return 0 on success or error code
|
||||||
!<
|
!<
|
||||||
INTEGER*8 FUNCTION h5pt_openr_par_align ( filename, mpi_communicator, align )
|
INTEGER*8 FUNCTION h5pt_openr_par_align ( filename, mpi_communicator, align )
|
||||||
CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for reading
|
CHARACTER(LEN=*), INTENT(IN) :: filename !< the filename to open for reading
|
||||||
INTEGER, INTENT(IN) :: mpi_communicator !< the MPI_Communicator used by the program
|
INTEGER, INTENT(IN) :: mpi_communicator !< the MPI_Communicator used by the program
|
||||||
INTEGER*8, INTENT(IN) :: align !< alignment value in bytes
|
INTEGER*8, INTENT(IN) :: align !< alignment value in bytes
|
||||||
|
CHARACTER(LEN=*), INTENT(IN) :: flags !< additional flags
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
!> \ingroup h5partf_open
|
!> \ingroup h5partf_open
|
||||||
!! Opens a parallel file for writing in truncate mode and specifies
|
!! Opens a parallel file for writing in truncate mode and specifies
|
||||||
!! an HDF5 alignment.
|
!! an HDF5 alignment.
|
||||||
|
!!
|
||||||
|
!! Flags are specified as a comma separated string that can include:
|
||||||
|
!!
|
||||||
|
!! - \c fs_lustre - enable optimizations for the Lustre file system
|
||||||
|
!! - \c vfd_mpiposix - use the HDF5 MPI-POSIX virtual file driver
|
||||||
|
!! - \c vfd_mpio_ind - use MPI-IO in indepedent mode
|
||||||
|
!!
|
||||||
!! See \ref H5PartOpenFileParallelAlign
|
!! See \ref H5PartOpenFileParallelAlign
|
||||||
!! \return 0 on success or error code
|
!! \return 0 on success or error code
|
||||||
!<
|
!<
|
||||||
@@ -132,6 +147,13 @@ END FUNCTION
|
|||||||
!> \ingroup h5partf_open
|
!> \ingroup h5partf_open
|
||||||
!! Opens a parallel file for writing in append mode and specifies
|
!! Opens a parallel file for writing in append mode and specifies
|
||||||
!! an HDF5 alignment.
|
!! an HDF5 alignment.
|
||||||
|
!!
|
||||||
|
!! Flags are specified as a comma separated string that can include:
|
||||||
|
!!
|
||||||
|
!! - \c fs_lustre - enable optimizations for the Lustre file system
|
||||||
|
!! - \c vfd_mpiposix - use the HDF5 MPI-POSIX virtual file driver
|
||||||
|
!! - \c vfd_mpio_ind - use MPI-IO in indepedent mode
|
||||||
|
!!
|
||||||
!! See \ref H5PartOpenFileParallelAlign
|
!! See \ref H5PartOpenFileParallelAlign
|
||||||
!! \return 0 on success or error code
|
!! \return 0 on success or error code
|
||||||
!<
|
!<
|
||||||
|
|||||||
+13
-2
@@ -16,10 +16,10 @@ extern "C" {
|
|||||||
#include "H5MultiBlock.h"
|
#include "H5MultiBlock.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define H5PART_VER_STRING "1.6.0"
|
#define H5PART_VER_STRING "1.6.4"
|
||||||
#define H5PART_VER_MAJOR 1
|
#define H5PART_VER_MAJOR 1
|
||||||
#define H5PART_VER_MINOR 6
|
#define H5PART_VER_MINOR 6
|
||||||
#define H5PART_VER_RELEASE 0
|
#define H5PART_VER_RELEASE 4
|
||||||
|
|
||||||
/* error values */
|
/* error values */
|
||||||
#define H5PART_SUCCESS 0
|
#define H5PART_SUCCESS 0
|
||||||
@@ -42,6 +42,7 @@ extern "C" {
|
|||||||
#define H5PART_VFD_MPIPOSIX 0x08
|
#define H5PART_VFD_MPIPOSIX 0x08
|
||||||
#define H5PART_FS_LUSTRE 0x10
|
#define H5PART_FS_LUSTRE 0x10
|
||||||
#define H5PART_VFD_MPIIO_IND 0x20
|
#define H5PART_VFD_MPIIO_IND 0x20
|
||||||
|
#define H5PART_VFD_CORE 0x40
|
||||||
|
|
||||||
/* verbosity level flags */
|
/* verbosity level flags */
|
||||||
#define H5PART_VERB_NONE 0
|
#define H5PART_VERB_NONE 0
|
||||||
@@ -99,6 +100,10 @@ H5PartCloseFile (
|
|||||||
H5PartFile *f
|
H5PartFile *f
|
||||||
);
|
);
|
||||||
|
|
||||||
|
h5part_int64_t
|
||||||
|
H5PartFileIsValid (
|
||||||
|
H5PartFile *f
|
||||||
|
);
|
||||||
|
|
||||||
/*============== File Writing Functions ==================== */
|
/*============== File Writing Functions ==================== */
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -121,6 +126,12 @@ H5PartSetNumParticlesStrided (
|
|||||||
const h5part_int64_t stride /*!< [in] Stride (e.g. number of fields in the particle array) */
|
const h5part_int64_t stride /*!< [in] Stride (e.g. number of fields in the particle array) */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
h5part_int64_t
|
||||||
|
H5PartSetChunkSize (
|
||||||
|
H5PartFile *f,
|
||||||
|
const h5part_int64_t size
|
||||||
|
);
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
H5PartWriteDataFloat64 (
|
H5PartWriteDataFloat64 (
|
||||||
H5PartFile *f,
|
H5PartFile *f,
|
||||||
|
|||||||
+30
-30
@@ -23,7 +23,7 @@ h5pt_writefileattrib_r8 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_float64_t *data,
|
const h5part_float64_t *data,
|
||||||
const h5part_float64_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -39,9 +39,9 @@ h5pt_writefileattrib_r8 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writefileattrib_r8 F77NAME ( \
|
#define h5pt_readfileattrib_r8 F77NAME ( \
|
||||||
h5pt_writefileattrib_r8_, \
|
h5pt_readfileattrib_r8_, \
|
||||||
H5PT_WRITEFILEATTRIB_R8 )
|
H5PT_READFILEATTRIB_R8 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -74,7 +74,7 @@ h5pt_writefileattrib_r4 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_float32_t *data,
|
const h5part_float32_t *data,
|
||||||
const h5part_float32_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -90,9 +90,9 @@ h5pt_writefileattrib_r4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writefileattrib_r4 F77NAME ( \
|
#define h5pt_readfileattrib_r4 F77NAME ( \
|
||||||
h5pt_writefileattrib_r4_, \
|
h5pt_readfileattrib_r4_, \
|
||||||
H5PT_WRITEFILEATTRIB_R4 )
|
H5PT_READFILEATTRIB_R4 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -141,9 +141,9 @@ h5pt_writefileattrib_i8 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writefileattrib_i8 F77NAME ( \
|
#define h5pt_readfileattrib_i8 F77NAME ( \
|
||||||
h5pt_writefileattrib_i8_, \
|
h5pt_readfileattrib_i8_, \
|
||||||
H5PT_WRITEFILEATTRIB_I8 )
|
H5PT_READFILEATTRIB_I8 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -176,7 +176,7 @@ h5pt_writefileattrib_i4 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_int32_t *data,
|
const h5part_int32_t *data,
|
||||||
const h5part_int32_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -192,9 +192,9 @@ h5pt_writefileattrib_i4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writefileattrib_i4 F77NAME ( \
|
#define h5pt_readfileattrib_i4 F77NAME ( \
|
||||||
h5pt_writefileattrib_i4_, \
|
h5pt_readfileattrib_i4_, \
|
||||||
H5PT_WRITEFILEATTRIB_I4 )
|
H5PT_READFILEATTRIB_I4 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -227,7 +227,7 @@ h5pt_writestepattrib_r8 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_float64_t *data,
|
const h5part_float64_t *data,
|
||||||
const h5part_float64_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -243,9 +243,9 @@ h5pt_writestepattrib_r8 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writestepattrib_r8 F77NAME ( \
|
#define h5pt_readstepattrib_r8 F77NAME ( \
|
||||||
h5pt_writestepattrib_r8_, \
|
h5pt_readstepattrib_r8_, \
|
||||||
H5PT_WRITESTEPATTRIB_R8 )
|
H5PT_READSTEPATTRIB_R8 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -278,7 +278,7 @@ h5pt_writestepattrib_r4 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_float32_t *data,
|
const h5part_float32_t *data,
|
||||||
const h5part_float32_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -294,9 +294,9 @@ h5pt_writestepattrib_r4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writestepattrib_r4 F77NAME ( \
|
#define h5pt_readstepattrib_r4 F77NAME ( \
|
||||||
h5pt_writestepattrib_r4_, \
|
h5pt_readstepattrib_r4_, \
|
||||||
H5PT_WRITESTEPATTRIB_R4 )
|
H5PT_READSTEPATTRIB_R4 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -345,9 +345,9 @@ h5pt_writestepattrib_i8 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writestepattrib_i8 F77NAME ( \
|
#define h5pt_readstepattrib_i8 F77NAME ( \
|
||||||
h5pt_writestepattrib_i8_, \
|
h5pt_readstepattrib_i8_, \
|
||||||
H5PT_WRITESTEPATTRIB_I8 )
|
H5PT_READSTEPATTRIB_I8 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
@@ -380,7 +380,7 @@ h5pt_writestepattrib_i4 (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_int32_t *data,
|
const h5part_int32_t *data,
|
||||||
const h5part_int32_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -396,9 +396,9 @@ h5pt_writestepattrib_i4 (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_writestepattrib_i4 F77NAME ( \
|
#define h5pt_readstepattrib_i4 F77NAME ( \
|
||||||
h5pt_writestepattrib_i4_, \
|
h5pt_readstepattrib_i4_, \
|
||||||
H5PT_WRITESTEPATTRIB_I4 )
|
H5PT_READSTEPATTRIB_I4 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
|
|||||||
+15
-3
@@ -197,6 +197,10 @@ _H5Part_flagsfor2c (
|
|||||||
while ( flags != NULL ) {
|
while ( flags != NULL ) {
|
||||||
if ( strcmp ( flags, "vfd_mpiposix" ) == 0 )
|
if ( strcmp ( flags, "vfd_mpiposix" ) == 0 )
|
||||||
fbits |= H5PART_VFD_MPIPOSIX;
|
fbits |= H5PART_VFD_MPIPOSIX;
|
||||||
|
else if ( strcmp ( flags, "vfd_core" ) == 0 )
|
||||||
|
fbits |= H5PART_VFD_CORE;
|
||||||
|
else if ( strcmp ( flags, "vfd_mpio_ind" ) == 0 )
|
||||||
|
fbits |= H5PART_VFD_MPIIO_IND;
|
||||||
else if ( strcmp ( flags, "fs_lustre" ) == 0 )
|
else if ( strcmp ( flags, "fs_lustre" ) == 0 )
|
||||||
fbits |= H5PART_FS_LUSTRE;
|
fbits |= H5PART_FS_LUSTRE;
|
||||||
flags = strtok ( NULL, "," );
|
flags = strtok ( NULL, "," );
|
||||||
@@ -351,16 +355,22 @@ h5pt_openr_par_align (
|
|||||||
const char *file_name,
|
const char *file_name,
|
||||||
MPI_Fint *fcomm,
|
MPI_Fint *fcomm,
|
||||||
const h5part_int64_t *align,
|
const h5part_int64_t *align,
|
||||||
const int l_file_name
|
const char *flags,
|
||||||
|
const int l_file_name,
|
||||||
|
const int l_flags
|
||||||
) {
|
) {
|
||||||
|
|
||||||
MPI_Comm ccomm = MPI_Comm_f2c (*fcomm);
|
MPI_Comm ccomm = MPI_Comm_f2c (*fcomm);
|
||||||
char *file_name2 = _H5Part_strdupfor2c ( file_name, l_file_name );
|
char *file_name2 = _H5Part_strdupfor2c ( file_name, l_file_name );
|
||||||
|
char *flags2 = _H5Part_strdupfor2c ( flags, l_flags );
|
||||||
|
|
||||||
|
char fbits = H5PART_READ | _H5Part_flagsfor2c ( flags2 );
|
||||||
|
|
||||||
H5PartFile* f = H5PartOpenFileParallelAlign (
|
H5PartFile* f = H5PartOpenFileParallelAlign (
|
||||||
file_name2, H5PART_READ, ccomm, *align );
|
file_name2, fbits, ccomm, *align );
|
||||||
|
|
||||||
free ( file_name2 );
|
free ( file_name2 );
|
||||||
|
free ( flags2 );
|
||||||
return (h5part_int64_t)(size_t)f;
|
return (h5part_int64_t)(size_t)f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,6 +394,7 @@ h5pt_openw_par_align (
|
|||||||
file_name2, fbits, ccomm, *align );
|
file_name2, fbits, ccomm, *align );
|
||||||
|
|
||||||
free ( file_name2 );
|
free ( file_name2 );
|
||||||
|
free ( flags2 );
|
||||||
return (h5part_int64_t)(size_t)f;
|
return (h5part_int64_t)(size_t)f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,6 +418,7 @@ h5pt_opena_par_align (
|
|||||||
file_name2, fbits, ccomm, *align );
|
file_name2, fbits, ccomm, *align );
|
||||||
|
|
||||||
free ( file_name2 );
|
free ( file_name2 );
|
||||||
|
free ( flags2 );
|
||||||
return (h5part_int64_t)(size_t)f;
|
return (h5part_int64_t)(size_t)f;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -611,7 +623,7 @@ h5pt_setview (
|
|||||||
|
|
||||||
H5PartFile *filehandle = (H5PartFile*)(size_t)*f;
|
H5PartFile *filehandle = (H5PartFile*)(size_t)*f;
|
||||||
|
|
||||||
return H5PartSetView ( filehandle, *start, *end );
|
return H5PartSetView ( filehandle, (*start)-1, (*end)-1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
|
|||||||
+6
-31
@@ -2,12 +2,17 @@
|
|||||||
#define __H5PART_PRIVATE_H
|
#define __H5PART_PRIVATE_H
|
||||||
|
|
||||||
#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR == 6
|
#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR == 6
|
||||||
|
#define H5PART_USE_HDF5_16
|
||||||
#define H5_USE_16_API
|
#define H5_USE_16_API
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if H5_VERS_MAJOR == 1 && H5_VERS_MINOR >= 8
|
||||||
|
#define H5PART_HAVE_HDF5_18
|
||||||
|
#endif
|
||||||
|
|
||||||
#define H5PART_GROUPNAME_STEP "Step"
|
#define H5PART_GROUPNAME_STEP "Step"
|
||||||
|
|
||||||
#define H5PART_BTREE_IK 10000
|
#define H5PART_SET_STEP_READ_ONLY 0
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
_H5Part_file_is_valid (
|
_H5Part_file_is_valid (
|
||||||
@@ -167,12 +172,6 @@ _H5Part_get_err_handle (
|
|||||||
void
|
void
|
||||||
);
|
);
|
||||||
|
|
||||||
void
|
|
||||||
_H5Part_vprint_error (
|
|
||||||
const char *fmt,
|
|
||||||
va_list ap
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_H5Part_print_error (
|
_H5Part_print_error (
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
@@ -182,12 +181,6 @@ __attribute__ ((format (printf, 1, 2)))
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
void
|
|
||||||
_H5Part_vprint_warn (
|
|
||||||
const char *fmt,
|
|
||||||
va_list ap
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_H5Part_print_warn (
|
_H5Part_print_warn (
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
@@ -198,12 +191,6 @@ __attribute__ ((format (printf, 1, 2)))
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
void
|
|
||||||
_H5Part_vprint_info (
|
|
||||||
const char *fmt,
|
|
||||||
va_list ap
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_H5Part_print_info (
|
_H5Part_print_info (
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
@@ -214,12 +201,6 @@ __attribute__ ((format (printf, 1, 2)))
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
void
|
|
||||||
_H5Part_vprint_debug (
|
|
||||||
const char *fmt,
|
|
||||||
va_list ap
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_H5Part_print_debug (
|
_H5Part_print_debug (
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
@@ -230,12 +211,6 @@ __attribute__ ((format (printf, 1, 2)))
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
void
|
|
||||||
_H5Part_vprint_debug_detail (
|
|
||||||
const char *fmt,
|
|
||||||
va_list ap
|
|
||||||
);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_H5Part_print_debug_detail (
|
_H5Part_print_debug_detail (
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
|
|||||||
+3
-2
@@ -19,7 +19,7 @@ __attribute__ ((format (printf, 3, 4)))
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
#ifndef MPI_INCLUDED
|
#ifndef PARALLEL_IO
|
||||||
typedef unsigned long MPI_Comm;
|
typedef unsigned long MPI_Comm;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -50,8 +50,9 @@ struct H5PartFile {
|
|||||||
hid_t timegroup;
|
hid_t timegroup;
|
||||||
hid_t shape;
|
hid_t shape;
|
||||||
hid_t xfer_prop;
|
hid_t xfer_prop;
|
||||||
hid_t create_prop;
|
|
||||||
hid_t access_prop;
|
hid_t access_prop;
|
||||||
|
hid_t dcreate_prop;
|
||||||
|
hid_t fcreate_prop;
|
||||||
|
|
||||||
/* the dataspace on disk for the current view */
|
/* the dataspace on disk for the current view */
|
||||||
hid_t diskshape;
|
hid_t diskshape;
|
||||||
|
|||||||
+13
-14
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
OBJEXT=o
|
OBJEXT=o
|
||||||
|
|
||||||
INCLUDES = -I@HDF5ROOT@/include @MPIINC@
|
|
||||||
|
|
||||||
EXTRA_HEADERS = H5PartPrivate.h \
|
EXTRA_HEADERS = H5PartPrivate.h \
|
||||||
H5BlockPrivate.h \
|
H5BlockPrivate.h \
|
||||||
H5MultiBlockPrivate.h \
|
H5MultiBlockPrivate.h \
|
||||||
@@ -25,10 +23,10 @@ EXTRA_DIST = TestUnderscoreC.c \
|
|||||||
nodist_include_HEADERS = H5PartF.h @UNDERSCORE_H@
|
nodist_include_HEADERS = H5PartF.h @UNDERSCORE_H@
|
||||||
|
|
||||||
# What to build... Will be determined by configure script.
|
# What to build... Will be determined by configure script.
|
||||||
lib_LIBRARIES = @MTARGET@
|
lib_LTLIBRARIES = libH5Part.la @LIB_FORTRAN@
|
||||||
|
|
||||||
# Listing of all possible targets that I may build.
|
# Listing of all possible targets that I may build.
|
||||||
EXTRA_LIBRARIES = libH5Part.a libH5PartF.a
|
EXTRA_LTLIBRARIES = libH5PartF.la
|
||||||
|
|
||||||
# Header files that I wish to install in $(prefix)/include
|
# Header files that I wish to install in $(prefix)/include
|
||||||
include_HEADERS = H5Part.h \
|
include_HEADERS = H5Part.h \
|
||||||
@@ -47,27 +45,28 @@ include_HEADERS = H5Part.h \
|
|||||||
@UNDERSCORE_H@
|
@UNDERSCORE_H@
|
||||||
|
|
||||||
# Listing of sources
|
# Listing of sources
|
||||||
libH5Part_a_SOURCES = H5Part.c \
|
libH5Part_la_SOURCES = H5Part.c \
|
||||||
H5PartAttrib.c \
|
H5PartAttrib.c \
|
||||||
H5Block.c \
|
H5Block.c \
|
||||||
H5BlockReadWrite.c \
|
H5BlockReadWrite.c \
|
||||||
H5MultiBlock.c \
|
H5MultiBlock.c \
|
||||||
H5MultiBlockReadWrite.c
|
H5MultiBlockReadWrite.c
|
||||||
|
|
||||||
libH5PartF_a_SOURCES = $(libH5Part_a_SOURCES) \
|
libH5Part_la_LDFLAGS = -version-info 0:0:0
|
||||||
|
|
||||||
|
libH5PartF_la_SOURCES = H5Part.c \
|
||||||
|
H5PartAttrib.c \
|
||||||
|
H5Block.c \
|
||||||
|
H5BlockReadWrite.c \
|
||||||
|
H5MultiBlock.c \
|
||||||
|
H5MultiBlockReadWrite.c \
|
||||||
H5PartF.c \
|
H5PartF.c \
|
||||||
H5PartAttribF.c \
|
H5PartAttribF.c \
|
||||||
H5BlockF.c \
|
H5BlockF.c \
|
||||||
H5BlockReadWriteF.c
|
H5BlockReadWriteF.c
|
||||||
|
|
||||||
|
libH5PartF_la_LDFLAGS = -version-info 0:0:0 -rpath '$(libdir)'
|
||||||
|
|
||||||
H5PartF.h: H5Part.f90 H5PartAttrib.f90 H5Block.f90 H5BlockReadWrite.f90
|
H5PartF.h: H5Part.f90 H5PartAttrib.f90 H5Block.f90 H5BlockReadWrite.f90
|
||||||
awk '/INTEGER\*8 FUNCTION/{print "\t" $$1 " " $$3}' $^ >$@
|
awk '/INTEGER\*8 FUNCTION/{print "\t" $$1 " " $$3}' $^ >$@
|
||||||
|
|
||||||
libpH5Part.a: libH5Part.a
|
|
||||||
$(RM) $@
|
|
||||||
ln -s $^ $@
|
|
||||||
|
|
||||||
libpH5PartF.a: libH5PartF.a
|
|
||||||
$(RM) $@
|
|
||||||
ln -s $^ $@
|
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ h5pt_write#LEVELLC#attrib_#TYPE_F90_ABV# (
|
|||||||
h5part_int64_t *f,
|
h5part_int64_t *f,
|
||||||
const char *name,
|
const char *name,
|
||||||
const h5part_#TYPE_H5P#_t *data,
|
const h5part_#TYPE_H5P#_t *data,
|
||||||
const h5part_#TYPE_H5P#_t *nelem,
|
const h5part_int64_t *nelem,
|
||||||
const int l_name
|
const int l_name
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -143,9 +143,9 @@ END FUNCTION
|
|||||||
|
|
||||||
read_attr_fc = """
|
read_attr_fc = """
|
||||||
#if ! defined(F77_NO_UNDERSCORE)
|
#if ! defined(F77_NO_UNDERSCORE)
|
||||||
#define h5pt_write#LEVELLC#attrib_#TYPE_F90_ABV# F77NAME ( \\
|
#define h5pt_read#LEVELLC#attrib_#TYPE_F90_ABV# F77NAME ( \\
|
||||||
h5pt_write#LEVELLC#attrib_#TYPE_F90_ABV#_, \\
|
h5pt_read#LEVELLC#attrib_#TYPE_F90_ABV#_, \\
|
||||||
H5PT_WRITE#LEVELUC#ATTRIB_#TYPE_F90_ABVC# )
|
H5PT_READ#LEVELUC#ATTRIB_#TYPE_F90_ABVC# )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
h5part_int64_t
|
h5part_int64_t
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ c_head = """
|
|||||||
|
|
||||||
#include "H5MultiBlockErrors.h"
|
#include "H5MultiBlockErrors.h"
|
||||||
#include "H5MultiBlockPrivate.h"
|
#include "H5MultiBlockPrivate.h"
|
||||||
|
|
||||||
|
#ifdef PARALLEL_IO
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
c_tail = """
|
||||||
|
#endif // PARALLEL_IO
|
||||||
"""
|
"""
|
||||||
|
|
||||||
h_head = """
|
h_head = """
|
||||||
@@ -237,6 +244,7 @@ def write_calls():
|
|||||||
# fcfile.write(create_call(read_fc,type,dim));
|
# fcfile.write(create_call(read_fc,type,dim));
|
||||||
# fifile.write(create_call(write_fi,type,dim));
|
# fifile.write(create_call(write_fi,type,dim));
|
||||||
# fifile.write(create_call(read_fi,type,dim));
|
# fifile.write(create_call(read_fi,type,dim));
|
||||||
|
cfile.write(c_tail)
|
||||||
cfile.close()
|
cfile.close()
|
||||||
hfile.write(h_tail)
|
hfile.write(h_tail)
|
||||||
hfile.close()
|
hfile.close()
|
||||||
|
|||||||
+7
-8
@@ -2,15 +2,12 @@
|
|||||||
|
|
||||||
OBJEXT=o
|
OBJEXT=o
|
||||||
|
|
||||||
HDFLIB = -L@HDF5ROOT@/lib -lhdf5 -lz @SZLIB@
|
INCLUDES = -I../src @INCLUDES@
|
||||||
LIBS = -L@H5P_LIB_LOC@ @H5P_LIB_NAME@ $(HDFLIB) -lm
|
|
||||||
|
|
||||||
INCLUDES = -I@H5P_LIB_LOC@ -I@HDF5ROOT@/include @MPIINC@
|
noinst_PROGRAMS = @BUILD_TESTS@
|
||||||
|
|
||||||
noinst_PROGRAMS = @TTARGET@
|
|
||||||
|
|
||||||
TESTS_ENVIRONMENT = env LD_LIBRARY_PATH=@HDF5ROOT@/lib:$(LD_LIBRARY_PATH)
|
TESTS_ENVIRONMENT = env LD_LIBRARY_PATH=@HDF5ROOT@/lib:$(LD_LIBRARY_PATH)
|
||||||
TESTS = @TTARGET@
|
TESTS = @BUILD_TESTS@
|
||||||
|
|
||||||
EXTRA_PROGRAMS = test testf
|
EXTRA_PROGRAMS = test testf
|
||||||
|
|
||||||
@@ -20,9 +17,11 @@ test_SOURCES = test.c \
|
|||||||
read.c \
|
read.c \
|
||||||
testframe.h \
|
testframe.h \
|
||||||
params.h
|
params.h
|
||||||
|
test_LDADD = ../src/libH5Part.la
|
||||||
|
|
||||||
testf_SOURCES = testf.F90
|
testf_SOURCES = testf.F90
|
||||||
|
testf_LDADD = ../src/libH5PartF.la
|
||||||
|
|
||||||
clean: clean-am
|
clean-local:
|
||||||
rm -f *.h5
|
$(RM) -f *.h5
|
||||||
|
|
||||||
|
|||||||
+28
-23
@@ -175,10 +175,6 @@ test_read_data64(H5PartFile *file, int nparticles, int step)
|
|||||||
status = H5PartSetView(file, start, end);
|
status = H5PartSetView(file, start, end);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetView");
|
RETURN(status, H5PART_SUCCESS, "H5PartSetView");
|
||||||
|
|
||||||
status = H5PartReadDataFloat64(file, "x", x);
|
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartReadDataFloat64");
|
|
||||||
FVALUE(x[rank], (double)(start+rank+nparticles*t), "x data");
|
|
||||||
|
|
||||||
val = H5PartGetView(file, &start, &end);
|
val = H5PartGetView(file, &start, &end);
|
||||||
IVALUE(val, nprocs*nparticles-start, "particle count");
|
IVALUE(val, nprocs*nparticles-start, "particle count");
|
||||||
IVALUE(start, rank, "view start");
|
IVALUE(start, rank, "view start");
|
||||||
@@ -187,51 +183,60 @@ test_read_data64(H5PartFile *file, int nparticles, int step)
|
|||||||
status = H5PartSetView(file, -1, -1);
|
status = H5PartSetView(file, -1, -1);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetView");
|
RETURN(status, H5PART_SUCCESS, "H5PartSetView");
|
||||||
|
|
||||||
|
status = H5PartSetView(file, 0, nparticles-1);
|
||||||
|
RETURN(status, H5PART_SUCCESS, "H5PartSetView");
|
||||||
|
|
||||||
|
val = H5PartGetNumParticles(file);
|
||||||
|
IVALUE(val, nparticles, "particle count");
|
||||||
|
|
||||||
status = H5PartReadDataFloat64(file, "x", x);
|
status = H5PartReadDataFloat64(file, "x", x);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartReadDataFloat64");
|
RETURN(status, H5PART_SUCCESS, "H5PartReadDataFloat64");
|
||||||
IVALUE(x[rank], (double)(rank+nparticles*t), "x data");
|
IVALUE(x[rank], (double)(rank+nparticles*t), "x data");
|
||||||
|
|
||||||
|
status = H5PartResetView(file);
|
||||||
|
RETURN(status, H5PART_SUCCESS, "H5PartResetView");
|
||||||
|
|
||||||
|
val = H5PartGetNumParticles(file);
|
||||||
|
IVALUE(val, nprocs*nparticles, "particle count");
|
||||||
|
|
||||||
indices[0] = rank*2 + 0;
|
indices[0] = rank*2 + 0;
|
||||||
indices[1] = rank*2 + 3;
|
indices[1] = rank*2 + 3;
|
||||||
indices[2] = rank*2 + 9;
|
indices[2] = rank*2 + 9;
|
||||||
indices[3] = rank*2 + 7;
|
indices[3] = rank*2 + 7;
|
||||||
|
|
||||||
status = H5PartSetViewIndices(file, indices, -1);
|
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetViewIndices");
|
|
||||||
|
|
||||||
status = H5PartReadDataFloat64(file, "x", x);
|
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartReadDataFloat64");
|
|
||||||
FVALUE(x[2*rank], (double)(2*rank+nparticles*t), "x data");
|
|
||||||
|
|
||||||
status = H5PartResetView(file);
|
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartResetView");
|
|
||||||
|
|
||||||
status = H5PartSetViewIndices(file, indices, 4);
|
status = H5PartSetViewIndices(file, indices, 4);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetViewIndices");
|
RETURN(status, H5PART_SUCCESS, "H5PartSetViewIndices");
|
||||||
|
|
||||||
val = H5PartGetNumParticles(file);
|
val = H5PartGetNumParticles(file);
|
||||||
IVALUE(val, 4, "particle count");
|
IVALUE(val, 4, "particle count");
|
||||||
|
|
||||||
status = H5PartReadDataFloat64(file, "x", x);
|
double x2[4];
|
||||||
|
status = H5PartReadDataFloat64(file, "x", x2);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartReadDataFloat64");
|
RETURN(status, H5PART_SUCCESS, "H5PartReadDataFloat64");
|
||||||
FVALUE(x[2], (double)(rank*2+9+nparticles*t), "x data");
|
FVALUE(x2[0], (double)(2*rank+0+nparticles*t), "x data");
|
||||||
|
FVALUE(x2[1], (double)(2*rank+3+nparticles*t), "x data");
|
||||||
|
FVALUE(x2[2], (double)(2*rank+9+nparticles*t), "x data");
|
||||||
|
FVALUE(x2[3], (double)(2*rank+7+nparticles*t), "x data");
|
||||||
|
|
||||||
val = H5PartGetNumParticles(file);
|
status = H5PartSetViewIndices(file, indices, -1);
|
||||||
IVALUE(val, 4, "particle count");
|
|
||||||
|
|
||||||
status = H5PartSetViewIndices(file, NULL, 4);
|
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetViewIndices");
|
RETURN(status, H5PART_SUCCESS, "H5PartSetViewIndices");
|
||||||
|
|
||||||
status = H5PartReadDataFloat64(file, "x", x);
|
val = H5PartGetNumParticles(file);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartReadDataFloat64");
|
IVALUE(val, nprocs*nparticles, "particle count");
|
||||||
|
|
||||||
status = H5PartSetCanonicalView(file);
|
status = H5PartSetCanonicalView(file);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetCanonicalView");
|
RETURN(status, H5PART_SUCCESS, "H5PartSetCanonicalView");
|
||||||
|
|
||||||
|
val = H5PartGetNumParticles(file);
|
||||||
|
IVALUE(val, nparticles, "particle count");
|
||||||
|
|
||||||
status = H5PartReadParticleStep (
|
status = H5PartReadParticleStep (
|
||||||
file, t, x, y, z, px, py, pz, id);
|
file, t, x, y, z, px, py, pz, id);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartReadParticleStep");
|
RETURN(status, H5PART_SUCCESS, "H5PartReadParticleStep");
|
||||||
|
|
||||||
|
status = H5PartSetViewIndices(file, NULL, 4);
|
||||||
|
RETURN(status, H5PART_SUCCESS, "H5PartSetViewIndices");
|
||||||
|
|
||||||
for (i=0; i<nparticles; i++)
|
for (i=0; i<nparticles; i++)
|
||||||
{
|
{
|
||||||
FVALUE(x[i] , 0.0 + (double)(i+nparticles*t), " x data");
|
FVALUE(x[i] , 0.0 + (double)(i+nparticles*t), " x data");
|
||||||
@@ -509,7 +514,7 @@ void test_read4(void)
|
|||||||
status = H5PartSetStep(file2, NTIMESTEPS);
|
status = H5PartSetStep(file2, NTIMESTEPS);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetStep");
|
RETURN(status, H5PART_SUCCESS, "H5PartSetStep");
|
||||||
|
|
||||||
test_read_data64(file2, NPARTICLES, NTIMESTEPS);
|
test_read_data64(file2, NPARTICLES, NTIMESTEPS-2);
|
||||||
|
|
||||||
status = H5PartCloseFile(file1);
|
status = H5PartCloseFile(file1);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
|
RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
|
||||||
|
|||||||
+7
-5
@@ -23,9 +23,10 @@ int main(int argc, char **argv)
|
|||||||
int procs;
|
int procs;
|
||||||
MPI_Comm_size(MPI_COMM_WORLD, &procs);
|
MPI_Comm_size(MPI_COMM_WORLD, &procs);
|
||||||
if (procs > MAX_MPI_TASKS) {
|
if (procs > MAX_MPI_TASKS) {
|
||||||
fprintf(stderr, "ERROR: please use <= %d MPI tasks for the test.",
|
fprintf(stderr,
|
||||||
|
"ERROR: please use <= %d MPI tasks for the test.\n",
|
||||||
MAX_MPI_TASKS);
|
MAX_MPI_TASKS);
|
||||||
MPI_Abort(MPI_COMM_WORLD, -1);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -62,9 +63,10 @@ int main(int argc, char **argv)
|
|||||||
// TestCleanup();
|
// TestCleanup();
|
||||||
|
|
||||||
#ifdef PARALLEL_IO
|
#ifdef PARALLEL_IO
|
||||||
return MPI_Finalize();
|
TestPrintf ("reached end\n");
|
||||||
#else
|
fflush(stdout);
|
||||||
return GetTestNumErrs();
|
MPI_Finalize();
|
||||||
#endif
|
#endif
|
||||||
|
return GetTestNumErrs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -7,9 +7,9 @@ program H5PartTest
|
|||||||
include 'H5PartF.h'
|
include 'H5PartF.h'
|
||||||
|
|
||||||
#ifdef PARALLEL_IO
|
#ifdef PARALLEL_IO
|
||||||
integer :: comm, ierr, i
|
integer :: comm, ierr
|
||||||
integer*8 :: file_id, status, npoints
|
|
||||||
#endif
|
#endif
|
||||||
|
integer*8 :: file_id, status, npoints, i
|
||||||
real*8, allocatable :: x(:),y(:),z(:),px(:),py(:),pz(:)
|
real*8, allocatable :: x(:),y(:),z(:),px(:),py(:),pz(:)
|
||||||
integer*8, allocatable :: id(:)
|
integer*8, allocatable :: id(:)
|
||||||
|
|
||||||
@@ -18,10 +18,10 @@ program H5PartTest
|
|||||||
comm = MPI_COMM_WORLD
|
comm = MPI_COMM_WORLD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
! this enables level 3 ("info") messages to be
|
! this enables level 4 ("debug") messages to be
|
||||||
! printed by the H5Part library
|
! printed by the H5Part library
|
||||||
! (3_8 is the literal for an integer*8 with value 3)
|
! (4_8 is the literal for an integer*8 with value 4)
|
||||||
status = h5pt_set_verbosity_level (3_8)
|
status = h5pt_set_verbosity_level (4_8)
|
||||||
|
|
||||||
! open the a file called 'test.h5' in parallel for writing
|
! open the a file called 'test.h5' in parallel for writing
|
||||||
#ifdef PARALLEL_IO
|
#ifdef PARALLEL_IO
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <H5Part.h>
|
#include <H5Part.h>
|
||||||
#include "testframe.h"
|
#include "testframe.h"
|
||||||
|
#include "../src/H5PartPrivate.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Definitions for the testing structure.
|
* Definitions for the testing structure.
|
||||||
@@ -652,6 +653,7 @@ test_is_valid(H5PartFile *file)
|
|||||||
void
|
void
|
||||||
test_open_objects(H5PartFile *file, int max_objects)
|
test_open_objects(H5PartFile *file, int max_objects)
|
||||||
{
|
{
|
||||||
|
#ifndef H5_USE_16_API
|
||||||
ssize_t nopen = H5Fget_obj_count(file->file, H5F_OBJ_ALL);
|
ssize_t nopen = H5Fget_obj_count(file->file, H5F_OBJ_ALL);
|
||||||
if (nopen > max_objects)
|
if (nopen > max_objects)
|
||||||
{
|
{
|
||||||
@@ -682,5 +684,6 @@ test_open_objects(H5PartFile *file, int max_objects)
|
|||||||
}
|
}
|
||||||
free(list);
|
free(list);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+19
-13
@@ -65,7 +65,7 @@ static void
|
|||||||
test_write_data64(H5PartFile *file, int nparticles, int step)
|
test_write_data64(H5PartFile *file, int nparticles, int step)
|
||||||
{
|
{
|
||||||
int i,t;
|
int i,t;
|
||||||
h5part_int64_t status;
|
h5part_int64_t status, val;
|
||||||
|
|
||||||
double *x,*y,*z;
|
double *x,*y,*z;
|
||||||
double *px,*py,*pz;
|
double *px,*py,*pz;
|
||||||
@@ -108,10 +108,12 @@ test_write_data64(H5PartFile *file, int nparticles, int step)
|
|||||||
id[i] = i + nparticles*t;
|
id[i] = i + nparticles*t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val = H5PartHasStep(file, t);
|
||||||
|
|
||||||
status = H5PartSetStep(file, t);
|
status = H5PartSetStep(file, t);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetStep");
|
RETURN(status, H5PART_SUCCESS, "H5PartSetStep");
|
||||||
|
|
||||||
test_write_step_attribs(file, t);
|
if (val == 0) test_write_step_attribs(file, t);
|
||||||
|
|
||||||
status = H5PartSetNumParticles(file, nparticles);
|
status = H5PartSetNumParticles(file, nparticles);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetNumParticles");
|
RETURN(status, H5PART_SUCCESS, "H5PartSetNumParticles");
|
||||||
@@ -198,7 +200,7 @@ static void
|
|||||||
test_write_data32(H5PartFile *file, int nparticles, int step)
|
test_write_data32(H5PartFile *file, int nparticles, int step)
|
||||||
{
|
{
|
||||||
int i,t;
|
int i,t;
|
||||||
h5part_int32_t status;
|
h5part_int32_t status, val;
|
||||||
int rank, nprocs;
|
int rank, nprocs;
|
||||||
|
|
||||||
float *x,*y,*z;
|
float *x,*y,*z;
|
||||||
@@ -244,8 +246,11 @@ test_write_data32(H5PartFile *file, int nparticles, int step)
|
|||||||
id[i] = i + nparticles*t;
|
id[i] = i + nparticles*t;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = H5PartSetStep(file, t);
|
val = H5PartHasStep(file, t);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartSetStep");
|
if (val == 0) {
|
||||||
|
status = H5PartSetStep(file, t);
|
||||||
|
RETURN(status, H5PART_SUCCESS, "H5PartSetStep");
|
||||||
|
}
|
||||||
|
|
||||||
/* test a two-part write using views */
|
/* test a two-part write using views */
|
||||||
status = H5PartSetView(file,
|
status = H5PartSetView(file,
|
||||||
@@ -370,8 +375,6 @@ void test_write1(void)
|
|||||||
test_write_data32(file1, NPARTICLES, 1);
|
test_write_data32(file1, NPARTICLES, 1);
|
||||||
test_write_file_attribs(file1, 0);
|
test_write_file_attribs(file1, 0);
|
||||||
|
|
||||||
_H5Part_close_hdf_ids(file1);
|
|
||||||
test_open_objects(file1, 1);
|
|
||||||
status = H5PartCloseFile(file1);
|
status = H5PartCloseFile(file1);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
|
RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
|
||||||
}
|
}
|
||||||
@@ -405,10 +408,10 @@ void test_write3(void)
|
|||||||
h5part_int64_t status;
|
h5part_int64_t status;
|
||||||
|
|
||||||
TEST( "Opening file once, write-truncate, lustre filesyste, "
|
TEST( "Opening file once, write-truncate, lustre filesyste, "
|
||||||
"MPI-POSIX VFD, 64KB alignment");
|
"MPI-POSIX VFD, 1KB alignment");
|
||||||
file1 = OPENALIGN(FILENAME,
|
file1 = OPENALIGN(FILENAME,
|
||||||
H5PART_WRITE | H5PART_VFD_MPIPOSIX | H5PART_FS_LUSTRE,
|
H5PART_WRITE | H5PART_VFD_MPIPOSIX | H5PART_FS_LUSTRE,
|
||||||
65536);
|
1024);
|
||||||
test_is_valid(file1);
|
test_is_valid(file1);
|
||||||
|
|
||||||
TEST("Redefining step name");
|
TEST("Redefining step name");
|
||||||
@@ -430,14 +433,14 @@ void test_write4(void)
|
|||||||
h5part_int64_t status;
|
h5part_int64_t status;
|
||||||
|
|
||||||
TEST( "Opening file twice, write-append + read-only, "
|
TEST( "Opening file twice, write-append + read-only, "
|
||||||
"lustre filesystem, MPI-IO Independent VFD, 64K alignment");
|
"lustre filesystem, MPI-IO Independent VFD, 1K alignment");
|
||||||
file1 = OPENALIGN(FILENAME,
|
file1 = OPENALIGN(FILENAME,
|
||||||
H5PART_APPEND | H5PART_VFD_MPIIO_IND | H5PART_FS_LUSTRE,
|
H5PART_APPEND | H5PART_VFD_MPIIO_IND | H5PART_FS_LUSTRE,
|
||||||
65536);
|
1024);
|
||||||
test_is_valid(file1);
|
test_is_valid(file1);
|
||||||
file2 = OPENALIGN(FILENAME,
|
file2 = OPENALIGN(FILENAME,
|
||||||
H5PART_READ | H5PART_VFD_MPIIO_IND | H5PART_FS_LUSTRE,
|
H5PART_READ | H5PART_VFD_MPIIO_IND | H5PART_FS_LUSTRE,
|
||||||
65536);
|
1024);
|
||||||
test_is_valid(file2);
|
test_is_valid(file2);
|
||||||
|
|
||||||
TEST("Redefining step name");
|
TEST("Redefining step name");
|
||||||
@@ -447,7 +450,10 @@ void test_write4(void)
|
|||||||
status = H5PartDefineStepName(file2, LONGNAME, 16);
|
status = H5PartDefineStepName(file2, LONGNAME, 16);
|
||||||
RETURN(status, H5PART_SUCCESS, "H5PartDefineStepName");
|
RETURN(status, H5PART_SUCCESS, "H5PartDefineStepName");
|
||||||
|
|
||||||
test_write_data64(file1, NPARTICLES, NTIMESTEPS);
|
status = H5PartSetChunkSize(file1, NPARTICLES);
|
||||||
|
RETURN(status, H5PART_SUCCESS, "H5PartSetChunkSize");
|
||||||
|
|
||||||
|
test_write_data64(file1, NPARTICLES, NTIMESTEPS-2);
|
||||||
test_write_file_attribs(file1, 1);
|
test_write_file_attribs(file1, 1);
|
||||||
|
|
||||||
status = H5PartCloseFile(file1);
|
status = H5PartCloseFile(file1);
|
||||||
|
|||||||
+14
-8
@@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
OBJEXT=o
|
OBJEXT=o
|
||||||
|
|
||||||
HDFLIB = -L@HDF5ROOT@/lib -lhdf5 -lz @SZLIB@
|
INCLUDES = -I../src @INCLUDES@
|
||||||
LIBS = -L@H5P_LIB_LOC@ @H5P_LIB_NAME@ $(HDFLIB) -lm @STDCXX@
|
|
||||||
|
|
||||||
INCLUDES = -I@H5P_LIB_LOC@ -I@HDF5ROOT@/include @MPIINC@
|
|
||||||
|
|
||||||
# What to build... make install will place these files in the $(prefix)/bin directory.
|
# What to build... make install will place these files in the $(prefix)/bin directory.
|
||||||
bin_PROGRAMS = @BUILD_TOOLS@
|
bin_PROGRAMS = @BUILD_TOOLS@
|
||||||
@@ -19,8 +16,17 @@ EXTRA_PROGRAMS = h5pAttrib \
|
|||||||
|
|
||||||
# Listing of sources
|
# Listing of sources
|
||||||
h5pAttrib_SOURCES = h5pAttrib.cc
|
h5pAttrib_SOURCES = h5pAttrib.cc
|
||||||
h5pToGNUplot_SOURCES = h5pToGNUplot.cc
|
h5pAttrib_LDADD = ../src/libH5Part.la
|
||||||
homdynToH5p_SOURCES = homdynToH5p.cc
|
|
||||||
H5PartBench_SOURCES = H5PartBench.c
|
h5pToGNUplot_SOURCES = h5pToGNUplot.cc
|
||||||
H5BlockBench_SOURCES = H5BlockBench.c
|
h5pToGNUplot_LDADD = ../src/libH5Part.la
|
||||||
|
|
||||||
|
homdynToH5p_SOURCES = homdynToH5p.cc
|
||||||
|
homdynToH5p_LDADD = ../src/libH5Part.la
|
||||||
|
|
||||||
|
H5PartBench_SOURCES = H5PartBench.c
|
||||||
|
H5PartBench_LDADD = ../src/libH5Part.la
|
||||||
|
|
||||||
|
H5BlockBench_SOURCES = H5BlockBench.c
|
||||||
|
H5BlockBench_LDADD = ../src/libH5Part.la
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user