Giter Site home page Giter Site logo

hdf5_mt_io_workaround's Introduction

hdf5_mt_io_workaround

An experimental program to perform multi-threaded I/O using the HDF5 library and POSIX pread(2) calls to get around the global thread lock used to protect the HDF5 library.

Building

Use h5cc to build each test program. Note that the reader needs to link to a third-party threadpool library I've included as a git submodule. You'll need to initialize the submodule after cloning with:

git submodule init
git submodule update

To build the submodule (in subdirectory):

gcc -c thpool.c -o thpool.o
ar rcs libthpool.a thpool.o

Then copy the header and static library to the main program directory.

To build the programs:

path/to/h5cc -o generator generator.c
path/to/h5cc -L. -lthpool -pthread -o reader reader.c

Run

Run the generator first, then the reader. The generator creates the test file and the reader opens it and reads it using three different forms of I/O:

  • H5Dread calls
  • H5Dread_chunk calls
  • A single-threaded version of the multithreaded work-around
  • The multithreaded work-around

The generator currently takes no command-line options. If you want to adjust the size of the generated file or the dataset chunk size, you'll have to modify the mt_work_around.h file.

The reader has options for the algorithm and number of threads (when using the multithreaded work-around). Run reader -? to get an updated list of the options.

The multithreaded hack gets the address and size of the dataset's chunks from the HDF5 library on the main thread and then fires off POSIX I/O read and verify tasks for the thread pool to execute. This has the clever property of allowing concurrent dataset I/O while only allowing one thread to be in the at one time.

hdf5_mt_io_workaround's People

Contributors

derobins avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.