Memory Debugging
Total Page:16
File Type:pdf, Size:1020Kb
Arm Forge User Guide Version 20.0.2 Arm Forge 20.0.2 Non-Confidential Proprietary Notice This document is protected by copyright and other related rights and the practice or implementation of the information contained in this document may be protected by one or more patents or pending patent applications. No part of this document may be reproduced in any form by any means without the express prior written permission of Arm. No license, express or implied, by estoppel or otherwise to any intellectual property rights is granted by this document unless specifically stated. Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use the information for the purposes of determining whether implementations infringe any third party patents. THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, NONIN- FRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE DOCU- MENT. For the avoidance of doubt, Arm makes no representation with respect to, and has undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or other rights. This document may include technical inaccuracies or typographical errors. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCI- DENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARD- LESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure of this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof is not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to Arm’s customers is not intended to create or refer to any partnership relationship with any other company. Arm may make changes to this document at any time and without notice. If any of the provisions contained in these terms conflict with any of the provisions of any click through or signed written agreement covering this document with Arm, then the click through or signed written agreement prevails over and supersedes the conflicting provisions of these terms. This document may be translated into other languages for convenience, and you agree that if there is any conflict between the English version of this document and any translation, the terms of the English version of the Agreement shall prevail. The Arm corporate logo and words marked with ®or ™are registered trademarks or trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective owners. Please follow Arm’s trademark usage guidelines at http://www.arm.com/company/policies/trademarks. Copyright ©2018, 2019 Arm Limited (or its affiliates). All rights reserved. Arm Limited. Company 02557590 registered in England. 110 Fulbourn Road, Cambridge, England CB1 9NJ. LES-PRE-20349 Confidentiality Status This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by Arm and the party that Arm delivered this document to. Unrestricted Access is an Arm internal classification. Copyright © 2002-2020 Arm Limited (or its affiliates). All rights reserved. 1 101136_2002_00_en Arm Forge 20.0.2 Product Status The information in this document is Final, that is for a developed product. Web Address http://www.arm.com Copyright © 2002-2020 Arm Limited (or its affiliates). All rights reserved. 2 101136_2002_00_en Arm Forge 20.0.2 CONTENTS Contents Contents 3 I Arm Forge 14 1 Introduction to Arm Forge 14 1.1 Arm DDT .......................................... 14 1.2 Arm MAP .......................................... 15 1.3 Online resources ...................................... 15 2 Installation 16 2.1 Linux graphical install ................................... 16 2.2 Linux text-mode install ................................... 18 2.3 Mac installation ....................................... 18 2.4 Windows installation .................................... 19 2.5 License files ......................................... 20 2.6 Workstation and evaluation licenses ............................ 20 2.7 Supercomputing and other floating licenses ........................ 21 2.8 Architecture licensing .................................... 22 2.8.1 Using multiple architecture licenses ........................ 22 3 Connecting to a remote system 23 3.1 Remote connections dialog ................................. 23 3.2 Remote launch settings ................................... 24 3.2.1 Remote script .................................... 25 3.3 Reverse Connect ...................................... 26 3.3.1 Overview ...................................... 26 3.3.2 Usage ........................................ 26 3.3.3 Connection details ................................. 27 3.4 Treeserver or general debugging ports ........................... 27 3.5 Using X forwarding or VNC ................................ 27 4 Starting 30 II DDT 32 5 Getting started 32 5.1 Running a program ..................................... 33 5.1.1 Application ..................................... 33 5.1.2 MPI ......................................... 34 5.1.3 OpenMP ...................................... 34 5.1.4 CUDA ....................................... 34 5.1.5 Memory debugging ................................. 35 5.1.6 Environment variables ............................... 35 5.1.7 Plugins ....................................... 35 5.2 Express Launch ....................................... 36 5.2.1 Run dialog box ................................... 37 5.3 remote-exec required by some MPIs .......................... 37 5.4 Debugging single-process programs ............................ 38 Copyright © 2002-2020 Arm Limited (or its affiliates). All rights reserved. 3 101136_2002_00_en Arm Forge 20.0.2 CONTENTS 5.5 Debugging OpenMP programs ............................... 38 5.6 Manual launching of multi-process non-MPI programs .................. 40 5.7 Debugging MPMD programs ................................ 41 5.7.1 Debugging MPMD programs without Express Launch .............. 41 5.7.2 Debugging MPMD programs in Compatibility mode ............... 41 5.8 Opening core files ...................................... 42 5.9 Attaching to running programs ............................... 42 5.9.1 Automatically detected MPI jobs .......................... 43 5.9.2 Attaching to a subset of an MPI job ........................ 43 5.9.3 Manual process selection .............................. 43 5.9.4 Configuring attaching to remote hosts ....................... 45 5.9.5 Using DDT command-line arguments ....................... 45 5.10 Starting a job in a queue .................................. 46 5.11 Job scheduling with jsrun .................................. 46 5.12 Using custom MPI scripts .................................. 47 5.13 Starting DDT from a job script ............................... 49 5.14 Attaching via gdbserver ................................... 50 5.15 UPC ............................................. 51 5.15.1 GCC UPC ..................................... 51 5.15.2 Berkeley UPC ................................... 51 5.16 Numactl ........................................... 51 5.16.1 MPI and SLURM .................................. 51 5.16.2 Non-MPI Programs ................................. 51 5.17 Python debugging ...................................... 52 5.17.1 Overview ...................................... 52 5.17.2 Prerequisites .................................... 52 5.17.3 Running ....................................... 53 6 Overview 54 6.1 Saving and loading sessions ................................ 55 6.2 Source code ......................................... 55 6.2.1 Viewing ....................................... 55 6.2.2 Editing ....................................... 56 6.2.3 Rebuilding and restarting .............................. 56 6.2.4 Committing changes ................................ 56 6.3 Assembly debugging .................................... 56 6.3.1 Toggling and viewing ............................... 57 6.3.2 Breakpoints ..................................... 57 6.4 Project Files ......................................... 57 6.4.1 Application and external code ........................... 58 6.5 Finding lost source files ................................... 58 6.6 Finding code or variables .................................. 59 6.6.1 Find Files or Functions ............................... 59 6.6.2 Find ......................................... 59 6.6.3 Find in Files .................................... 59 6.7 Go To Line ......................................... 60 6.8 Navigating through source code history .......................... 60 6.9 Static analysis ........................................ 61 6.10 Version control information ................................. 61 7 Controlling program execution 64 7.1 Process control and process groups ............................