A python package to hadd files in parallel
Project description
This is a python package to allow usage of hadd (from ROOT CERN) in parallel. It allows adding histogram and .root files. The addition will occur in blocks instead of one at all. It was designed to work with limited memory (local development primilary). The addition will use multiprocessing if avilable in your python enviroment.
Requirements:
The minimum supported python version is 3.6 and 3.7 and 3.8 are tested. Not tested on python 3.9 yet.
Install
clone this repository
git clone https://github.com/MohamedElashri/hadd-parallel
build the package from source using pip
pip3 install ./hadd-parallel
Manual
The command to use the package is
phadd
you can use it as the following (with default arguments)
phadd out.root *.root
where out.root will be the output file the contains all the *.root files.
more information about how to customize the settings are available on program help page
phadd -h
Help page
usage: phadd [-h] [-t TMPDIR] [-j NUM_JOBS] [-n NUM_FILES] [-f] [-s] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v] output_file input_files [input_files ...] Hadd ROOT histograms in parallel positional arguments: output_file the output file input_files one or more input files optional arguments: -h, --help show this help message and exit -t TMPDIR, --tmpdir TMPDIR the temporary directory to store intermediate files -j NUM_JOBS, --jobs NUM_JOBS the number of jobs to run in parallel , [default cpu_count * 2 = {N_JOBS} -n NUM_FILES, --num_files NUM_FILES the number of files to hadd at once -f, --force_overwrite force overwrite of output file -s, --save-tmp save the intermediate files, otherwise they will be deleted (which is the default) -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log {DEBUG,INFO,WARNING,ERROR,CRITICAL} the log level, [default Warning] -v, --version show program's version number and exit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file parallel-hadd-1.2.tar.gz
.
File metadata
- Download URL: parallel-hadd-1.2.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/3.7.2 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbea8bf246813a7541562937fa8a35665870f64dbf399150c45b66be04e07776 |
|
MD5 | 7591232877111f78f78dc54a1cba1cac |
|
BLAKE2b-256 | cc2fb5160417265b9b3aed41293b3efbfbcb8ea3cb93277e2771a3d4b340343b |
File details
Details for the file parallel_hadd-1.2-py3-none-any.whl
.
File metadata
- Download URL: parallel_hadd-1.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/3.7.2 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb6b7f1a6df6654b90de0ff4f58a011a4e3e1cd09a0ec90c933695cd7e1b2f0f |
|
MD5 | ea20297943ba17ff77f73a42be127f14 |
|
BLAKE2b-256 | db220251bd4a8e0997f549728afc426b310f99f4c6a42b0a9d6a2dcec70cbacf |