Skip to content

Commit ae2791b

Browse files
committed
readme and minor changes
1 parent c8eb191 commit ae2791b

2 files changed

Lines changed: 53 additions & 43 deletions

File tree

README.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
Download the latest release [v1.6.0](https://github.com/Ricks-Lab/benchMT/releases/tag/v1.6.0)
44

55
This tool will extract the total number of CPU cores/threads and GPU platforms from the user's
6-
environment and utilize them in running a list of apps/args specified in the benchCFG file. Using
7-
less than the total number of CPU threads can be specified in the command line. This tool will
8-
read a list of MB/AP apps/args from the BenchCFG file and search for the specified MB/AP apps in the
9-
APP_CPU and APP_GPU directories to validate and determine platform. It will then leverage allocated
10-
threads, as specified, to run all benchmark jobs, storing results in the testData directory. Use
11-
the *--help* option to get a description of valid command line arguments. In support of automation,
12-
some command line arguments can be specified as modes in the BenchCFG file.
6+
environment and utilize them in running a list of apps/args specified in the benchCFG file.
7+
Using less than the total number of CPU threads can be specified in the command line. This
8+
tool will read a list of MB/AP apps/args from the BenchCFG file and search for the specified
9+
MB/AP apps in the APP_CPU and APP_GPU directories to validate and determine platform. It will
10+
then leverage allocated threads, as specified, to run all benchmark jobs, storing results in
11+
the testData directory. Use the *--help* option to get a description of valid command line
12+
arguments. In support of automation, some command line arguments can be specified as modes in
13+
the BenchCFG file.
1314

1415
By default, a summary list of all jobs will update in the display as the program progresses. If
1516
there are a large number of jobs, then this display may not be useful and the *--display_slots*
@@ -18,21 +19,22 @@
1819
optimize the progress display.
1920

2021
You may need to use the *--boinc_home* command option to specify the BOINC home directory, which
21-
is required, since boinccmd is used. An alternative BenchCFG file can be specified with the
22+
is required, since boinccmd is used. An alternative BenchCFG file can be specified with the
2223
command line option *--cfg_file filename*.
23-
24-
The *--lsgpu* command option can be used to display information and capability of all installed GPUs. The
25-
*--purge_kernels* can be used to purge all compiled kernels from the *benchMT* working directory.
2624

27-
All WUs in the WU_test directory will be used in the creation of jobs to be run, unless the
25+
The *--lsgpu* command option can be used to display information and capability of all installed
26+
GPUs. The *--purge_kernels* can be used to purge all compiled kernels from the *benchMT* working
27+
directory.
28+
29+
All WUs in the WU_test directory will be used in the creation of jobs to be run, unless the
2830
*--std_signals* option is used, in which case, WUs in the WU_std_signal will be used. The
2931
APPS_GPU and APPS_CPU directories can have more apps than are specified to run in the BenchCFG
3032
file, but must contain apps specified in BenchCFG. The APPS_REF directory must contain a single
3133
CPU reference app with a file prefix of "ref-cpu.". The stock CPU app is suggested, as this is
3234
only used to test integrity of the results. Elapsed time analysis is expected to be limited to
3335
apps/arg combinations specified in BenchCFG. The generation of reference results can be skipped
3436
with the *--no_ref* option or forced with the *--force_ref* option. The *--energy* option can be
35-
used if your system has amdgpu drivers with compatible GPUs to give the energy used in running a
37+
used if your system has amdgpu drivers with compatible GPUs to give the energy used in running a
3638
task. In order to correctly associate a GPU card number with a BOINC device number, you must
3739
specify this with the *--devmap B:C,B2:C2* option. I know of no robust way to make this mapping
3840
other than manually running each card individually and observing which card is being used. If
@@ -41,13 +43,13 @@
4143

4244
The results will be stored in a unique subdir of the testData directory. There is an overall run
4345
log txt file, a psv file useful for importing into an analytics tools, and the sah and stderr
44-
files for each job run. A run name can be specified with the *--run_name* command line option. This
45-
name will be included in the name of the testData subdirectory for the current run.
46-
47-
## New on Master Branch - v2.0.0-RC2 - Release Candidate
46+
files for each job run. A run name can be specified with the *--run_name* command line option.
47+
This name will be included in the name of the testData subdirectory for the current run.
48+
49+
## New in this Release - [v2.0.0](https://github.com/Ricks-Lab/benchMT/releases/tag/v2.0.0)
4850
* Complete rewrite of the core to integrate GpuItem object that was previously only used in energy mode.
49-
* Implemented a more robust check of compute and energy compatibility for all installed GPUs. Switched from lshw to
50-
lspci and clinfo. Not working for [Intel GPUs](https://github.com/Ricks-Lab/benchMT/issues/6).
51+
* Implemented a more robust check of compute and energy compatibility for all installed GPUs. Switched
52+
from lshw to lspci and clinfo. Not working for [Intel GPUs](https://github.com/Ricks-Lab/benchMT/issues/6).
5153
* Many core improvements for better robustness and style. Added reST docstrings for better supportability
5254
and improved type checking by PyCharm.
5355
* Extend energy mode to cover Nvidia, in addition to AMD GPU's. Added max-power to psv and txt reports.
@@ -60,10 +62,11 @@ and improved type checking by PyCharm.
6062
## Development Plans and Known Limitations
6163
* Doesn't work in console of server install of Ubuntu. Need to investigate this.
6264
* Currently, running more than one job at a time on a single GPU is not supported.
63-
* The clinfo output for [Intel GPUs](https://github.com/Ricks-Lab/benchMT/issues/6) doesn't seem to have a pcie id
64-
indicator based on the data I have on 1 card.
65-
* Need to find a way to [automate mapping](https://github.com/Ricks-Lab/benchMT/issues/8). of BOINC device number to
66-
Linux card number or PCIE ID. Results from reading coproc_info.html are available in --debug mode for experimentation.
65+
* The clinfo output for [Intel GPUs](https://github.com/Ricks-Lab/benchMT/issues/6) doesn't seem to have
66+
a pcie id indicator based on the data I have on 1 card.
67+
* Need to find a way to [automate mapping](https://github.com/Ricks-Lab/benchMT/issues/8) of BOINC device
68+
number to Linux card number or PCIE ID. Results from reading coproc_info.html are available in *--debug*
69+
mode for experimentation.
6770
* This package doesn't include a utility to compare AstroPulse results to a reference. If you know where
6871
a Linux version of this exists, please let me know.
6972
* Special NV app outputs results to stdout which corrupts the benchMT updating table.

benchMT

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
#!/usr/bin/env python3
2-
"""benchMT - SETI multi-threaded MB/AP Benchmark Tool
2+
""" benchMT - SETI multi-threaded MB/AP Benchmark Tool
33
44
This tool will extract the total number of CPU cores/threads and GPU platforms from the user's
5-
environment and utilize them in running a list of apps/args specified in the benchCFG file. Using
6-
less than the total number of CPU threads can be specified in the command line. This tool will
7-
read a list of MB/AP apps/args from the BenchCFG file and search for the specified MB/AP apps in the
8-
APP_CPU and APP_GPU directories to validate and determine platform. It will then leverage allocated
9-
threads, as specified, to run all benchmark jobs, storing results in the testData directory. Use
10-
the *--help* option to get a description of valid command line arguments. In support of automation,
11-
some command line arguments can be specified as modes in the BenchCFG file.
5+
environment and utilize them in running a list of apps/args specified in the benchCFG file.
6+
Using less than the total number of CPU threads can be specified in the command line. This
7+
tool will read a list of MB/AP apps/args from the BenchCFG file and search for the specified
8+
MB/AP apps in the APP_CPU and APP_GPU directories to validate and determine platform. It will
9+
then leverage allocated threads, as specified, to run all benchmark jobs, storing results in
10+
the testData directory. Use the *--help* option to get a description of valid command line
11+
arguments. In support of automation, some command line arguments can be specified as modes in
12+
the BenchCFG file.
1213
1314
By default, a summary list of all jobs will update in the display as the program progresses. If
1415
there are a large number of jobs, then this display may not be useful and the *--display_slots*
1516
option can be used to display the status of each slot as the program progresses. In some cases,
1617
there will be too many slots to display, and the *--display_compact* option can used to further
1718
optimize the progress display.
1819
19-
You may need to use the *--boinc_home* command option to specify the boinc home directory, which
20-
is required, since boinccmd is used. Specifying --noBS on the command line will allow benchMT to
21-
function without a boinc installation. An alternative BenchCFG file can be specified with the
20+
You may need to use the *--boinc_home* command option to specify the BOINC home directory, which
21+
is required, since boinccmd is used. An alternative BenchCFG file can be specified with the
2222
command line option *--cfg_file filename*.
2323
24+
The *--lsgpu* command option can be used to display information and capability of all installed
25+
GPUs. The *--purge_kernels* can be used to purge all compiled kernels from the *benchMT* working
26+
directory.
27+
2428
All WUs in the WU_test directory will be used in the creation of jobs to be run, unless the
2529
*--std_signals* option is used, in which case, WUs in the WU_std_signal will be used. The
2630
APPS_GPU and APPS_CPU directories can have more apps than are specified to run in the BenchCFG
@@ -31,15 +35,15 @@
3135
with the *--no_ref* option or forced with the *--force_ref* option. The *--energy* option can be
3236
used if your system has amdgpu drivers with compatible GPUs to give the energy used in running a
3337
task. In order to correctly associate a GPU card number with a BOINC device number, you must
34-
specify this with the *--devmap B:C,B2:C2* option. I know of no reobust way to make this mapping
38+
specify this with the *--devmap B:C,B2:C2* option. I know of no robust way to make this mapping
3539
other than manually running each card individually and observing which card is being used. If
3640
you are running an AstroPulse app, you must specify the *--astropulse* option in order for it to
3741
run properly.
3842
3943
The results will be stored in a unique subdir of the testData directory. There is an overall run
4044
log txt file, a psv file useful for importing into an analytics tools, and the sah and stderr
41-
files for each job run. A run name can be specified with the *--run_name* commane line option. This
42-
name will be included in the name of the testData subdirectory for the current run.
45+
files for each job run. A run name can be specified with the *--run_name* command line option.
46+
This name will be included in the name of the testData subdirectory for the current run.
4347
4448
Copyright (C) 2018 RueiKe
4549
@@ -61,9 +65,9 @@ __copyright__ = 'Copyright (C) 2018 RueiKe'
6165
__credits__ = ['Keith Myers - Testing and Verification']
6266
__license__ = 'GNU General Public License'
6367
__program_name__ = 'benchMT'
64-
__version__ = 'v2.0.0-RC2'
68+
__version__ = 'v2.0.0'
6569
__maintainer__ = 'RueiKe'
66-
__status__ = 'Release Candidate'
70+
__status__ = 'Stable Release'
6771
__docformat__ = 'reStructuredText'
6872

6973
import argparse
@@ -80,7 +84,6 @@ from uuid import uuid4
8084
import glob
8185
import shutil
8286
from pathlib import Path
83-
#from typing import Union
8487

8588

8689
# pylint: disable=multiple-statements
@@ -111,8 +114,10 @@ class MbConst(ObjDict):
111114
"""
112115
Defines benchMT constants used through out the code.
113116
"""
117+
# pylint: disable=attribute-defined-outside-init
114118
# pylint: disable=too-many-instance-attributes
115119
def __init__(self):
120+
# pylint: disable=attribute-defined-outside-init
116121
super().__init__({'boinc_home': '/home/boinc/BOINC/',
117122
'cpu_app_subdir': 'APPS_CPU/',
118123
'gpu_app_subdir': 'APPS_GPU/',
@@ -268,7 +273,9 @@ class BenchEnv:
268273
"""
269274
benchMT environment parameters.
270275
"""
276+
# pylint: disable=attribute-defined-outside-init
271277
def __init__(self):
278+
# pylint: disable=attribute-defined-outside-init
272279
self._display = {'hostname': 'Hostname: {}', 'run_name': 'Run Name: {}', 'app_mode': 'APP Mode: {}',
273280
'benchMT_version': 'benchMT version: {}', 'platform': 'Platform: {}',
274281
'os_desc': 'OS Description: {}', 'cpu_model': 'CPU Model: {}', 'cpu_mhz': 'CPU MHz: {}',
@@ -868,7 +875,7 @@ class BenchEnv:
868875
break
869876
time.sleep(1)
870877
except (subprocess.CalledProcessError, OSError) as except_err:
871-
print('Error: {}, could not execute boinccmd.'.format(cmd_str), file=sys.stderr)
878+
print('Error: {}, could not execute {}.'.format(except_err, cmd_str), file=sys.stderr)
872879
os.chdir(cwd)
873880

874881
def print(self, fileptr=sys.stdout):
@@ -1161,7 +1168,7 @@ class GpuList:
11611168
line_items = linestr.split(maxsplit=2)
11621169
if len(line_items) != 3:
11631170
continue
1164-
cl_vender, cl_index = tuple(re.sub(r'[\[\]]', '', line_items[0]).split('/'))
1171+
_cl_vender, cl_index = tuple(re.sub(r'[\[\]]', '', line_items[0]).split('/'))
11651172
if cl_index == '*':
11661173
continue
11671174
if ocl_index == '':
@@ -2912,7 +2919,7 @@ def main():
29122919
time.sleep(.5)
29132920
except (subprocess.CalledProcessError, OSError) as except_err:
29142921
# This exception is not effective since time succeeds even if the app fails to run.
2915-
print('Fatal Error: {} can not execute to process job: [{}].\n {}'.format(except_err, cmd_str))
2922+
print('Fatal Error: {} can not execute to process job: [{}].\n'.format(except_err, cmd_str))
29162923
env.sum_file_ptr.close()
29172924
env.psv_file_ptr.close()
29182925
sys.exit(-1)

0 commit comments

Comments
 (0)