The Art of Debugging: How to think like a programmer. Melissa Sulprizio GEOS-Chem Support Team

Size: px
Start display at page:

Download "The Art of Debugging: How to think like a programmer. Melissa Sulprizio GEOS-Chem Support Team"

Transcription

1 The Art of Debugging: How to think like a programmer Melissa Sulprizio GEOS-Chem Support Team geos-chem-support@as.harvard.edu Graduate Student Forum 23 February 2017

2 GEOS-Chem Support Team Bob Yantosca (Harvard) Melissa Sulprizio (Harvard) Lizzie Lundgren (Harvard) Mike Long (Harvard) Colin Thackray (Harvard) Junwei Xu (Dalhousie) Yanko Davila (CU Boulder)

3 Overview 1) Good coding practice 2) Debugging tips 3) Validation tips 4) Profiling to optimize speed 5) Demos (if time)

4 Good Coding Practice

5 Good Coding Practice Use copious comments Comments will make sure that other users will be able to understand the modifications that you have added Writing comments before actually writing the code may help in your planning Well documented code is as important as properly working code Tips for adding comments Flag your updates with your initials and the date, e.g. (mps, 2/23/17) Separate sections of the code with one or more divider comments When citing papers, make sure to include the complete citation at the top of the routine and use shorthand to reference that paper within the code Limit line length to avoid wrapping the text on the page

6 Good Coding Practice Use a text editor with syntax highlighting Use ProTeX headers ProTeX headers are specially formatted comments at the top of each subroutine, function, and module that list arguments, modification history, and references Documentation is automatically generated when you compile with make doc Follow these tips for writing effective code Indent new blocks of code within loops and if statements The exception to this is nested loops (e.g. looping over lat, lon, lev) Use lots of white space to separate code Use all capitals for Fortran reserve words You may at your discretion mix capitals and lowercase in variable names Structure loops efficiently In Fortran loop over arrays using N, L, J, I order Loops in the wrong order can dramatically slow down your code

7 General Coding Tips Understand the problem and break it down into small steps Write pseudocode to focus on the logic without being distracted by syntax Syntax varies between languages, but the thought process is the same Look for relevant examples in preexisting code and modify Don t start from scratch if you can help it Use Google, Stack Overflow, fellow group members Compile/run your code often Comment out sections or routine calls to locate problematic code Use print statements to check variables, determine where code stops, etc. Fix bugs before writing new code Use version control Lets you track your files over time so you can revert to a previous working version if necessary

8 Git Version Control Git version control software is a distributed source code management system Offers many improvements over other source code management software (e.g. CVS, Subversion) Allows you to keep an identical copy of the source code repository on your own system Includes the option to create branches for different streams of development Lets you easily apply and merge code from several developers Contains easy-to-use graphical tools Git is already installed on AS and Odyssey Online services include Bitbucket, GitHub, GitLab, etc. GEOS-Chem repositories are stored on Bitbucket:

9 Git Graphical Tools gitk This command opens the GitK window where you can browse the complete revision history For each commit, you can see the changes made to each file

10 Git Graphical Tools git gui This command opens the Git GUI, a graphical user interface that can be used for most Git commands Create new branches of development Commit changes to the repository Merge branches back into the master branch

11 Git Graphical Tools git gui This command opens the Git GUI, a graphical user interface that can be used for most Git commands Create new branches of development Commit changes to the repository Merge branches back into the master branch We recommend using the Git GUI rather than typing commands at the Unix prompt. The Git GUI greatly simplifies things.

12

13 Debugging Tips

14 General Debugging Tips Here are some tips to isolate the source of errors: 1) Look at the log file(s) 2) Make sure you didn t max out the allotted time or memory 3) Check if someone else has already reported the bug 4) Rerun with debug flags and verbose options turned on 5) Identify whether the error happens consistently 6) Use a debugger to locate the source of the error 7) Isolate the problem to a particular area of the code 8) Revert to a clean copy of the code 9) Focus on areas of the code that you modified 10) Check for math errors (divide by zero, log of negative, etc.) 11) When in doubt, print it out!

15 GEOS-Chem Debugging Tips Check the GEOS-Chem log file and the HEMCO log file Turn on ND70 in input.geos to print debug output to the log file Set Verbose and Warnings to 3 in HEMCO_Config.rc Compile with debug options turned on: BOUNDS=yes turns on array out-of-bounds error checking TRACEBACK=yes returns a list of routines that were called when the error occurred (now on by default) FPE=yes checks for floating-point exceptions (div-by-zero, NaN, etc.) DEBUG=yes compiles GEOS-Chem for use in a debugger Isolate the error to a particular operation (e.g. transport, chemistry, wet deposition) by turning on one at a time If stuck, send the GCST an including the log files Please report any bugs in the standard code to the GCST and post on the GEOS-Chem wiki for other users to see!

16 Fortran Debuggers Using a debugger can save you a lot of time and hassle Debuggers allow you to: Examine data when a program stops Navigate the stack when a program stops Set break points Common debuggers include TotalView, IDB, GDB, DBX For GEOS-Chem, add DEBUG=yes to the make command make -j4 mpbuild DEBUG=yes # With parallelization make -j4 spbuild DEBUG=yes # Without parallelization DEBUG=yes evokes -g for symbolic debug information and -O0 to switch off compiler optimization

