Difference between revisions of "Allinea: DDT"

From Define Wiki
Jump to navigation Jump to search
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Starting Allinea DDT ==
+
== Type of application ==
  
Allinea DDT can be started both locally, inside the cluster, and remotely, from a laptop or PC.
+
In order to start a debugging job for a (parallel) application:
  
*Starting locally
+
#Press the Run button. In the next window:
 
+
#Fill the "Äpplication" field with the exact path of the executable to be run
#Connect to server with X forwarding enabled (ssh -X).
+
#*If the application needs command line arguments or stdin input, these can be provided in the "Arguments" and "stdin file" fields, respectively.
#Go in Allinea DDT installation path and run ./ddt (/cm/local/allinea/bin/ for the Boston head node).
 
 
 
*Starting remotely
 
 
 
#Download Allinea tools from their website (http://www.allinea.com/products/downloads/download-allinea-ddt-and-allinea-map).
 
#Untar and run the installer file.
 
#Open Allinea DDT and at the Remote Launch menu open the settings and enter the hostname (username@ip_address) and the Allinea installation directory on the server.
 
#(Optional) Test the connection by pressing the Test Remote Launch button. (Might be prompted to provide the password, in order to connect to the server). If everything works out, the message "Remote Launch test completed successfully." will appear at the top left corner of the testing window.
 
#Press Ok and it will be ready to use.
 
 
 
== Debugging an application ==
 
  
In order to start a debugging job for a (parallel) application:
+
==== Notes ====
  
#Press the Run button. In the next window:
+
*'''For all the following application types, make sure to load the appropriate modules in the same terminal as the DDT will be run, or have the modules be loaded in the <tt>.bashrc</tt> file. Otherwise, libraries will be missing.'''
#Fill the "Äpplication" field with the exact path of the executable to be run. If the application needs command line arguments or stdin input, these can be provided in the "Arguments" and "stdin file" fields, respectively.
+
*'''Compile the application with <tt>-g</tt> flag'''
  
==== MPI applications ====
+
=== MPI applications ===
  
 
#Provide the number of processes
 
#Provide the number of processes
Line 35: Line 24:
 
Different MPI libraries need different settings. First of all be sure that the application is compiled with the <tt>mpicc</tt> command of the corresponding library.
 
Different MPI libraries need different settings. First of all be sure that the application is compiled with the <tt>mpicc</tt> command of the corresponding library.
  
*'''OpenMPI 1.8.1 compiled with Intel compiler:''' Load the <tt>intel/compiler/64/14.0/2013_sp1.3.174</tt> module from the same terminal as DDT is run, otherwise an error message will appear stating that the <tt>libimf.so</tt> shared library cannot be found.
+
*'''OpenMPI 1.8.1 compiled with Intel compiler:''' Load the <tt>intel/compiler/64/14.0/2013_sp1.3.174</tt> module.
 
*'''OpenMPI 1.8.1 compiled with GCC:''' Just follow the above steps. No other changes must be made.
 
*'''OpenMPI 1.8.1 compiled with GCC:''' Just follow the above steps. No other changes must be made.
*'''MVAPICH2 2.0b compiled with Intel compiler:''' Load the <tt>mvapich2/intel/63/2.0b</tt> and <tt>intel/compiler/64/14.0/2013_sp1.3.174</tt> modules from the same terminal as DDT is run, otherwise missing shared libraries error messages will appear.
+
*'''MVAPICH2 2.0b compiled with Intel compiler:''' Load the <tt>mvapich2/intel/63/2.0b</tt> and <tt>intel/compiler/64/14.0/2013_sp1.3.174</tt> modules.
*'''MVAPICH2 2.0b compiled with GCC:''' Load the <tt>mvapich2/intel/63/2.0b</tt> module from the same terminal as DDT is run.
+
*'''MVAPICH2 2.0b compiled with GCC:''' Load the <tt>mvapich2/intel/63/2.0b</tt> module.
*'''Intel MPI 4.1.3:''' Load the <tt>intel/compiler/64/14.0/2013_sp1.3.174</tt> and <tt>intel-mpi/64/4.1.3/049</tt> modules from the same terminal as DDT is run.
+
*'''Intel MPI 4.1.3:''' Load the <tt>intel/compiler/64/14.0/2013_sp1.3.174</tt> and <tt>intel-mpi/64/4.1.3/049</tt> modules.
*'''MPICH 3.1 compiled with GCC:''' Load the <tt>mpich/ge/gcc/64/3.1</tt> module from the same terminal as DDT is run.
+
*'''MPICH 3.1 compiled with GCC:''' Load the <tt>mpich/ge/gcc/64/3.1</tt> module.
 +
 
 +
