Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
python_runs/__pycache__
python_runs/IOR_config
__pycache__
examples/test_files
logs
tmp
Expand Down
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2025 Shaker Krit, Flatiron Institute

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
# PyBenchFramework
#throw this change out
This application is being used with slurm but it can run on its own.

User must set the environment variable "PyBench_root_dir" to run run.py. Try to use mdtest_env to start the environment for MDTEST or env_start for FIO. Don't use both at the same time.

The app needs a root directory to read templates and store intermediate config files as well as log files and the like.

Options can be included as arguments to 'run.py' or as fields in a YAML config file. The config file for an FIO job looks like so:

<pre>
This application is designed to be used with `slurm` but it can run on its own.

## Installation (development)
```sh
python3 -m venv /path/to/venv
source /path/to/venv/bin/activate
git clone https://github.com/flatironinstitute/PyBenchFramework --branch cleanup
cd PyBenchFramework
pip install -e .
rehash # might not be necessary, depending on shell
```

## Running
```sh
source /path/to/venv/bin/activate
mpirun -n 2 pybench-run --benchmark "fio-independent-ranks" --slurm-job-number 0 --io-type "read" --config examples/YAML_templates/FIO_templates/test_kernel_rep3_ssd.yml --block-size 4M --first-node $(hostname -s) --total-node-count 1
```
Options can be included as arguments to 'run.py' or as fields in a YAML config file. The config
file for an FIO job looks like so:

### Configuration
```yaml
slurm_job_number:
block_size: "4M,64K,4K"
directory: /mnt/cephtest-fi5k/test-rep3-ssd/skrit/fio
Expand All @@ -22,11 +34,11 @@ hosts_file:
no_scrub: 0
unit_restart: 1
template_path: /mnt/home/skrit/Documents/testing_clones/clone1/PyBenchFramework/examples/template/template.fio
</pre>
```

The config file for an mdtest job looks like so:

<pre>
```yaml
mpi_ranks: 40,30,20,10,5
directory: /mnt/cephtestk/test-ec63/skrit/mdtest
files_per_rank: 20,10,5
Expand All @@ -38,10 +50,7 @@ offset: 1
write_data: '3901'
read_data: '3901'
node_count: 10,5,1
</pre>

One thing to note is that the main loop takes mpi ranks and multiplies it to the node count. For example, when mpi_ranks is 5 and node_count is 1, mpirun is given '-n 5' for a total of 5 mpi ranks. When mpi_ranks is 5 and node_count is 10, mpirun is given '-n 50' (5 * 10) which is distributed across 10 nodes (--map-by node -N 10).

'slurm_job_number' should, at least for now, be an inline argument. Keep in mind inline arguments are likely separated by - rather than _ --help should show all arguments as they should be inline.
```

Under the 'submit_scripts' folder, you'll see several slurm scripts. 'mdtest.sh' is a good template for submitting mdtest jobs and the scripts starting with 'ssd...' or 'hdd...' are good templates for FIO jobs.
## Slurm submission
All `submit_scripts` are currently broken.
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[build-system]
requires = ["hatchling >= 1.26"]
build-backend = "hatchling.build"

[project]
name = "BenchmarkToolkit"
version = "0.0.1"
authors = [
{ name="Shaker Krit", email="skrit@flatironinstitute.org" },
]
description = "BenchmarkToolkit is a Python library designed to simplify and streamline benchmarking tasks. This library provides a high-level abstraction over various benchmarking functions, allowing developers to easily perform performance testing and analysis with minimal setup."
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
license = "MIT"
license-files = ["LICENSE"]
dependencies = [
"cryptography", # FIXME was: 42.0.8
"matplotlib", # FIXME was: 3.9.2
"pandas", # FIXME was: 2.2.2
"paramiko", # FIXME was: 3.4.0
"psutil", # FIXME was: 6.0.0
"PyYAML",
"mpi4py",
]

[tool.hatch.build.targets.wheel]
packages = [
"src/BenchmarkToolkit",
]

[project.urls]
Repository = "https://github.com/flatironinstitute/PyBenchFramework"

[project.scripts]
pybench-run = "BenchmarkToolkit.run:main"
113 changes: 0 additions & 113 deletions python_runs/IOR_wrapper.py

This file was deleted.

7 changes: 0 additions & 7 deletions python_runs/analyze_and_rebalance_load.py

This file was deleted.

95 changes: 0 additions & 95 deletions python_runs/args_handler.py

This file was deleted.

Loading