17 TotalView TotalView is a GUI-based source code and memory debugging tool for parallel applications written in C, C++, and Fortran To use type totalview geos.mp

18 Validation Tips

19 GEOS-Chem Unit Tester The GEOS-Chem Unit Tester is a package that will compile and run several simulations with a standard set of debugging flags A unit test will run simulations for a given combination of: 1. Meteorology field 2. Horizontal grid 3. Simulation type The steps of a unit test are: 1. Single processor (sp) phase: Run with OpenMP parallelization turned OFF 2. Multi processor (mp) phase: Run with OpenMP parallelization turned ON 3. Compare output of the sp and mp phases. If the outputs differ, this indicated a parallelization error Strict debugging flags are used for all simulations to look for floating-point math exceptions, array-out-of-bounds errors, and creation of array temporaries

20 GEOS-Chem Unit Tester Download the GEOS-Chem Unit Tester using Git: git clone Navigate to the perl subdirectory Modify the UnitTest.input file for your desired settings Start the GEOS-Chem Unit Tester using./gcunittest UnitTest.input Check output generated by the GEOS-Chem Unit Tester and saved to the logs/{version} directory {VERSION}.results.txt: A text file summarizing results Evaluate Unit Test results Green = unit test passed Yellow = requires further investigation (diagnostic output differs) Red = unit test failed

21 Difference Tests A difference test validates two versions of a model (Ref and Dev) You can only expect a difference test to pass if the Dev run should produce identical results to the Ref run A difference test will not pass if the Dev code contains scientific changes, but this may still be useful for validation Difference tests with GEOS-Chem are set up using the GEOS-Chem Unit Tester

22 GEOS-Chem Difference Tests Navigate to the perl subdirectory of the GEOS-Chem Unit Tester Modify the DiffTest.input file for your desired settings Create a difference test run directory using./gccreatedifftest DiffTest.input Navigate to the run directory created by gccreatedifftest

23 GEOS-Chem Difference Tests Navigate to the perl subdirectory of the GEOS-Chem Unit Tester Modify the DiffTest.input file for your desired settings Create a difference test run directory using./gccreatedifftest DiffTest.input Navigate to the run directory created by gccreatedifftest

24 GEOS-Chem Difference Tests Navigate to the perl subdirectory of the GEOS-Chem Unit Tester Modify the DiffTest.input file for your desired settings Create a difference test run directory using./gccreatedifftest DiffTest.input Navigate to the run directory created by gccreatedifftest Start a difference test using make -j4 difftest Check results of the difference test in logs/log.*.results Explore differences between Dev and Ref using summarizediff.sh: provides overview of differences in BPCH files locatediff.sh: provides detailed list of differences in BPCH files plots/plot_diffs.pro: generate difference and ratio maps

25 Profiling

26 Profiling If you think your code is taking too long to run, you can use profiling tools to generate a list of time spent in each routine Profilers can help identify the source of computational bottlenecks caused by poorly written or parallelized code

27 GNU profiler The GNU profiler (gprof) is a free, open source package For GEOS-Chem, add GPROF=yes to the make command GPROF=yes adds the following compiler switches: -p for Intel Fortran compiler (ifort) -pg for GNU Fortran compiler (gfortran) -pg for PGI Fortran compiler (pgfortran) Run the program as usual A binary file called gmon.out will be produced Generate readable output using gprof program gprof geos.mp gmon.out > GC_Profile.txt

28 GNU profiler

29 GNU profiler The GNU profiler (gprof) is a free, open source package For GEOS-Chem, add GPROF=yes to the make command GPROF=yes adds the following compiler switches: -p for Intel Fortran compiler (ifort) -pg for GNU Fortran compiler (gfortran) -pg for PGI Fortran compiler (pgfortran) Run the program as usual A binary file called gmon.out will be produced Generate readable output using gprof program gprof geos.mp gmon.out > GC_Profile.txt Use PLOT_GPROF routine in GAMAP v2-19 to create bar chart IDL> plot_gprof, 'GC_Profile.txt'

30 GNU profiler

31 TAU profiler TAU Performance System is the Tuning and Analysis Utilities supported by ParaTools, Inc. TAU is a profiling tool for performance analysis of parallel programs in Fortran, C, C++, Java, and Python Load TAU on Odyssey using: module load tau/ fasrc01 # Options for TAU profiler export TAU_OPTIONS="-optRevert -optverbose..." NOTE: TAU on Odyssey is currently built for IFORT 15. Use the alias load_15 to load both IFORT 15 compiler and TAU. TAU uses a visualization tool called ParaProf to create graphical displays of the performance analysis results

32 TAU profiler For GEOS-Chem, add TAU_PROF=yes to the make command IMPORTANT: Compile on a single processor to allow TAU to properly instrument the code (i.e. don t pass -j4 to the make command) TAU_PROF=yes compiles with TAU using tau_f90.sh instead of ifort, gfortran, or pgfortran Run the program as usual One or more profile.* files will be produced, depending on the number of CPUs that you use Pack the profiling data into a single file using paraprof --pack Profile_Results.ppk Run ParaProf on the packed format (.ppk) file using paraprof Profile_Results.ppk

33 TAU Profiler: ParaProf ParaProf will open two windows:

34 TAU Profiler: ParaProf ParaProf will open two windows 1. The ParaProf Manager Window This window is used to manage profile data (e.g. upload/download profile data, edit metadata, launch visual displays, export data)

