-
Notifications
You must be signed in to change notification settings - Fork 2
Benchpress/minebench #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
4d0198e
229d188
49e7add
d7190f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Copyright (c) 2018-present, Facebook, Inc. | ||
| # All rights reserved. | ||
| # | ||
| # This source code is licensed under the BSD-style license found in the | ||
| # LICENSE file in the root directory of this source tree. An additional grant | ||
| # of patent rights can be found in the PATENTS file in the same directory. | ||
|
|
||
| import re | ||
|
|
||
| from benchpress.lib.parser import Parser | ||
|
|
||
|
|
||
| def _minebench_regex_parser(regex, output): | ||
| m = re.search(regex, output) | ||
| return m.groupdict() if m else {} | ||
|
|
||
|
|
||
| def _field_map(d, keys, f): | ||
| return {k: f(d[k]) for k in keys if k in d} | ||
|
|
||
|
|
||
| class KMeansParser(Parser): | ||
| """Example output: | ||
| real 2.00 | ||
| user 1.50 | ||
| sys 0.02 | ||
| """ | ||
|
|
||
| TIME_REGEX = ( | ||
| r'^real\s(?P<real>\d+\.\d+)' | ||
| r'user\s(?P<user>\d+\.\d+)' | ||
| r'sys\s(?P<sys>\d+\.\d+)' | ||
| ) | ||
|
|
||
| def parse(self, stdout, stderr, returncode): | ||
| output = ''.join(stderr) | ||
| times = _minebench_regex_parser(KMeansParser.TIME_REGEX, output) | ||
| times = _field_map(times, ['real', 'user', 'sys'], float) | ||
| return {'execution_time': times} | ||
|
|
||
|
|
||
| class PLSAParser(Parser): | ||
| """Example output: | ||
| Forward time: 26.47s | ||
| BackwardFindPathsForHugeBlock Time: 7.60 | ||
| Second phase in backward period Time: 6.19 | ||
|
|
||
| Success! | ||
| Total time: 40.26s | ||
| """ | ||
|
|
||
| PLSA_REGEX = r'Total\stime:\s(?P<total_time>\d+\.\d+)s' | ||
|
|
||
| def parse(self, stdout, stderr, returncode): | ||
| output = ''.join(stdout) | ||
| times = _minebench_regex_parser(PLSAParser.PLSA_REGEX, output) | ||
| times = _field_map(times, ['total_time'], float) | ||
| return {'execution_time': times} | ||
|
|
||
|
|
||
| class RSearchParser(Parser): | ||
| """Example output: | ||
| we cost 199.2 seconds totally, 22.0 for making histogram | ||
| Fin | ||
| """ | ||
|
|
||
| RSEARCH_REGEX = r'we\scost\s(?P<total_time>\d+\.\d+)\sseconds' | ||
|
|
||
| def parse(self, stdout, stderr, returncode): | ||
| output = ''.join(stdout) | ||
| times = _minebench_regex_parser(RSearchParser.RSEARCH_REGEX, output) | ||
| times = _field_map(times, ['total_time'], float) | ||
| return {'execution_time': times} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| #!/bin/bash | ||
| set -e | ||
| set -x | ||
|
|
||
| NU_MINEBENCH_VERSION='NU-MineBench-3.0.1' | ||
| NU_MINEBENCH_TAR_FILE="${NU_MINEBENCH_VERSION}.tar.gz" | ||
| NU_MINEBENCH_DOWNLOAD_URL="http://cucis.ece.northwestern.edu/projects/DMS" | ||
|
|
||
| KMEANS_DATASET_TAR_FILE="kmeans.tar.gz" | ||
| PLSA_DATASET_TAR_FILE="PLSA.tar.gz" | ||
| RSEARCH_DATASET_TAR_FILE="rsearch.tar.gz" | ||
| NU_MINEBENCH_DATASETS="${KMEANS_DATASET_TAR_FILE} ${PLSA_DATASET_TAR_FILE} ${RSEARCH_DATASET_TAR_FILE}" | ||
|
|
||
| BENCHMARKS_DIR="$(pwd)/benchmarks" | ||
| mkdir -p "${BENCHMARKS_DIR}" | ||
| mkdir -p "${BENCHMARKS_DIR}/minebench" | ||
| mkdir -p "${BENCHMARKS_DIR}/minebench/datasets" | ||
|
|
||
|
|
||
|
|
||
| echo 'Downloading NU-MineBench and its datasets' | ||
| cd "${BENCHMARKS_DIR}/minebench/datasets/" | ||
| for dataset in $NU_MINEBENCH_DATASETS; do | ||
| wget "${NU_MINEBENCH_DOWNLOAD_URL}/DATASETS/$dataset" | ||
| tar -zxvf $dataset | ||
| done | ||
| cd "${BENCHMARKS_DIR}/.." | ||
|
|
||
| cp templates/time_wrap.sh "${BENCHMARKS_DIR}/minebench/" | ||
| chmod u+x "${BENCHMARKS_DIR}/minebench/time_wrap.sh" | ||
|
|
||
| rm -rf build | ||
| mkdir -p build | ||
| cd build | ||
|
|
||
| wget "${NU_MINEBENCH_DOWNLOAD_URL}/${NU_MINEBENCH_TAR_FILE}" | ||
| tar -xzvf "${NU_MINEBENCH_TAR_FILE}" | ||
| cd "$NU_MINEBENCH_VERSION" | ||
|
|
||
|
|
||
|
|
||
| echo 'Compiling and Installing KMeans' | ||
| cd 'KMeans/' | ||
| make OPTFLAGS="-O3" example | ||
| cp 'example' "${BENCHMARKS_DIR}/minebench/kmeans" | ||
| cd ../ | ||
| echo 'Done installing KMeans' | ||
|
|
||
| echo 'Compiling and Installing PLSA' | ||
| cd 'PLSA/' | ||
| make COMPILEOPTION='-g -Wno-write-strings -fopenmp -O3' -f Makefile.omp | ||
| cp 'parasw.mt' "${BENCHMARKS_DIR}/minebench/plsa" | ||
| cd ../ | ||
| echo 'Done installing PLSA' | ||
|
|
||
| echo 'Compiling and Installing RSearch' | ||
| cd 'RSEARCH/' | ||
| ./configure --prefix="${BENCHMARKS_DIR}/minebench/rsearch" | ||
| make CFLAGS="-O3 -fopenmp" | ||
| make install | ||
| cd ../ | ||
| echo 'Done installing RSearch' | ||
|
|
||
| cd ../../ | ||
|
|
||
| rm -rf build/ | ||
|
|
||
| echo "NU-MineBench installed into ${BENCHMARKS_DIR}/minebench" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| /usr/bin/time -p "$@" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Time might not always be in /usr/bin. Maybe just call 'time' and assume its added in the path?
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'll verify with |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| Parellel Smith Waterman Algorithm implementation for OpenMP | ||
| Threads Number=2 | ||
| The file 'benchmarks/minebench/datasets/PLSA/pam120.bla' was opened | ||
| The file 'benchmarks/minebench/datasets/PLSA/30k_1.txt' was opened | ||
| The file 'benchmarks/minebench/datasets/PLSA/30k_2.txt' was opened | ||
| Seqence(1) Length=30144, Sequence Length(2)=29696 | ||
| Adjust block height=17, block width=17 | ||
| score=101948 x=29567 y=29696 globalstart.i=3 globalstart.j=130 | ||
| Forward time: 29.22s | ||
| BackwardFindPathsForHugeBlock Time: 8.35 | ||
| Second phase in backward period Time: 6.12 | ||
|
|
||
| Success! | ||
| Total time: 43.69s |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| Random seed: 1524699649 | ||
| D scale of 2.0 | ||
| Matrix: RIBOSUM85-60 | ||
| Alpha: 10.00 | ||
| Beta: 5.00 | ||
| Alpha': 0.00 | ||
| Beta': 15.00 | ||
| Query file: benchmarks/minebench/datasets/rsearch/Queries/mir-40.stk | ||
| Database file: benchmarks/minebench/datasets/rsearch/Databasefile/100Kdb.fa | ||
|
|
||
|
|
||
| beginsc = 0.000000 | ||
| endsc = -15.000000 | ||
| Making histogram cost 24.8 seconds | ||
| Statistics calculated with simulation of 100 samples of length 388 | ||
| No partition points | ||
| GC = 0 lambda = 0.0000 mu = inf | ||
| GC = 1 lambda = 0.0000 mu = inf | ||
| GC = 2 lambda = 0.0000 mu = inf | ||
| GC = 3 lambda = 0.0000 mu = inf | ||
| GC = 4 lambda = 0.0000 mu = inf | ||
| GC = 5 lambda = 0.0000 mu = inf | ||
| GC = 6 lambda = 0.0000 mu = inf | ||
| GC = 7 lambda = 0.0000 mu = inf | ||
| GC = 8 lambda = 0.0000 mu = inf | ||
| GC = 9 lambda = 0.0000 mu = inf | ||
| GC = 10 lambda = 0.0000 mu = inf | ||
| GC = 11 lambda = 0.0000 mu = inf | ||
| GC = 12 lambda = 0.0000 mu = inf | ||
| GC = 13 lambda = 0.0000 mu = inf | ||
| GC = 14 lambda = 0.0000 mu = inf | ||
| GC = 15 lambda = 0.0000 mu = inf | ||
| GC = 16 lambda = 0.0000 mu = inf | ||
| GC = 17 lambda = 0.0000 mu = inf | ||
| GC = 18 lambda = 0.0000 mu = inf | ||
| GC = 19 lambda = 0.0000 mu = inf | ||
| GC = 20 lambda = 0.0000 mu = inf | ||
| GC = 21 lambda = 0.0000 mu = inf | ||
| GC = 22 lambda = 0.0000 mu = inf | ||
| GC = 23 lambda = 0.0000 mu = inf | ||
| GC = 24 lambda = 0.0000 mu = inf | ||
| GC = 25 lambda = 0.0000 mu = inf | ||
| GC = 26 lambda = 0.0000 mu = inf | ||
| GC = 27 lambda = 0.0000 mu = inf | ||
| GC = 28 lambda = 0.0000 mu = inf | ||
| GC = 29 lambda = 0.0000 mu = inf | ||
| GC = 30 lambda = 0.0000 mu = inf | ||
| GC = 31 lambda = 0.0000 mu = inf | ||
| GC = 32 lambda = 0.0000 mu = inf | ||
| GC = 33 lambda = 0.0000 mu = inf | ||
| GC = 34 lambda = 0.0000 mu = inf | ||
| GC = 35 lambda = 0.0000 mu = inf | ||
| GC = 36 lambda = 0.0000 mu = inf | ||
| GC = 37 lambda = 0.0000 mu = inf | ||
| GC = 38 lambda = 0.0000 mu = inf | ||
| GC = 39 lambda = 0.0000 mu = inf | ||
| GC = 40 lambda = 0.0000 mu = inf | ||
| GC = 41 lambda = 0.0000 mu = inf | ||
| GC = 42 lambda = 0.0000 mu = inf | ||
| GC = 43 lambda = 0.0000 mu = inf | ||
| GC = 44 lambda = 0.0000 mu = inf | ||
| GC = 45 lambda = 0.0000 mu = inf | ||
| GC = 46 lambda = 0.0000 mu = inf | ||
| GC = 47 lambda = 0.0000 mu = inf | ||
| GC = 48 lambda = 0.0000 mu = inf | ||
| GC = 49 lambda = 0.0000 mu = inf | ||
| GC = 50 lambda = 0.0000 mu = inf | ||
| GC = 51 lambda = 0.0000 mu = inf | ||
| GC = 52 lambda = 0.0000 mu = inf | ||
| GC = 53 lambda = 0.0000 mu = inf | ||
| GC = 54 lambda = 0.0000 mu = inf | ||
| GC = 55 lambda = 0.0000 mu = inf | ||
| GC = 56 lambda = 0.0000 mu = inf | ||
| GC = 57 lambda = 0.0000 mu = inf | ||
| GC = 58 lambda = 0.0000 mu = inf | ||
| GC = 59 lambda = 0.0000 mu = inf | ||
| GC = 60 lambda = 0.0000 mu = inf | ||
| GC = 61 lambda = 0.0000 mu = inf | ||
| GC = 62 lambda = 0.0000 mu = inf | ||
| GC = 63 lambda = 0.0000 mu = inf | ||
| GC = 64 lambda = 0.0000 mu = inf | ||
| GC = 65 lambda = 0.0000 mu = inf | ||
| GC = 66 lambda = 0.0000 mu = inf | ||
| GC = 67 lambda = 0.0000 mu = inf | ||
| GC = 68 lambda = 0.0000 mu = inf | ||
| GC = 69 lambda = 0.0000 mu = inf | ||
| GC = 70 lambda = 0.0000 mu = inf | ||
| GC = 71 lambda = 0.0000 mu = inf | ||
| GC = 72 lambda = 0.0000 mu = inf | ||
| GC = 73 lambda = 0.0000 mu = inf | ||
| GC = 74 lambda = 0.0000 mu = inf | ||
| GC = 75 lambda = 0.0000 mu = inf | ||
| GC = 76 lambda = 0.0000 mu = inf | ||
| GC = 77 lambda = 0.0000 mu = inf | ||
| GC = 78 lambda = 0.0000 mu = inf | ||
| GC = 79 lambda = 0.0000 mu = inf | ||
| GC = 80 lambda = 0.0000 mu = inf | ||
| GC = 81 lambda = 0.0000 mu = inf | ||
| GC = 82 lambda = 0.0000 mu = inf | ||
| GC = 83 lambda = 0.0000 mu = inf | ||
| GC = 84 lambda = 0.0000 mu = inf | ||
| GC = 85 lambda = 0.0000 mu = inf | ||
| GC = 86 lambda = 0.0000 mu = inf | ||
| GC = 87 lambda = 0.0000 mu = inf | ||
| GC = 88 lambda = 0.0000 mu = inf | ||
| GC = 89 lambda = 0.0000 mu = inf | ||
| GC = 90 lambda = 0.0000 mu = inf | ||
| GC = 91 lambda = 0.0000 mu = inf | ||
| GC = 92 lambda = 0.0000 mu = inf | ||
| GC = 93 lambda = 0.0000 mu = inf | ||
| GC = 94 lambda = 0.0000 mu = inf | ||
| GC = 95 lambda = 0.0000 mu = inf | ||
| GC = 96 lambda = 0.0000 mu = inf | ||
| GC = 97 lambda = 0.0000 mu = inf | ||
| GC = 98 lambda = 0.0000 mu = inf | ||
| GC = 99 lambda = 0.0000 mu = inf | ||
| GC = 100 lambda = 0.0000 mu = inf | ||
| N = 235320 | ||
| Using E cutoff of 10.00 | ||
| we cost 225.7 seconds totally, 24.8 for making histogram | ||
| Fin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a section for prerequisites and add the libraries we assume are going to be installed.
Maybe use our test host as baseline and then add any additional libraries that were installed before we can run this benchmark