-
Notifications
You must be signed in to change notification settings - Fork 117
[test] Add Intel Inspector test #710
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f0429df
inspector
jgphpc 4af0bef
Merge branch 'master' into intel_inspector
jgphpc 5fbef83
2019not installed on daint
jgphpc cf8b2a8
Merge branch 'intel_inspector' of https://github.com/jgphpc/reframe i…
jgphpc 698bcdd
PrgEnv-intel is enough
jgphpc 033b451
typo
jgphpc 42c7a8e
typo
jgphpc a2f8ffb
typo3
jgphpc 8106d14
review1
jgphpc 52d7bda
Merge branch 'master' of https://github.com/jgphpc/reframe into intel…
jgphpc bb316bc
https://github.com/eth-cscs/reframe/pull/710#discussion_r264561446
jgphpc 0733670
Merge branch 'master' into intel_inspector
2f1c279
Adding description
jgphpc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
85 changes: 85 additions & 0 deletions
85
cscs-checks/tools/profiling_and_debugging/intel_inspector.py
This file contains hidden or 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,85 @@ | ||
| import os | ||
|
|
||
| import reframe as rfm | ||
| import reframe.utility.sanity as sn | ||
|
|
||
|
|
||
| @rfm.required_version('>=2.14') | ||
| @rfm.parameterized_test(['C++'], ['F90']) | ||
| class IntelInspectorTest(rfm.RegressionTest): | ||
| def __init__(self, lang): | ||
| super().__init__() | ||
| self.name = 'Intel_Inspector_%s' % lang.replace('+', 'p') | ||
| self.descr = self.name | ||
| self.valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc'] | ||
| self.valid_prog_environs = ['PrgEnv-intel'] | ||
| self.prgenv_flags = { | ||
| 'PrgEnv-gnu': ['-O2', '-g', '-fopenmp'], | ||
| 'PrgEnv-cray': ['-O2', '-g', '-homp'], | ||
| 'PrgEnv-intel': ['-O2', '-g', '-qopenmp'], | ||
| 'PrgEnv-pgi': ['-O2', '-g', '-mp'] | ||
| } | ||
| self.sourcesdir = os.path.join('src', lang) | ||
| self.executable = 'inspxe-cl -collect mi1 ./jacobi' | ||
| self.build_system = 'Make' | ||
| if lang == 'F90': | ||
| self.build_system.max_concurrency = 1 | ||
|
|
||
| self.num_tasks = 3 | ||
| self.num_tasks_per_node = 3 | ||
| self.num_cpus_per_task = 4 | ||
| self.num_iterations = 10 | ||
| self.variables = { | ||
| 'OMP_NUM_THREADS': str(self.num_cpus_per_task), | ||
| 'ITERATIONS': str(self.num_iterations), | ||
| 'OMP_PROC_BIND': 'true', | ||
| 'CRAYPE_LINK_TYPE': 'dynamic', | ||
| } | ||
| self.version_rpt = 'Intel_Inspector_version.rpt' | ||
| self.summary_rpt = 'Intel_Inspector_summary.rpt' | ||
| self.problems_rpt = 'Intel_Inspector_problems.rpt' | ||
| self.observations_rpt = 'Intel_Inspector_observations.rpt' | ||
| self.pre_run = [ | ||
| 'source $INTEL_PATH/../inspector/inspxe-vars.sh', | ||
| 'inspxe-cl -h collect' | ||
| ] | ||
| self.post_run = [ | ||
| 'inspxe-cl -V &> %s' % self.version_rpt, | ||
| 'inspxe-cl -report=summary &> %s' % self.summary_rpt, | ||
| 'inspxe-cl -report=problems &> %s' % self.problems_rpt, | ||
| 'inspxe-cl -report=observations &> %s' % self.observations_rpt, | ||
| ] | ||
| self.maintainers = ['JG'] | ||
| self.tags = {'production'} | ||
|
|
||
| def setup(self, partition, environ, **job_opts): | ||
| super().setup(partition, environ, **job_opts) | ||
| environ_name = self.current_environ.name | ||
| prgenv_flags = self.prgenv_flags[environ_name] | ||
| self.build_system.cflags = prgenv_flags | ||
| self.build_system.cxxflags = prgenv_flags | ||
| self.build_system.fflags = prgenv_flags | ||
| regexversion = (r'^Intel\(R\)\sInspector\s\d+\sUpdate\s\d+\s\(build' | ||
| r'\s(?P<toolsversion>\d+)') | ||
| if self.current_system.name == 'dom': | ||
| toolsversion = '579146' | ||
| elif self.current_system.name == 'daint': | ||
| toolsversion = '551023' | ||
jgphpc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| self.sanity_patterns = sn.all([ | ||
| # check the job: | ||
| sn.assert_found('SUCCESS', self.stdout), | ||
| # check the version: | ||
| sn.assert_eq(sn.extractsingle(regexversion, self.version_rpt, | ||
| 'toolsversion'), toolsversion), | ||
| # check the reports: | ||
| sn.assert_found(r'1 Memory leak problem\(s\) detected', | ||
| self.summary_rpt), | ||
| sn.assert_found(r'1 Memory not deallocated problem\(s\) detected', | ||
| self.summary_rpt), | ||
| sn.assert_found(r'_main.\w+\(\d+\): Warning X\d+: P\d: ' | ||
| r'Memory not deallocated:', | ||
| self.observations_rpt), | ||
| sn.assert_found(r'_main.\w+\(\d+\): Warning X\d+:', | ||
| self.problems_rpt), | ||
| ]) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.