=== CUDA applications ===
 +
 
 +
Just load the correct CUDA module. If the application uses MPI, use the corresponding modules from the list above.
 +
 
 +
== Debug the application ==
 +
 
 +
After DDT starts the application, all the processes/threads will stop at the first statement of the <tt>main</tt> function.
 +
 
 +
=== Running steps ===
 +
 
 +
There are several ways to continue with the application workflow:
 +
 
 +
*'''Play/Continue''' [[File:run.png|20px]] : Run the application until the end or until it reaches a breakpoint.
 +
*'''Step into''' [[File:step-into.png|20px]] : Step to the next command in the code.
 +
*'''Step over''' [[File:step-over.png|22px]] : Step to the next command in the current function (does not enter called functions).
 +
*'''Step out''' [[File:step-out.png|18px]] : Step out of the current function (does not work for <tt>main</tt>).
 +
*'''Run to line''' [[File:run-to-line.png|20px]] : Run the application until it reaches a given line number.
 +
 
 +
The application can be paused at any point by pressing the Pause button.
 +
 
 +
=== Breakpoints ===
 +
 
 +
To set a breakpoint, either press the ''Add Breakpoint'' button ([[File:breakpoint.png|20px]]), which will open an ''Edit Breakpoint'' window, or press the white dot on the left of the required line. After the breakpoint is set, a red dot will appear on the left of the corresponding line.
 +
 
 +
All the breakpoints can be seen in the ''Breakpoints'' tab, on the bottom left corner of the window. To edit the settings of a breakpoint, either right clock on it and click edit (from within the ''Breakpoints'' tab) or directly edit its settings, changing the values of the corresponding columns.
 +
 
 +
=== Variables ===
 +
 
 +
The variable tabs can be seen on the right side of the window.
 +
 
 +
*The ''Locals'' tab includes all the local variables of the current function, along with their values.
 +
*The ''Current Line'' tab includes all the variables of the current code line, along with their values.
 +
*To constantly view the value of a variable, right click on it and press ''Add to Evaluations''. It will then appear in the ''Evaluation'' tab, on the bottom right corner of the window and its value will automatically change as the application goes on.
 +
*A watchpoint can be added to any variable, by right clicking on it and pressing ''Add Watchpoint''. It will then appear in the ''Watchpoints'' tab, on the bottom left part of the window, and every time the value of that variable changes a notification will appear on the screen.
 +
 
 +
===== Arrays =====
 +
 
 +
If a variable is an array then it can be seen in its dimensional view. Right click on the array and press ''View Array''.
  
== Watch variables' values ==
+
#Set the number and the size of the array's dimensions.
 +
#*If the array is statically allocated, then DDT automatically finds the number and the size of the dimensions.
 +
#*If the array is dynamically allocated, then DDT automatically finds the number of dimensions, but the user must provide the size for each dimension.
 +
#*If the array has different values for different processes, they can all be seen in one table by selecting the corresponding number in the ''Distributed Array Dimensions'' drop down menu.
 +
#Click ''Evaluate'' and the array will appear in the ''Data Table'' tab on the bottom part of the window.
 +
#*To find a specific element in the table, type its coordinates after clicking on the ''Goto'' button.
 +
#*To export the results into .cvs or .hdf5 format, click on the ''Export'' button.
 +
#*Statistics about the values of the array can be seen under the ''Statistics'' tab.
 +
#*The array values can be visualised, when pressing the ''Visualise'' button. The resulted graph will by default be a 3D one. An example image is shown below, where each process calculates a different sin curve.
 +
[[File:sin-curve.png|center|300px]]

Latest revision as of 16:20, 30 March 2015

Type of application

In order to start a debugging job for a (parallel) application:

  1. Press the Run button. In the next window:
  2. Fill the "Äpplication" field with the exact path of the executable to be run
    • If the application needs command line arguments or stdin input, these can be provided in the "Arguments" and "stdin file" fields, respectively.