35 TAU Profiler: ParaProf ParaProf will open two windows 1. The ParaProf Manager Window This window is used to manage profile data (e.g. upload/download profile data, edit metadata, launch visual displays, export data) 2. The Main Data window This window shows statistics and each thread as a combined bar graph Each routine is represented by a different color Clicking on the label for a bar (e.g. thread 0 ) will generate a histogram

36 TAU Profiler: ParaProf

37 Resources GEOS-Chem wiki: Quick links: GEOS-Chem basics GEOS-Chem coding style guide GEOS-Chem coding and debugging Using Git with GEOS-Chem Debugging with the GEOS-Chem Unit Tester Performing difference tests with GEOS-Chem Profiling GEOS-Chem with gprof Profiling GEOS-Chem with TAU TotalView quick start guide GNU profiler documentation TAU Performance System documentation

Debugging with the new GEOS-Chem Unit Tester

Debugging with the new GEOS-Chem Unit Tester Debugging with the new GEOS-Chem Unit Tester Bob Yantosca Senior Software Engineer GEOS-Chem Support Team Jacob Group Meeting 27 Nov 2013 with Melissa Payer Sulprizio Contents Overview G-C software development

More information

Getting Started with GCHP v11-02c

Getting Started with GCHP v11-02c Getting Started with GCHP v11-02c Lizzie Lundgren GEOS-Chem Support Team geos-chem-support@as.harvard.edu September 2017 Overview 1) What is GCHP and why use it? 2) Common Misconceptions 3) Useful Tips

More information

Getting Started with High Performance GEOS-Chem

Getting Started with High Performance GEOS-Chem Getting Started with High Performance GEOS-Chem Lizzie Lundgren GEOS-Chem Support Team geos-chem-support@as.harvard.edu June 2017 Overview 1) What is GCHP and why use it? 2) Common Misconceptions 3) Useful

More information

Debugging and Profiling

Debugging and Profiling Debugging and Profiling Dr. Axel Kohlmeyer Senior Scientific Computing Expert Information and Telecommunication Section The Abdus Salam International Centre for Theoretical Physics http://sites.google.com/site/akohlmey/

More information

AMath 483/583 Lecture 2

AMath 483/583 Lecture 2 AMath 483/583 Lecture 2 Outline: Binary storage, floating point numbers Version control main ideas Client-server version control, e.g., CVS, Subversion Distributed version control, e.g., git, Mercurial

More information

AMath 483/583 Lecture 2. Notes: Notes: Homework #1. Class Virtual Machine. Notes: Outline:

AMath 483/583 Lecture 2. Notes: Notes: Homework #1. Class Virtual Machine. Notes: Outline: AMath 483/583 Lecture 2 Outline: Binary storage, floating point numbers Version control main ideas Client-server version control, e.g., CVS, Subversion Distributed version control, e.g., git, Mercurial

More information

Unit Testing, Difference Testing, Profiling, and Musings on Software Engineering

Unit Testing, Difference Testing, Profiling, and Musings on Software Engineering Unit Testing, Difference Testing, Profiling, and Musings on Software Engineering Bob Yantosca Senior Software Engineer Jacob Group Meeting 06 August 2014 Contents Unit testing, revisited Update since Nov

More information

Performance Analysis of Parallel Scientific Applications In Eclipse

Performance Analysis of Parallel Scientific Applications In Eclipse Performance Analysis of Parallel Scientific Applications In Eclipse EclipseCon 2015 Wyatt Spear, University of Oregon wspear@cs.uoregon.edu Supercomputing Big systems solving big problems Performance gains

More information

Improving Your Life With Git

Improving Your Life With Git Improving Your Life With Git Lizzie Lundgren elundgren@seas.harvard.edu Graduate Student Forum 26 April 2018 Scenarios to Avoid My code was deleted from 90-day retention! Crap, I can t remember what I

More information

Profiling with TAU. Le Yan. User Services LSU 2/15/2012

Profiling with TAU. Le Yan. User Services LSU 2/15/2012 Profiling with TAU Le Yan User Services HPC @ LSU Feb 13-16, 2012 1 Three Steps of Code Development Debugging Make sure the code runs and yields correct results Profiling Analyze the code to identify performance

More information

Workshop on High Performance Computing (HPC08) School of Physics, IPM February 16-21, 2008 HPC tools: an overview

Workshop on High Performance Computing (HPC08) School of Physics, IPM February 16-21, 2008 HPC tools: an overview Workshop on High Performance Computing (HPC08) School of Physics, IPM February 16-21, 2008 HPC tools: an overview Stefano Cozzini CNR/INFM Democritos and SISSA/eLab cozzini@democritos.it Agenda Tools for

More information

Debugging with gdb and valgrind

Debugging with gdb and valgrind Debugging with gdb and valgrind Dr. Axel Kohlmeyer Associate Dean for Scientific Computing, CST Associate Director, Institute for Computational Science Assistant Vice President for High-Performance Computing

More information

Hands-on Workshop on How To Debug Codes at the Institute

Hands-on Workshop on How To Debug Codes at the Institute Hands-on Workshop on How To Debug Codes at the Institute H. Birali Runesha, Shuxia Zhang and Ben Lynch (612) 626 0802 (help) help@msi.umn.edu October 13, 2005 Outline Debuggers at the Institute Totalview

