From 779c0f479f05be80fd329fec0ff485ca93419e25 Mon Sep 17 00:00:00 2001 From: jgp Date: Fri, 7 Jun 2019 10:48:26 +0200 Subject: [PATCH] latest version fixes the issue --- .../intel_inspector.py | 57 ++++++++-------- .../profiling_and_debugging/intel_vtune.py | 65 ++++++++++--------- 2 files changed, 65 insertions(+), 57 deletions(-) diff --git a/cscs-checks/tools/profiling_and_debugging/intel_inspector.py b/cscs-checks/tools/profiling_and_debugging/intel_inspector.py index e831611443..57584fa62a 100644 --- a/cscs-checks/tools/profiling_and_debugging/intel_inspector.py +++ b/cscs-checks/tools/profiling_and_debugging/intel_inspector.py @@ -4,50 +4,59 @@ import reframe.utility.sanity as sn -@rfm.required_version('>=2.14') @rfm.parameterized_test(['C++'], ['F90']) class IntelInspectorTest(rfm.RegressionTest): + '''This test checks Intel Inspector: + https://software.intel.com/en-us/inspector + ''' 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.modules = ['inspector'] 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.executable = 'inspxe-cl' + self.target_executable = './jacobi' + self.prgenv_flags = { + 'PrgEnv-gnu': ['-g', '-O2', '-fopenmp'], + 'PrgEnv-cray': ['-g', '-O2', '-homp'], + 'PrgEnv-intel': ['-g', '-O2', '-qopenmp'], + 'PrgEnv-pgi': ['-g', '-O2', '-mp'] + } + self.executable_opts = ['-collect mi1 %s' % self.target_executable] + self.exclusive = True self.num_tasks = 3 self.num_tasks_per_node = 3 self.num_cpus_per_task = 4 - self.num_iterations = 10 + self.num_tasks_per_core = 1 + self.use_multithreading = False + num_iterations = 10 self.variables = { 'OMP_NUM_THREADS': str(self.num_cpus_per_task), - 'ITERATIONS': str(self.num_iterations), + 'ITERATIONS': str(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.version_rpt = 'version.rpt' + self.problems_rpt = 'problems.rpt' + self.summary_rpt = 'summary.rpt' + self.observations_rpt = 'observations.rpt' self.pre_run = [ - 'source $INTEL_PATH/../inspector/inspxe-vars.sh', - 'inspxe-cl -h collect' + 'mv %s %s' % (self.executable, self.target_executable), + '%s --version &> %s' % (self.executable, self.version_rpt), ] 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, + '%s -V &> %s' % (self.executable, self.version_rpt), + '%s -report=summary &> %s' % (self.executable, self.summary_rpt), + '%s -report=problems &> %s' % (self.executable, self.problems_rpt), + '%s -report=observations &> %s' % + (self.executable, self.observations_rpt), ] self.maintainers = ['JG'] self.tags = {'production'} @@ -61,15 +70,11 @@ def setup(self, partition, environ, **job_opts): self.build_system.fflags = prgenv_flags regexversion = (r'^Intel\(R\)\sInspector\s\d+\sUpdate\s\d+\s\(build' r'\s(?P\d+)') - if self.current_system.name == 'dom': - toolsversion = '579146' - elif self.current_system.name == 'daint': - toolsversion = '551023' - + toolsversion = '597413' self.sanity_patterns = sn.all([ # check the job: sn.assert_found('SUCCESS', self.stdout), - # check the version: + # check the tool's version: sn.assert_eq(sn.extractsingle(regexversion, self.version_rpt, 'toolsversion'), toolsversion), # check the reports: diff --git a/cscs-checks/tools/profiling_and_debugging/intel_vtune.py b/cscs-checks/tools/profiling_and_debugging/intel_vtune.py index 6a37c35b5c..fbe98e641c 100644 --- a/cscs-checks/tools/profiling_and_debugging/intel_vtune.py +++ b/cscs-checks/tools/profiling_and_debugging/intel_vtune.py @@ -4,13 +4,11 @@ import reframe.utility.sanity as sn -@rfm.required_version('>=2.14') @rfm.parameterized_test(['C++'], ['F90']) class IntelVTuneAmplifierTest(rfm.RegressionTest): - '''This test checks Intel VTune Amplifier: + '''This test checks Intel VTune Amplifier and the -Cperf slurm constraint + (that sets perf_event_paranoid to 0 for advanced performance analysis) https://software.intel.com/en-us/intel-vtune-amplifier-xe - and the -Cperf slurm constraint (that sets perf_event_paranoid to 0 for - advanced performance analysis) ''' def __init__(self, lang): super().__init__() @@ -18,67 +16,72 @@ def __init__(self, lang): 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.modules = ['vtune_amplifier'] self.sourcesdir = os.path.join('src', lang) - self.executable = 'amplxe-cl' - self.executable_opts = ['-trace-mpi -collect hotspots -r ./hotspots', - '-data-limit=0 ./jacobi'] self.build_system = 'Make' if lang == 'F90': self.build_system.max_concurrency = 1 + self.executable = 'amplxe-cl' + self.target_executable = './jacobi' + self.prgenv_flags = { + 'PrgEnv-gnu': ['-g', '-O2', '-fopenmp'], + 'PrgEnv-cray': ['-g', '-O2', '-homp'], + 'PrgEnv-intel': ['-g', '-O2', '-qopenmp'], + 'PrgEnv-pgi': ['-g', '-O2', '-mp'] + } + self.executable_opts = ['-trace-mpi -collect hotspots -r ./hotspots', + '-data-limit=0 %s' % self.target_executable] + self.exclusive = True self.num_tasks = 3 self.num_tasks_per_node = 3 self.num_cpus_per_task = 4 - self.num_iterations = 10 + self.num_tasks_per_core = 1 + self.use_multithreading = False + num_iterations = 10 self.variables = { 'OMP_NUM_THREADS': str(self.num_cpus_per_task), - 'ITERATIONS': str(self.num_iterations), + 'ITERATIONS': str(num_iterations), 'OMP_PROC_BIND': 'true', 'CRAYPE_LINK_TYPE': 'dynamic', } - self.version_rpt = 'Intel_VTuneAmplifier_version.rpt' - self.summary_rpt = 'Intel_VTuneAmplifier_summary.rpt' - self.paranoid_rpt = 'Intel_VTuneAmplifier_paranoid.rpt' - self.post_run = [ - 'amplxe-cl -V &> %s' % self.version_rpt, - 'amplxe-cl -R hotspots -r hotspots* -column="CPU Time:Self" &>%s' % - self.summary_rpt, - 'srun -n1 cat /proc/sys/kernel/perf_event_paranoid &> %s' % - self.paranoid_rpt, + self.version_rpt = 'version.rpt' + self.paranoid_rpt = 'paranoid.rpt' + self.summary_rpt = 'summary.rpt' + self.pre_run = [ + 'mv %s %s' % (self.executable, self.target_executable), + '%s --version &> %s' % (self.executable, self.version_rpt), ] + self.post_run = ['%s --help | head -20' % self.executable] self.maintainers = ['JG'] self.tags = {'production'} def setup(self, partition, environ, **job_opts): super().setup(partition, environ, **job_opts) + run_cmd = ' '.join(self.job.launcher.command(self.job)) 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 + self.post_run += [ + '%s -R hotspots -r hotspots* -column="CPU Time:Self" &> %s' % + (self.executable, self.summary_rpt), + '%s cat /proc/sys/kernel/perf_event_paranoid &> %s' % + (run_cmd, self.paranoid_rpt), + ] partitiontype = partition.fullname.split(':')[1] if partitiontype == 'gpu': self.job.options = ['--constraint="gpu&perf"'] elif partitiontype == 'mc': self.job.options = ['--constraint="mc&perf"'] - vtuneversion = '2019' - toolsversion = '579888' - self.pre_run = [ - 'source $INTEL_PATH/../vtune_amplifier_%s/amplxe-vars.sh' % - vtuneversion, 'amplxe-cl -help collect | tail -20', - ] + toolsversion = '597835' self.sanity_patterns = sn.all([ # check the job: sn.assert_found('SUCCESS', self.stdout), sn.assert_found(r'amplxe: Executing actions \d+ %', self.stderr), - # check the version: + # check the tool's version: sn.assert_eq(sn.extractsingle( r'I*.\(build\s(?P\d+)\s*.', self.version_rpt, 'toolsversion'), toolsversion),