-
Notifications
You must be signed in to change notification settings - Fork 117
[test] Add test for gdb4hpc #603
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
16 commits
Select commit
Hold shift + click to select a range
1b29ed1
https://github.com/eth-cscs/reframe/issues/601
jgphpc cef0e49
https://github.com/eth-cscs/reframe/issues/601
jgphpc adecdec
Merge branch 'gdb4hpc' of https://github.com/jgphpc/reframe into gdb4hpc
jgphpc 9abcc86
fix for @victorusu
jgphpc 2213477
Merge branch 'master' into gdb4hpc
jgphpc c2d4e30
answering comments
jgphpc 6e8a4a2
Merge branch 'master' of https://github.com/jgphpc/reframe into gdb4hpc
jgphpc 29e527e
Merge branch 'master' of https://github.com/jgphpc/reframe into gdb4hpc
jgphpc fc9c716
smarter jobfile creation
jgphpc 68a9a60
typo
jgphpc e74ed6f
Fix for review
jgphpc 8556b84
pep8
jgphpc 542b025
Merge branch 'master' into gdb4hpc
jgphpc 71571e8
removing broken daint (CTI error)
jgphpc c24a389
Merge branch 'master' of https://github.com/eth-cscs/reframe into gdb…
jgphpc eb51b6d
Merge branch 'gdb4hpc' of https://github.com/jgphpc/reframe into gdb4hpc
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
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,84 @@ | ||
| import os | ||
|
|
||
| import reframe as rfm | ||
| import reframe.utility.sanity as sn | ||
|
|
||
|
|
||
| class Gdb4hpcCheck(rfm.RegressionTest): | ||
| def __init__(self, lang, extension): | ||
| super().__init__() | ||
| self.name = type(self).__name__ + '_' + lang.replace('+', 'p') | ||
| self.descr = 'Cray gdb4hpc check for %s' % lang | ||
| self.lang = lang | ||
| self.extension = extension | ||
| self.build_system = 'Make' | ||
| # NOTE: Restrict concurrency to allow creation of Fortran modules | ||
| if lang == 'F90': | ||
| self.build_system.max_concurrency = 1 | ||
|
|
||
| self.executable = 'gdb4hpc' | ||
| self.executable_opts = ['-v'] | ||
| self.target_executable = './jacobi' | ||
| self.gdbcmds = './%s.in' % self.executable | ||
| self.gdbslm = '%s.slm' % self.executable | ||
| self.gdbrpt = '%s.rpt' % self.executable | ||
| self.sourcesdir = os.path.join('src', lang) | ||
| self.valid_prog_environs = ['PrgEnv-gnu'] | ||
| self.modules = ['gdb4hpc'] | ||
| self.prgenv_flags = ['-g', '-O2', '-fopenmp'] | ||
| self.build_system.cflags = self.prgenv_flags | ||
| self.build_system.cxxflags = self.prgenv_flags | ||
| self.build_system.fflags = self.prgenv_flags | ||
| self.num_tasks = 1 | ||
| self.num_tasks_per_node = 1 | ||
| self.num_cpus_per_task = 4 | ||
| self.num_tasks_per_core = 1 | ||
| self.num_iterations = 5 | ||
| self.variables = { | ||
| 'CRAYPE_LINK_TYPE': 'dynamic', | ||
| 'OMP_NUM_THREADS': str(self.num_cpus_per_task), | ||
| 'ITERATIONS': str(self.num_iterations), | ||
| 'OMP_PROC_BIND': 'true', | ||
| } | ||
| self.maintainers = ['JG'] | ||
| self.tags = {'production'} | ||
| # gdb4hpc has its own way to launch a debugging job and needs an | ||
| # additional jobscript. The reframe jobscript can be copied for that | ||
| # purpose, by adding the cray_debug_ comments around the job launch | ||
| # command to be debugged, gdb4hpc is then activated by removing the | ||
| # #GDB4HPC comments in the next (post_run) step. | ||
| self.pre_run = [ | ||
| '#GDB4HPC #cray_debug_start', | ||
| '#GDB4HPC srun %s' % self.target_executable, | ||
| '#GDB4HPC #cray_debug_end' | ||
| ] | ||
|
|
||
| def setup(self, partition, environ, **job_opts): | ||
| super().setup(partition, environ, **job_opts) | ||
| # create extra jobscript for gdb4hpc: | ||
| self.post_run = [ | ||
| 'sed "s-#GDB4HPC --" %s | ' | ||
| 'egrep -v "output=|error=|^gdb4hpc" &> %s' % | ||
| (self.job.script_filename, self.gdbslm), | ||
| 'gdb4hpc -b %s &> %s' % (self.gdbcmds, self.gdbrpt) | ||
| ] | ||
|
|
||
|
|
||
| @rfm.required_version('>=2.14') | ||
| @rfm.parameterized_test(['F90', 'F90']) | ||
vkarak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| class Gdb4hpcCpuCheck(Gdb4hpcCheck): | ||
| def __init__(self, lang, extension): | ||
| super().__init__(lang, extension) | ||
| self.valid_systems = ['dom:gpu', 'dom:mc'] | ||
| self.sanity_patterns = sn.all([ | ||
| sn.assert_reference(sn.extractsingle( | ||
| r'^tst\{0\}:\s+(?P<result>\d+.\d+[eE]-\d+)', | ||
| 'gdb4hpc.rpt', 'result', float), | ||
| 2.572e-6, -1e-1, 1.0e-1), | ||
|
|
||
| sn.assert_found(r'gdb4hpc \d\.\d - Cray Line Mode Parallel Debug', | ||
| 'gdb4hpc.rpt'), | ||
|
|
||
| sn.assert_found(r'Shutting down debugger and killing application', | ||
| 'gdb4hpc.rpt') | ||
| ]) | ||
28 changes: 28 additions & 0 deletions
28
cscs-checks/tools/profiling_and_debugging/src/F90/gdb4hpc.in
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,28 @@ | ||
| # this line is mandatory (cray case #224617): | ||
| maint set sync on | ||
| # 1 MPI * x OpenMP: | ||
| launch $tst{1} ./jacobi --sbatch=./gdb4hpc.slm | ||
| break _jacobi.F90:90 | ||
| # ----1 | ||
| continue | ||
| list 90,91 | ||
| print residual | ||
| # ----2 | ||
| continue | ||
| print residual | ||
| # ----3 | ||
| continue | ||
| print residual | ||
| # ----4 | ||
| continue | ||
| print residual | ||
| # ----5 | ||
| continue | ||
| print residual | ||
| quit | ||
|
|
||
| # can use printf with gdb4hpc only in gdbmode: | ||
| # printf "(_jacobi.F90:90)] residual:%f\n", residual | ||
| # CASE #227672 - GDB4HPC: PRINTF SUPPORT | ||
|
|
||
| # TODO: tracepoints |
27 changes: 27 additions & 0 deletions
27
cscs-checks/tools/profiling_and_debugging/src/F90/gdb4hpc.slm
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,27 @@ | ||
| #!/bin/bash -l | ||
victorusu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #SBATCH --job-name="rfm_GDB4HPC_Check_F90_job" | ||
| #SBATCH --time=0:1:0 | ||
|
|
||
| #SBATCH --ntasks=1 | ||
| #SBATCH --ntasks-per-node=1 | ||
| #SBATCH --cpus-per-task=4 | ||
| #SBATCH --ntasks-per-core=1 | ||
|
|
||
| #SBATCH --output=o | ||
| #SBATCH --error=o | ||
| #SBATCH --constraint=gpu | ||
|
|
||
| module load daint-gpu | ||
| module unload PrgEnv-cray | ||
| module load PrgEnv-gnu | ||
| module load gdb4hpc | ||
| module list -t | ||
|
|
||
| export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK | ||
| export ITERATIONS=5 | ||
| export OMP_PROC_BIND=true | ||
|
|
||
| #cray_debug_start | ||
| srun ./jacobi | ||
| #cray_debug_end | ||
|
|
||
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.