More information

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control: How can 4 (or 4000) developers work on a product at once? Revision Control Revision Control Revision Control: Also called version control, source control, software configuration management. Motivation:

More information

CSC 2700: Scientific Computing

CSC 2700: Scientific Computing CSC 2700: Scientific Computing Record and share your work: revision control systems Dr Frank Löffler Center for Computation and Technology Louisiana State University, Baton Rouge, LA Feb 13 2014 Overview

More information

The Eclipse Parallel Tools Platform

The Eclipse Parallel Tools Platform May 1, 2012 Toward an Integrated Development Environment for Improved Software Engineering on Crays Agenda 1. What is the Eclipse Parallel Tools Platform (PTP) 2. Tour of features available in Eclipse/PTP

More information

Revision Control. An Introduction Using Git 1/15

Revision Control. An Introduction Using Git 1/15 Revision Control An Introduction Using Git 1/15 Overview 1. What is revision control? 2. 30,000 foot view 3. Software - git and gitk 4. Setting up your own repository on onyx 2/15 What is version control?

More information

Debugging with GDB and DDT

Debugging with GDB and DDT Debugging with GDB and DDT Ramses van Zon SciNet HPC Consortium University of Toronto June 28, 2012 1/41 Ontario HPC Summerschool 2012 Central Edition: Toronto Outline Debugging Basics Debugging with the

More information

Updating the Compiler?

Updating the Compiler? Updating the Compiler? Take Advantage of The New Development Toolchain Andreas Jaeger Product Manager aj@suse.com Programming Languages C C++ Fortran And Go 2 Why new compiler? Faster applications Support

More information

CSE 331 Software Design & Implementation

CSE 331 Software Design & Implementation CSE 331 Software Design & Implementation Spring 2019 Section 2 Development Tools UW CSE 331 Spring 2019 1 Administrivia HW1 done! HW2 due next Tuesday. HW3 out today, deadline upcoming. Everyone should

More information

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program.

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program. Language Translation Compilation vs. interpretation Compilation diagram Step 1: compile program compiler Compiled program Step 2: run input Compiled program output Language Translation compilation is translation

More information

Developing Android applications in Windows

Developing Android applications in Windows Developing Android applications in Windows Below you will find information about the components needed for developing Android applications and other (optional) software needed to connect to the institution

More information

Computing and compilers

Computing and compilers Computing and compilers Comp Sci 1570 to Outline 1 2 3 4 5 Evaluate the difference between hardware and software Find out about the various types of software Get a high level understanding of how program

More information

Compiling environment

Compiling environment Compiling environment Xavi Abellan Xavier.Abellan@ecmwf.int ECMWF February 23, 2016 Outline Introduction Fortran Compiler Linking Libraries Make Debugging Profiling Practical session 2 Introduction Compiling

More information

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Version Control September 18, 2018 Thursday (September 20) First in-class exercise On using git (today is a prelude with useful

More information

AMath 483/583 Lecture 7. Notes: Notes: Changes in uwhpsc repository. AMath 483/583 Lecture 7. Notes:

AMath 483/583 Lecture 7. Notes: Notes: Changes in uwhpsc repository. AMath 483/583 Lecture 7. Notes: AMath 483/583 Lecture 7 This lecture: Python debugging demo Compiled langauges Introduction to Fortran 90 syntax Declaring variables, loops, booleans Reading: class notes: Python debugging class notes:

More information

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read) 1 For the remainder of the class today, I want to introduce you to a topic we will spend one or two more classes discussing and that is source code control or version control. What is version control?

More information

Version control CSE 403

