-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
747 changed files
with
29,754 additions
and
428,343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ RUN yum -y update && yum -y install \ | |
make \ | ||
strace \ | ||
git \ | ||
glib2-devel \ | ||
yum clean all | ||
|
||
# Go language | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# IOR Benchmark Example | ||
|
||
This example illustrates the use of pdwfs with the HPC I/O benchmark tool [IOR](https://github.com/hpc/ior). | ||
|
||
The example runs in a Jupyter notebook and everything you need is packaged in a Dockerfile. | ||
|
||
We also provide a Makefile which does the plumbing for you. So, to build and run the container, just type: | ||
|
||
``` | ||
$ git clone https://github.com/cea-hpc/pdwfs | ||
$ cd pdwfs | ||
$ make -C examples/ior_benchmark run | ||
``` | ||
|
||
When the Jupyter notebook server is up and running, open your browser on your host at http://localhost:8888, open the notebook *ior_example.ipynb* and follow the steps. | ||
|
||
This example also allows to run the benchmark in a non-interactive way and save the results in the output directory. To run the benchmark this way, just type: | ||
``` | ||
$ make -C examples/ior_benchmark bench | ||
``` | ||
Once finished it will show you the results in your browser. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
import sys | ||
import glob | ||
import subprocess | ||
from datetime import datetime | ||
|
||
# override the matplotlib import in utils.py | ||
import matplotlib | ||
matplotlib.use('Agg') | ||
import matplotlib.pyplot | ||
|
||
# load local utils.py module | ||
import utils | ||
|
||
bench_script = """ | ||
#!/bin/bash | ||
cd run | ||
echo " Executing the benchmark on disk" | ||
mpirun ior -f ../ior_script > /output/ior_disk.out | ||
echo " Executing the benchmark with pdwfs" | ||
# start a new Redis instance in the background | ||
redis-cli shutdown 2> /dev/null | ||
redis-server --daemonize yes --save "" > /dev/null | ||
# wrap the previous command with pdwfs -p . (indicating the current directory as the intercepted directory) | ||
pdwfs -p . -- mpirun ior -f ../ior_script > /output/ior_pdwfs.out | ||
""" | ||
|
||
def run_bench(api, version): | ||
|
||
bench_title = api + " IOR benchmark - pdwfs " + version + " - " + str(datetime.utcnow()) + " UTC" | ||
print "Running:", bench_title | ||
|
||
read = "1" # 1: perform read benchmark | ||
numTasks="2" # number of parallel processes | ||
filePerProc="0" # 1: write one file per processes | ||
collective="1" # 1: enable collective IO operations (MPIIO, HDF5 only) | ||
segmentCount="1" # see previous schematic | ||
transferSize = ["512k", "1m", "3m", "5m", "7m", "10m","25m","35m", "50m","60m","75m","85m", "100m","115m","125m","150m","175m","200m", "225m", "250m"] | ||
utils.build_ior_script(api, read, numTasks, filePerProc, collective, segmentCount, transferSize) | ||
|
||
with open("run/bench.sh", "w") as f: | ||
f.write(bench_script) | ||
|
||
subprocess.check_call(["bash", "run/bench.sh"]) | ||
|
||
print " Parsing and saving the results in a plot" | ||
df_disk = utils.parse_ior_results("/output/ior_disk.out") | ||
df_pdwfs = utils.parse_ior_results("/output/ior_pdwfs.out") | ||
|
||
os.rename("/output/ior_disk.out", "/output/ior_" + api + "_disk.out") | ||
os.rename("/output/ior_pdwfs.out", "/output/ior_" + api + "_pdwfs-" + version + ".out") | ||
|
||
matplotlib.use('Agg') | ||
|
||
for readOrWrite in ["write", "read"]: | ||
filename = readOrWrite + "_ior_" + api + "_pdwfs-" + version + ".png" | ||
utils.plot_results( | ||
readOrWrite, | ||
df_disk[df_disk["Operation"] == readOrWrite], | ||
df_pdwfs[df_pdwfs["Operation"] == readOrWrite], | ||
title=bench_title, | ||
filename="/output/" + filename) | ||
with open("/output/bench.html", "a") as f: | ||
f.write("<img src=" + filename + ">\n") | ||
|
||
if __name__ == '__main__': | ||
|
||
for f in glob.glob("/output/*"): | ||
os.remove(f) | ||
|
||
version = sys.argv[1] | ||
run_bench("POSIX", version) | ||
run_bench("MPIIO", version) | ||
run_bench("HDF5", version) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
IOR START | ||
api={{ api }} | ||
verbose=0 | ||
testFile=testFile | ||
writeFile=1 | ||
readFile={{ read }} | ||
numTasks={{ numTasks }} | ||
filePerProc={{ filePerProc }} | ||
collective={{ collective }} | ||
segmentCount={{ segmentCount }} | ||
{% for size in transferSize %} | ||
RUN | ||
blockSize={{ size }} | ||
transferSize={{ size }} | ||
{% endfor %} | ||
IOR STOP |
Oops, something went wrong.