Notes

  • For all the following application types, make sure to load the appropriate modules in the same terminal as the DDT will be run, or have the modules be loaded in the .bashrc file. Otherwise, libraries will be missing.
  • Compile the application with -g flag

MPI applications

  1. Provide the number of processes
  2. Define MPI implementation. In order to do that:
    • Click the "Change" button
    • Choose between different MPI libraries
    • Define the exact path, on the server, of the mpirun command of the chosen MPI library
    • Click Ok
  3. Click Run

Different MPI libraries need different settings. First of all be sure that the application is compiled with the mpicc command of the corresponding library.

  • OpenMPI 1.8.1 compiled with Intel compiler: Load the intel/compiler/64/14.0/2013_sp1.3.174 module.
  • OpenMPI 1.8.1 compiled with GCC: Just follow the above steps. No other changes must be made.
  • MVAPICH2 2.0b compiled with Intel compiler: Load the mvapich2/intel/63/2.0b and intel/compiler/64/14.0/2013_sp1.3.174 modules.
  • MVAPICH2 2.0b compiled with GCC: Load the mvapich2/intel/63/2.0b module.
  • Intel MPI 4.1.3: Load the intel/compiler/64/14.0/2013_sp1.3.174 and intel-mpi/64/4.1.3/049 modules.
  • MPICH 3.1 compiled with GCC: Load the mpich/ge/gcc/64/3.1 module.

CUDA applications

Just load the correct CUDA module. If the application uses MPI, use the corresponding modules from the list above.

Debug the application

After DDT starts the application, all the processes/threads will stop at the first statement of the main function.

Running steps

There are several ways to continue with the application workflow:

  • Play/Continue
    Error creating thumbnail: File missing
     : Run the application until the end or until it reaches a breakpoint.
  • Step into
    Error creating thumbnail: File missing
     : Step to the next command in the code.
  • Step over
    Error creating thumbnail: File missing
     : Step to the next command in the current function (does not enter called functions).
  • Step out
    Error creating thumbnail: File missing
     : Step out of the current function (does not work for main).
  • Run to line
    Error creating thumbnail: File missing
     : Run the application until it reaches a given line number.

The application can be paused at any point by pressing the Pause button.

Breakpoints

To set a breakpoint, either press the Add Breakpoint button (

Error creating thumbnail: File missing

), which will open an Edit Breakpoint window, or press the white dot on the left of the required line. After the breakpoint is set, a red dot will appear on the left of the corresponding line.

All the breakpoints can be seen in the Breakpoints tab, on the bottom left corner of the window. To edit the settings of a breakpoint, either right clock on it and click edit (from within the Breakpoints tab) or directly edit its settings, changing the values of the corresponding columns.

Variables

The variable tabs can be seen on the right side of the window.

  • The Locals tab includes all the local variables of the current function, along with their values.
  • The Current Line tab includes all the variables of the current code line, along with their values.
  • To constantly view the value of a variable, right click on it and press Add to Evaluations. It will then appear in the Evaluation tab, on the bottom right corner of the window and its value will automatically change as the application goes on.
  • A watchpoint can be added to any variable, by right clicking on it and pressing Add Watchpoint. It will then appear in the Watchpoints tab, on the bottom left part of the window, and every time the value of that variable changes a notification will appear on the screen.
Arrays

If a variable is an array then it can be seen in its dimensional view. Right click on the array and press View Array.

  1. Set the number and the size of the array's dimensions.
    • If the array is statically allocated, then DDT automatically finds the number and the size of the dimensions.
    • If the array is dynamically allocated, then DDT automatically finds the number of dimensions, but the user must provide the size for each dimension.
    • If the array has different values for different processes, they can all be seen in one table by selecting the corresponding number in the Distributed Array Dimensions drop down menu.
  2. Click Evaluate and the array will appear in the Data Table tab on the bottom part of the window.
    • To find a specific element in the table, type its coordinates after clicking on the Goto button.
    • To export the results into .cvs or .hdf5 format, click on the Export button.
    • Statistics about the values of the array can be seen under the Statistics tab.
    • The array values can be visualised, when pressing the Visualise button. The resulted graph will by default be a 3D one. An example image is shown below, where each process calculates a different sin curve.
Error creating thumbnail: File missing