Version control CSE 403 Version control CSE 403 Goals of a version control system Keep a history of your work Explain the purpose of each change Checkpoint specific versions (known good state) Recover specific state (fix bugs,

More information

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3 CS162 January 19, 2017 Contents 1 Make 2 1.1 More details about Make.................................... 2 2 Git 3 2.1 Commands to know....................................... 3 3 GDB: The GNU Debugger

More information

Welcome. HRSK Practical on Debugging, Zellescher Weg 12 Willers-Bau A106 Tel

Welcome. HRSK Practical on Debugging, Zellescher Weg 12 Willers-Bau A106 Tel Center for Information Services and High Performance Computing (ZIH) Welcome HRSK Practical on Debugging, 03.04.2009 Zellescher Weg 12 Willers-Bau A106 Tel. +49 351-463 - 31945 Matthias Lieber (matthias.lieber@tu-dresden.de)

More information

AMath 483/583 Lecture 7

AMath 483/583 Lecture 7 AMath 483/583 Lecture 7 This lecture: Python debugging demo Compiled langauges Introduction to Fortran 90 syntax Declaring variables, loops, booleans Reading: class notes: Python debugging class notes:

More information

Software Development I

Software Development I 6.148 Software Development I Two things How to write code for web apps. How to collaborate and keep track of your work. A text editor A text editor A text editor Anything that you re used to using Even

More information

Profiling with TAU. Le Yan. 6/6/2012 LONI Parallel Programming Workshop

Profiling with TAU. Le Yan. 6/6/2012 LONI Parallel Programming Workshop Profiling with TAU Le Yan 6/6/2012 LONI Parallel Programming Workshop 2012 1 Three Steps of Code Development Debugging Make sure the code runs and yields correct results Profiling Analyze the code to identify

More information

Compiling environment

Compiling environment Compiling environment Working on Ecgate Xavi Abellan Xavier.Abellan@ecmwf.int ECMWF February 21, 2017 Outline Introduction Fortran Compiler Linking Libraries Make Debugging Profiling Practical session

More information

Compilation I. Hwansoo Han

Compilation I. Hwansoo Han Compilation I Hwansoo Han Language Groups Imperative von Neumann (Fortran, Pascal, Basic, C) Object-oriented (Smalltalk, Eiffel, C++) Scripting languages (Perl, Python, JavaScript, PHP) Declarative Functional

More information

Prof. Thomas Sterling

Prof. Thomas Sterling High Performance Computing: Concepts, Methods & Means Performance Measurement 1 Prof. Thomas Sterling Department of Computer Science Louisiana i State t University it February 13 th, 2007 News Alert! Intel

More information

HPCC - Hrothgar. Getting Started User Guide TotalView. High Performance Computing Center Texas Tech University

HPCC - Hrothgar. Getting Started User Guide TotalView. High Performance Computing Center Texas Tech University HPCC - Hrothgar Getting Started User Guide TotalView High Performance Computing Center Texas Tech University HPCC - Hrothgar 2 Table of Contents *This user guide is under development... 3 1. Introduction...

More information

DDT: A visual, parallel debugger on Ra

DDT: A visual, parallel debugger on Ra DDT: A visual, parallel debugger on Ra David M. Larue dlarue@mines.edu High Performance & Research Computing Campus Computing, Communications, and Information Technologies Colorado School of Mines March,

More information

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY 1 REVERTING CHANGES 2 REVERTING CHANGES Change local files git reset git checkout Revert a commit in the branch history git revert Reset

More information

Debugging with GDB and DDT

Debugging with GDB and DDT Debugging with GDB and DDT Ramses van Zon SciNet HPC Consortium University of Toronto June 13, 2014 1/41 Ontario HPC Summerschool 2014 Central Edition: Toronto Outline Debugging Basics Debugging with the

More information

Review Version Control Concepts

Review Version Control Concepts Review Version Control Concepts SWEN-261 Introduction to Software Engineering Department of Software Engineering Rochester Institute of Technology Managing change is a constant aspect of software development.

More information

From theory to practice: Standard tools Software carpentry, Part II. Pietro Berkes, Brandeis University

From theory to practice: Standard tools Software carpentry, Part II. Pietro Berkes, Brandeis University From theory to practice: Standard tools Software carpentry, Part II Pietro Berkes, Brandeis University Outline Collaborating: SVN Profiling: timeit, cprofile Debugging: pdb Documentation, code clarity:

More information

Programming in the Real World. Dr. Baldassano Yu s Elite Education

Programming in the Real World. Dr. Baldassano Yu s Elite Education Programming in the Real World Dr. Baldassano chrisb@princeton.edu Yu s Elite Education Our programs are getting bigger! Our game was already over 100 lines long - most programs are worked on by teams of

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to development tools 0.1 Development tools During this course, only the make tool, compilers, and the GIT tool will be used for the sake of simplicity:

More information

Introduction to debugging. Martin Čuma Center for High Performance Computing University of Utah

Introduction to debugging. Martin Čuma Center for High Performance Computing University of Utah Introduction to debugging Martin Čuma Center for High Performance Computing University of Utah m.cuma@utah.edu Overview Program errors Simple debugging Graphical debugging DDT and Totalview Intel tools

More information

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development;

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development; What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development; Why should I use a VCS? Repositories Types of repositories: Private - only you and the

More information

Using Git For Development. Shantanu Pavgi, UAB IT Research Computing

Using Git For Development. Shantanu Pavgi, UAB IT Research Computing Using Git For Development Shantanu Pavgi, pavgi@uab.edu UAB IT Research Computing Outline Version control system Git Branching and Merging Workflows Advantages Version Control System (VCS) Recording changes

More information

Software Engineering Practices. PHY 688: Numerical Methods for (Astro)Physics

Software Engineering Practices. PHY 688: Numerical Methods for (Astro)Physics Software Engineering Practices Class Business Does everyone have access to a Linux or Unix machine to work from? What programming languages do each of you typically use? Software Engineering Practices

More information

Branching and Merging

Branching and Merging Branching and Merging SWEN-261 Introduction to Software Engineering Department of Software Engineering Rochester Institute of Technology Version control branching supports the ability to manage software

More information

Follow us on Twitter for important news and Compiling Programs

Follow us on Twitter for important news and Compiling Programs Follow us on Twitter for important news and updates: @ACCREVandy Compiling Programs Outline Compiling process Linking libraries Common compiling op2ons Automa2ng the process Program compilation Programmers

More information

Version Control System - Git. zswu

Version Control System - Git. zswu Version Control System - Git zswu Overview Why VCS? Why Git? Using Git Personally Using Git with Others Etiquette Rules of Using Git Tools & Services Tips 2 Why VCS (1/3) How do you manage your homework?

More information

The Old World. Have you ever had to collaborate on a project by

The Old World. Have you ever had to collaborate on a project by What the Git? The Old World Have you ever had to collaborate on a project by Shuttling a USB drive back and forth Using Dropbox E-mailing your document around Have you ever accidentally deleted someone

More information

Profiling and debugging. Carlos Rosales September 18 th 2009 Texas Advanced Computing Center The University of Texas at Austin

Profiling and debugging. Carlos Rosales September 18 th 2009 Texas Advanced Computing Center The University of Texas at Austin Profiling and debugging Carlos Rosales carlos@tacc.utexas.edu September 18 th 2009 Texas Advanced Computing Center The University of Texas at Austin Outline Debugging Profiling GDB DDT Basic use Attaching

More information

Coding Tools. (Lectures on High-performance Computing for Economists VI) Jesús Fernández-Villaverde 1 and Pablo Guerrón 2 March 25, 2018

Coding Tools. (Lectures on High-performance Computing for Economists VI) Jesús Fernández-Villaverde 1 and Pablo Guerrón 2 March 25, 2018 Coding Tools (Lectures on High-performance Computing for Economists VI) Jesús Fernández-Villaverde 1 and Pablo Guerrón 2 March 25, 2018 1 University of Pennsylvania 2 Boston College Compilers Compilers

More information

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018 Version Control Click to edit Master EECS text 2311 styles - Software Development Project Second level Third level Fourth level Fifth level January 17, 2018 1 But first, Screen Readers The software you

More information

DEBUGGING ON FERMI PREPARING A DEBUGGABLE APPLICATION GDB. GDB on front-end nodes

DEBUGGING ON FERMI PREPARING A DEBUGGABLE APPLICATION GDB. GDB on front-end nodes DEBUGGING ON FERMI Debugging your application on a system based on a BG/Q architecture like FERMI could be an hard task due to the following problems: the core files generated by a crashing job on FERMI

More information

SGI Altix Getting Correct Code Reiner Vogelsang SGI GmbH

SGI Altix Getting Correct Code Reiner Vogelsang SGI GmbH SGI Altix Getting Correct Code Reiner Vogelsang SGI GmbH reiner@sgi.com Module Objectives After completing the module, you will able to Find caveats and hidden errors in application codes Handle debuggers

More information

OpenMP Example. $ ssh # You might have to type yes if this is the first time you log on

OpenMP Example. $ ssh # You might have to type yes if this is the first time you log on OpenMP Example Day 1, afternoon session 1: We examine a serial and parallel implementation of a code solving an N-body problem with a star, a planet and many small particles near the planet s radius. The

More information

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48 Git and GitHub Dan Wysocki February 12, 2015 Dan Wysocki Git and GitHub February 12, 2015 1 / 48 1 Version Control 2 Git 3 GitHub 4 Walkthrough Dan Wysocki Git and GitHub February 12, 2015 2 / 48 Version

More information

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

Section 2: Developer tools and you. Alex Mariakakis (staff-wide) Section 2: Developer tools and you Alex Mariakakis cse331-staff@cs.washington.edu (staff-wide) What is an SSH client? Uses the secure shell protocol (SSH) to connect to a remote computer o Enables you

More information

Introduction to Performance Tuning & Optimization Tools

Introduction to Performance Tuning & Optimization Tools Introduction to Performance Tuning & Optimization Tools a[i] a[i+1] + a[i+2] a[i+3] b[i] b[i+1] b[i+2] b[i+3] = a[i]+b[i] a[i+1]+b[i+1] a[i+2]+b[i+2] a[i+3]+b[i+3] Ian A. Cosden, Ph.D. Manager, HPC Software

More information

Developing Scientific Applications with the IBM Parallel Environment Developer Edition

Developing Scientific Applications with the IBM Parallel Environment Developer Edition Developing Scientific Applications with the IBM Parallel Environment Developer Edition Greg Watson, IBM grw@us.ibm.com Christoph Pospiech, IBM christoph.pospiech@de.ibm.com ScicomP 13 May 2013 Portions

More information

Oracle Developer Studio 12.6

Oracle Developer Studio 12.6 Oracle Developer Studio 12.6 Oracle Developer Studio is the #1 development environment for building C, C++, Fortran and Java applications for Oracle Solaris and Linux operating systems running on premises

More information

Laboratorio di Programmazione. Prof. Marco Bertini

Laboratorio di Programmazione. Prof. Marco Bertini Laboratorio di Programmazione Prof. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ Code versioning: techniques and tools Software versions All software has multiple versions: Each

More information

Technology Background Development environment, Skeleton and Libraries

Technology Background Development environment, Skeleton and Libraries Technology Background Development environment, Skeleton and Libraries Slides by Prof. Dr. Matthias Hölzl (based on material from Dr. Andreas Schröder) Outline Lecture 1 I. Eclipse II. Git Lecture 2 IV.

More information

G E T T I N G S TA R T E D W I T H G I T

G E T T I N G S TA R T E D W I T H G I T G E T T I N G S TA R T E D W I T H G I T A A R O N H O O V E R & B R A D M I N C H J A N U A R Y 2 2, 2 0 1 8 1 Why use a version control system? Much of this document was blatantly cribbed from Allen

More information

IBM C Rational Functional Tester for Java. Download Full Version :

IBM C Rational Functional Tester for Java. Download Full Version : IBM C2140-842 Rational Functional Tester for Java Download Full Version : http://killexams.com/pass4sure/exam-detail/c2140-842 QUESTION: 44 Which statement is true about the Time Delayed method when you

More information

Module Road Map. 7. Version Control with Subversion Introduction Terminology

Module Road Map. 7. Version Control with Subversion Introduction Terminology Module Road Map 1. Overview 2. Installing and Running 3. Building and Running Java Classes 4. Refactoring 5. Debugging 6. Testing with JUnit 7. Version Control with Subversion Introduction Terminology

More information

b. Developing multiple versions of a software project in parallel

b. Developing multiple versions of a software project in parallel Multiple-Choice Questions: 1. Which of these terms best describes Git? a. Integrated Development Environment b. Distributed Version Control System c. Issue Tracking System d. Web-Based Repository Hosting

More information

AccuRev Plugin for Crucible Installation and Release Notes

AccuRev Plugin for Crucible Installation and Release Notes AccuRev Plugin for Crucible 2017.2 Installation and Release Notes Micro Focus The Lawn 22-30 Old Bath Road Newbury, Berkshire RG14 1QN UK http://www.microfocus.com Copyright Micro Focus 2017. All rights

More information

Version control. what is version control? setting up Git simple command-line usage Git basics

Version control. what is version control? setting up Git simple command-line usage Git basics Version control what is version control? setting up Git simple command-line usage Git basics Version control - intro ensure we keep track of changes, updates, contributions, suggested mods... could try

More information

Important new structural developments in GEOS-Chem v11

Important new structural developments in GEOS-Chem v11 Important new structural developments in GEOS-Chem v11 Bob Yantosca Senior Software Engineer GEOS-Chem Support Team Jacob Group Meeting 10 Aug 2016 with: Melissa, Matt, Lizzie, Mike Table of Contents Motivation

More information

CVS. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 21

CVS. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 21 CVS Computer Science and Engineering College of Engineering The Ohio State University Lecture 21 CVS: Concurrent Version System Classic tool for tracking changes to a project and allowing team access Can

More information

Using Intel VTune Amplifier XE and Inspector XE in.net environment

Using Intel VTune Amplifier XE and Inspector XE in.net environment Using Intel VTune Amplifier XE and Inspector XE in.net environment Levent Akyil Technical Computing, Analyzers and Runtime Software and Services group 1 Refresher - Intel VTune Amplifier XE Intel Inspector

More information

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one. Multiple-Choice Questions: 1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.) a. update b. checkout c. clone d. import

