HDFGroup / hdf5-iotest

HDF5 Performance Analysis Checklist
Other
12 stars 9 forks source link

+TITLE: HDF5 I/O Test

+AUTHOR: Gerd Heber

+EMAIL: gheber@hdfgroup.org

+DATE: [2020-12-30 Wed]

+PROPERTY: header-args :eval never-export

This is a simple I/O performance tester for HDF5. (See also [[https://github.com/ornladios/ADIOS2/tree/master/source/utils/adios_iotest][ADIOS IOTEST]].) Its purpose is to assess the /performance variability/ of a set of logically equivalent HDF5 representations of a common pattern. The test repeatedly writes (and reads) in parallel a set of 2D array variables in a tiled fashion, over a set of "time steps." A schematic is shown below.

+begin_src plantuml :hidden :file ./img/flow.png :exports results

start

:read configuration; repeat :set internal parameters; :create HDF5 file; repeat :[create group]; repeat :[create dataset(s)]; fork :write 2D tile 1; fork again :...; fork again :write 2D tile P; end fork repeat while (last 2D array?) is (no) ->yes; repeat while (last time step?) is (no) ->yes; :close file; :... read back the data details not shown; :report timings; repeat while (last combination?) is (no) ->yes;

stop

+end_src

+RESULTS:

[[file:./img/flow.png]]

A configuration file (see below) is used to control parameters such as the number of steps, the count and shape of the 2D array variables, etc. (See section [[sec:parameters]].) The test then uses between 48 and 192 different combinations of up to 7 internal parameters (see section [[sec:internal-parameters]]) to configure the HDF5 library and output, to perform write and read operations, and to report certain timings. (The number of combinations is different for sequential and parallel runs, and depends on other choices.)

For a /baseline/, this test can (and should!) be run with a single MPI process using the POSIX, core, and MPI-IO VFDs. Typically, each baseline variant covers a different aspect of the underlying system, its configuration, and the particular HDF5 library version. Doing MPI-parallel runs without this baseline is the proverbial "getting off on the wrong foot."

While it can be built manually, we recommend building =hdf5_iotest= from [[https://computing.llnl.gov/projects/spack-hpc-package-manager][Spack]].

  1. Create a new Spack package

    +begin_src sh

    spack create --name hdf5iotest

    +end_src

    This creates a boilerplate =package.py= file, which we'll need to edit.

  2. Edit the freshly minted =package.py= via

    +begin_src sh

    spack edit hdf5iotest

    +end_src

    =package.py= should look like this:

    +begin_src python

    Copyright 2013-2020 Lawrence Livermore National Security, LLC and other

    Spack Project Developers. See the top-level COPYRIGHT file for details.

    #

    SPDX-License-Identifier: (Apache-2.0 OR MIT)

    from spack import *

    class Hdf5iotest(AutotoolsPackage): """ A simple I/O performance test for HDF5. Run with 'hdf5_iotest '. A sample INI file called hdf5_iotest.ini can be found in the share/hdf5-iotest subdirectory. It is recommended to run multiple configurations. The combinator.sh script in share/hdf5-iotest creates 24 "standard" parameter cominations. """

    homepage = "https://github.com/HDFGroup/hdf5-iotest" git = "https://github.com/HDFGroup/hdf5-iotest.git"

    maintainers = ['gheber']

    version('master', branch='master')

    depends_on('autoconf', type='build') depends_on('automake', type='build') depends_on('libtool', type='build') depends_on('m4', type='build') depends_on('mpi') depends_on('hdf5') depends_on('util-linux-uuid')

    def configure_args(self): args = [] if "+gperftools" not in self.spec: args += ["--enable-gperftools"]

       return args

    def test(self): pass

    +end_src

  3. Show the explicit dependency configuration (libraries, versions, compiler, architecture, etc. ) via

    +begin_src sh

    spack spec hdf5iotest

    +end_src

    Sample output can be found in the [[sec:spack-spec-out][appendix]].

  4. Install the hdf5iotest package and all dependencies

    +begin_src sh

    spack install hdf5iotest

    +end_src

** Installation w/o Spack You need a working installation of parallel HDF5 (which depends on MPI).

+begin_src sh

./autogen.sh CC=h5pcc ./configure --prefix= make make install

+end_src

=hdf5_iotest= accepts a single argument, the name of a configuration file. If no configuration file name is provided, it looks for a configuration named =hdf5_iotest.ini= in the current working directory.

+begin_src sh

hdf5_iotest [INI file]

+end_src

The configuration file syntax is shown [[sec:parameters][below]]:

+begin_src conf-unix :tangle src/hdf5_iotest.ini :noweb no-export

[DEFAULT] <>

+end_src

A complete configuration can be found [[https://raw.githubusercontent.com/HDFGroup/hdf5-iotest/master/src/hdf5_iotest.ini][here]].

** Custom Settings Rather than modifying the =[DEFAULT]= section, we recommend that testers create a new section, e.g., =[CUSTOM]=, and overwrite the default values as needed.

+begin_example

[DEFAULT] ...

[CUSTOM] ...

+end_example

Any parameter specified in the =[CUSTOM]= section overwrites its =[DEFAULT]= counterpart.

** Parameters<> The following configuration parameters are supported.

Currently, the I/O test varies the following parameters:

Since there is no shortage of knobs in the HDF5 API, other parameters might be added in the future.

Concretized

hdf5iotest@spack%gcc@8.3.0 arch=linux-debian10-skylake ^autoconf@2.69%gcc@8.3.0 arch=linux-debian10-skylake ^m4@1.4.18%gcc@8.3.0+sigsegv patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00,fc9b61654a3ba1a8d6cd78ce087e7c96366c290bc8d2c299f09828d793b853c8 arch=linux-debian10-skylake ^libsigsegv@2.12%gcc@8.3.0 arch=linux-debian10-skylake ^perl@5.32.0%gcc@8.3.0+cpanm+shared+threads arch=linux-debian10-skylake ^berkeley-db@18.1.40%gcc@8.3.0 arch=linux-debian10-skylake ^gdbm@1.18.1%gcc@8.3.0 arch=linux-debian10-skylake ^readline@8.0%gcc@8.3.0 arch=linux-debian10-skylake ^ncurses@6.2%gcc@8.3.0~symlinks+termlib arch=linux-debian10-skylake ^pkgconf@1.7.3%gcc@8.3.0 arch=linux-debian10-skylake ^automake@1.16.3%gcc@8.3.0 arch=linux-debian10-skylake ^hdf5@1.10.7%gcc@8.3.0~cxx~debug~fortran~hl~java+mpi+pic+shared~szip~threadsafe api=none arch=linux-debian10-skylake ^openmpi@4.0.5%gcc@8.3.0~atomics~cuda~cxx~cxx_exceptions+gpfs~java~legacylaunchers~lustre~memchecker~pmi~singularity~sqlite3+static~thread_multiple+vt+wrapper-rpath fabrics=none schedulers=none arch=linux-debian10-skylake ^hwloc@2.2.0%gcc@8.3.0~cairo~cuda~gl~libudev+libxml2~netloc~nvml+pci+shared arch=linux-debian10-skylake ^libpciaccess@0.16%gcc@8.3.0 arch=linux-debian10-skylake ^libtool@2.4.6%gcc@8.3.0 arch=linux-debian10-skylake ^util-macros@1.19.1%gcc@8.3.0 arch=linux-debian10-skylake ^libxml2@2.9.10%gcc@8.3.0~python arch=linux-debian10-skylake ^libiconv@1.16%gcc@8.3.0 arch=linux-debian10-skylake ^xz@5.2.5%gcc@8.3.0~pic arch=linux-debian10-skylake ^zlib@1.2.11%gcc@8.3.0+optimize+pic+shared arch=linux-debian10-skylake ^numactl@2.0.14%gcc@8.3.0 patches=4e1d78cbbb85de625bad28705e748856033eaafab92a66dffd383a3d7e00cc94 arch=linux-debian10-skylake

+end_example

** Sample CSV Output The CSV output looks like this. It's then easy to concatenate several of these (after stripping out the header), and load them into [[https://pandas.pydata.org/][pandas]] or [[https://www.r-project.org/][R]].

+begin_example

steps,arrays,rows,cols,scaling,proc-rows,proc-cols,slowdim,rank,version,alignment-increment,alignment-threshold,layout,fill,fmt,io,wall [s],fsize [B],write-phase-min [s],write-phase-max [s],creat-min [s],creat-max [s],write-min [s],write-max [s],read-phase-min [s],read-phase-max [s],read-min [s],read-max [s] 20,500,100,200,weak,1,1,step,2,"1.8.22",1,0,contiguous,true,earliest,core,15.37,1689710848,14.10,14.10,7.25,7.25,0.77,0.77,1.27,1.27,0.27,0.27 20,500,100,200,weak,1,1,step,2,"1.8.22",1,0,contiguous,true,latest,core,20.70,1682116757,19.53,19.53,12.08,12.08,0.78,0.78,1.17,1.17,0.28,0.28 ...

+end_example

*** Metrics All timings are obtained via =MPI_Wtime=. For some metrics, we record minima and maxima across MPI ranks. The columns =steps= through =mpi-io= are just reiterations of the configuration parameters. The remaining columns are as follows: