Arm Forge User Guide
Total Page:16
File Type:pdf, Size:1020Kb
Arm Forge User Guide Version 18.2.1 Arm Forge 18.2.1 Contents Contents 1 I Arm Forge 12 1 Introduction 12 1.1 Arm DDT .......................................... 12 1.2 Arm MAP .......................................... 13 1.3 Online resources ...................................... 13 2 Installation 14 2.1 Linux installation ...................................... 14 2.1.1 Graphical install .................................. 14 2.1.2 Text-mode install .................................. 15 2.2 Mac installation ....................................... 16 2.3 Windows installation .................................... 16 2.4 License files ......................................... 17 2.5 Workstation and evaluation licenses ............................ 17 2.6 Supercomputing and other floating licenses ........................ 18 2.7 Architecture licensing .................................... 18 2.7.1 Using multiple architecture licenses ........................ 18 3 Connecting to a remote system 19 3.1 Remote connections dialog ................................. 19 3.2 Remote launch settings ................................... 20 3.2.1 Remote script .................................... 21 3.3 Reverse Connect ...................................... 21 3.3.1 Overview ...................................... 21 3.3.2 Usage ........................................ 22 3.3.3 Connection details ................................. 22 3.4 Treeserver or general debugging ports ........................... 23 3.5 Using X forwarding or VNC ................................ 23 4 Starting 25 II DDT 27 5 Getting started 27 5.1 Running a program ..................................... 28 5.1.1 Application ..................................... 28 5.1.2 MPI ......................................... 29 5.1.3 OpenMP ...................................... 29 5.1.4 CUDA ....................................... 29 5.1.5 Memory debugging ................................. 30 5.1.6 Environment variables ............................... 30 5.1.7 Plugins ....................................... 30 5.2 Express Launch ....................................... 31 5.2.1 Run dialog box ................................... 31 5.3 remote-exec required by some MPIs .......................... 32 Copyright © 2002-2018 Arm Limited (or its affiliates). All rights reserved. 1 Arm Forge 18.2.1 5.4 Debugging single-process programs ............................ 33 5.5 Debugging OpenMP programs ............................... 33 5.6 Manual launching of multi-process non-MPI programs .................. 35 5.7 Debugging MPMD programs ................................ 36 5.7.1 Debugging MPMD programs without Express Launch .............. 36 5.7.2 Debugging MPMD programs in Compatibility mode ............... 36 5.8 Opening core files ...................................... 37 5.9 Attaching to running programs ............................... 37 5.9.1 Automatically detected MPI jobs .......................... 38 5.9.2 Attaching to a subset of an MPI job ........................ 38 5.9.3 Manual process selection .............................. 38 5.9.4 Configuring attaching to remote hosts ....................... 40 5.9.5 Using DDT command-line arguments ....................... 40 5.10 Starting a job in a queue .................................. 41 5.11 Using custom MPI scripts .................................. 41 5.12 Starting DDT from a job script ............................... 44 5.13 Attaching via gdbserver ................................... 44 5.14 UPC ............................................. 45 5.14.1 GCC UPC ..................................... 45 5.14.2 Berkeley UPC ................................... 45 5.15 Numactl ........................................... 45 5.15.1 MPI and SLURM .................................. 45 5.15.2 Non-MPI Programs ................................. 46 5.16 Python ............................................ 46 5.16.1 Overview ...................................... 46 5.16.2 Prerequisites .................................... 46 5.16.3 Running ....................................... 47 6 Overview 48 6.1 Saving and loading sessions ................................ 49 6.2 Source code ......................................... 49 6.2.1 Viewing ....................................... 49 6.2.2 Editing ....................................... 50 6.2.3 Rebuilding and restarting .............................. 50 6.2.4 Committing changes ................................ 50 6.3 Project Files ......................................... 50 6.3.1 Application and external code ........................... 51 6.4 Finding lost source files ................................... 51 6.5 Finding code or variables .................................. 52 6.5.1 Find Files or Functions ............................... 52 6.5.2 Find ......................................... 52 6.5.3 Find in Files .................................... 52 6.6 Go To Line ......................................... 53 6.7 Navigating through source code history .......................... 53 6.8 Static analysis ........................................ 54 6.9 Version control information ................................. 54 7 Controlling program execution 57 7.1 Process control and process groups ............................. 57 7.1.1 Detailed view .................................... 57 7.1.2 Summary view ................................... 58 7.2 Focus control ........................................ 58 Copyright © 2002-2018 Arm Limited (or its affiliates). All rights reserved. 2 Arm Forge 18.2.1 7.2.1 Overview of changing focus ............................ 59 7.2.2 Process group viewer ................................ 59 7.2.3 Breakpoints ..................................... 59 7.2.4 Code viewer .................................... 59 7.2.5 Parallel stack view ................................. 60 7.2.6 Playing and stepping ................................ 60 7.2.7 Step threads together ................................ 60 7.2.8 Stepping threads window .............................. 60 7.3 Starting, stopping and restarting a program ......................... 61 7.4 Stepping through a program ................................ 62 7.5 Stop messages ........................................ 62 7.6 Setting breakpoints ..................................... 62 7.6.1 Using the source code viewer ........................... 62 7.6.2 Using the Add Breakpoint window ......................... 63 7.6.3 Pending breakpoints ................................ 63 7.6.4 Conditional breakpoints .............................. 64 7.7 Suspending breakpoints ................................... 64 7.8 Deleting a breakpoint .................................... 64 7.9 Loading and saving breakpoints .............................. 65 7.10 Default breakpoints ..................................... 65 7.11 Synchronizing processes .................................. 65 7.12 Setting a watchpoint .................................... 66 7.13 Tracepoints ......................................... 67 7.13.1 Setting a tracepoint ................................. 67 7.13.2 Tracepoint output .................................. 68 7.14 Version control breakpoints and tracepoints ........................ 68 7.15 Examining the stack frame ................................. 70 7.16 Align stacks ......................................... 70 7.17 Viewing stacks in parallel .................................. 70 7.17.1 Overview ...................................... 70 7.17.2 The Parallel Stack View in detail .......................... 71 7.18 Browsing source code .................................... 72 7.19 Simultaneously viewing multiple files ........................... 74 7.20 Signal handling ....................................... 74 7.20.1 Custom signal handling (signal dispositions) ................... 75 7.20.2 Sending signals ................................... 75 8 Viewing variables and data 76 8.1 Sparklines .......................................... 76 8.2 Current line ......................................... 76 8.3 Local variables ....................................... 77 8.4 Arbitrary expressions and global variables ......................... 77 8.4.1 Fortran intrinsics .................................. 79 8.4.2 Changing the language of an expression ...................... 79 8.4.3 Macros and #defined constants ........................... 79 8.5 Help with Fortran modules ................................. 79 8.6 Viewing complex numbers in Fortran ........................... 80 8.7 C++ STL support ...................................... 81 8.8 Custom pretty printers ................................... 81 8.8.1 Example ...................................... 81 8.9 Viewing array data ..................................... 82 8.10 UPC support ......................................... 82 Copyright © 2002-2018 Arm Limited (or its affiliates). All rights reserved. 3 Arm Forge 18.2.1 8.11 Changing data values .................................... 83 8.12 Viewing numbers in different bases ............................. 83 8.13 Examining pointers ..................................... 83 8.14 Multi-dimensional arrays in the Variable View ....................... 83 8.15 Multi-dimensional array viewer (MDA) .......................... 84 8.15.1 Array expression .................................. 85 8.15.2 Filtering by value .................................. 86 8.15.3 Distributed arrays .................................. 86 8.15.4 Advanced: how arrays are laid out in the