More information

SECTION 1: CODE REASONING + VERSION CONTROL + ECLIPSE

SECTION 1: CODE REASONING + VERSION CONTROL + ECLIPSE SECTION 1: CODE REASONING + VERSION CONTROL + ECLIPSE cse331-staff@cs.washington.edu slides borrowed and adapted from Alex Mariakis and CSE 390a OUTLINE Introductions Code Reasoning Version control IDEs

More information

CS354 gdb Tutorial Written by Chris Feilbach

CS354 gdb Tutorial Written by Chris Feilbach CS354 gdb Tutorial Written by Chris Feilbach Purpose This tutorial aims to show you the basics of using gdb to debug C programs. gdb is the GNU debugger, and is provided on systems that

More information

Git better. Collaborative project management using Git and GitHub. Matteo Sostero March 13, Sant Anna School of Advanced Studies

Git better. Collaborative project management using Git and GitHub. Matteo Sostero March 13, Sant Anna School of Advanced Studies Git better Collaborative project management using Git and GitHub Matteo Sostero March 13, 2018 Sant Anna School of Advanced Studies Let s Git it done! These slides are a brief primer to Git, and how it

More information

Version control CSE 403

Version control CSE 403 Version control CSE 403 Goals of a version control system Keep a history of your work Explain the purpose of each change Checkpoint specific versions (known good state) Recover specific state (fix bugs,

More information

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b Git Cheat Sheet Git Basics Rewriting Git History git init Create empty Git repo in specified directory. Run with no arguments to initialize the current directory as a git repository. git commit

More information

21. This is a screenshot of the Android Studio Debugger. It shows the current thread and the object tree for a certain variable.

21. This is a screenshot of the Android Studio Debugger. It shows the current thread and the object tree for a certain variable. 4. Logging is an important part of debugging, which is hard to achieve on mobile devices, where application development and execution take place on different systems. Android includes a framework that

More information

Performance Analysis and Debugging Tools

Performance Analysis and Debugging Tools Performance Analysis and Debugging Tools Performance analysis and debugging intimately connected since they both involve monitoring of the software execution. Just different goals: Debugging -- achieve

More information

6 Git & Modularization

6 Git & Modularization 6 Git & Modularization Bálint Aradi Course: Scientific Programming / Wissenchaftliches Programmieren (Python) Prerequisites Additional programs needed: Spyder3, Pylint3 Git, Gitk KDiff3 (non-kde (qt-only)

More information

Get an Easy Performance Boost Even with Unthreaded Apps. with Intel Parallel Studio XE for Windows*

Get an Easy Performance Boost Even with Unthreaded Apps. with Intel Parallel Studio XE for Windows* Get an Easy Performance Boost Even with Unthreaded Apps for Windows* Can recompiling just one file make a difference? Yes, in many cases it can! Often, you can achieve a major performance boost by recompiling

More information

Dalhousie University CSCI 2132 Software Development Winter 2018 Lab 8, March 22

Dalhousie University CSCI 2132 Software Development Winter 2018 Lab 8, March 22 Dalhousie University CSCI 2132 Software Development Winter 2018 Lab 8, March 22 In this lab, you will first learn more about git. After that, you will get some practice on the make utility and learn more

More information

Tutorial: Analyzing MPI Applications. Intel Trace Analyzer and Collector Intel VTune Amplifier XE

Tutorial: Analyzing MPI Applications. Intel Trace Analyzer and Collector Intel VTune Amplifier XE Tutorial: Analyzing MPI Applications Intel Trace Analyzer and Collector Intel VTune Amplifier XE Contents Legal Information... 3 1. Overview... 4 1.1. Prerequisites... 5 1.1.1. Required Software... 5 1.1.2.

More information

[Software Development] Development Tools. Davide Balzarotti. Eurecom Sophia Antipolis, France

[Software Development] Development Tools. Davide Balzarotti. Eurecom Sophia Antipolis, France [Software Development] Development Tools Davide Balzarotti Eurecom Sophia Antipolis, France Version Control Version (revision) control is the process of tracking and recording changes to files Most commonly

More information

Technology Background Development environment, Skeleton and Libraries

Technology Background Development environment, Skeleton and Libraries Technology Background Development environment, Skeleton and Libraries Christian Kroiß (based on slides by Dr. Andreas Schroeder) 18.04.2013 Christian Kroiß Outline Lecture 1 I. Eclipse II. Redmine, Jenkins,

More information

Tau Introduction. Lars Koesterke (& Kent Milfeld, Sameer Shende) Cornell University Ithaca, NY. March 13, 2009

Tau Introduction. Lars Koesterke (& Kent Milfeld, Sameer Shende) Cornell University Ithaca, NY. March 13, 2009 Tau Introduction Lars Koesterke (& Kent Milfeld, Sameer Shende) Cornell University Ithaca, NY March 13, 2009 General Outline Measurements Instrumentation & Control Example: matmult Profiling and Tracing

More information

CIS 403: Lab 6: Profiling and Tuning

CIS 403: Lab 6: Profiling and Tuning CIS 403: Lab 6: Profiling and Tuning Getting Started 1. Boot into Linux. 2. Get a copy of RAD1D from your CVS repository (cvs co RAD1D) or download a fresh copy of the tar file from the course website.

More information

Software Project (Lecture 4): Git & Github

Software Project (Lecture 4): Git & Github Software Project (Lecture 4): Git & Github Wouter Swierstra, Atze Dijkstra Feb 2016 Wouter Swierstra, Atze Dijkstra Software Project (Lecture 4): Git & Github Feb 2016 1 / 45 Wouter Swierstra, Atze Dijkstra

More information

Lab 08. Command Line and Git

Lab 08. Command Line and Git Lab 08 Command Line and Git Agenda Final Project Information All Things Git! Make sure to come to lab next week for Python! Final Projects Connect 4 Arduino ios Creative AI Being on a Team - How To Maximize

More information

Outline The three W s Overview of gits structure Using git Final stuff. Git. A fast distributed revision control system

Outline The three W s Overview of gits structure Using git Final stuff. Git. A fast distributed revision control system Git A fast distributed revision control system Nils Moschüring PhD Student (LMU) 1 The three W s What? Why? Workflow and nomenclature 2 Overview of gits structure Structure Branches 3 Using git Setting

More information

Software Revision Control for MASS. Git Installation / Configuration / Use

Software Revision Control for MASS. Git Installation / Configuration / Use Software Revision Control for MASS Git Installation / Configuration / Use Matthew Sell, CSSE Student MASS Research Participant, February 2014 Overview Download / execute installer Initial configuration

More information

CSE 374 Programming Concepts & Tools

CSE 374 Programming Concepts & Tools CSE 374 Programming Concepts & Tools Hal Perkins Fall 2017 Lecture 11 gdb and Debugging 1 Administrivia HW4 out now, due next Thursday, Oct. 26, 11 pm: C code and libraries. Some tools: gdb (debugger)

More information

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014 Git Tutorial Version: 0.2 Anders Nilsson andersn@control.lth.se April 1, 2014 1 Introduction Why use git, or any other version control software to keep track of files? In short there are at least three

More information

Debugging (Part 1) The material for this lecture is drawn, in part, from The Practice of Programming (Kernighan & Pike) Chapter 5

Debugging (Part 1) The material for this lecture is drawn, in part, from The Practice of Programming (Kernighan & Pike) Chapter 5 Debugging (Part 1) The material for this lecture is drawn, in part, from The Practice of Programming (Kernighan & Pike) Chapter 5 1 For Your Amusement When debugging, novices insert corrective code; experts

More information

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS SENG 371 SOFTWARE EVOLUTION LAB OUTLINE Introduction to Version Control Systems VERSION CONTROL SYSTEMS Subversion Git and Github 1 Prepared by Pratik Jain 2 INTRODUCTION TO VCS A version control system

More information

Tools for the programming mid-semester projects

Tools for the programming mid-semester projects Contents GIT Quickstart 2 Teamwork 14 StyleCop Quickstart 14 Usage in VS2015 15 Usage in older VS versions 15 DoxyGen Quickstart 17 XML documentations 18 Doxygen 18 Please keep in mind that the remaining

More information

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

CS 520: VCS and Git. Intermediate Topics Ben Kushigian CS 520: VCS and Git Intermediate Topics Ben Kushigian https://people.cs.umass.edu/~rjust/courses/2017fall/cs520/2017_09_19.zip Our Goal Our Goal (Overture) Overview the basics of Git w/ an eye towards

More information