Star

Home

Biochem

Biochem

Genetics

Genetics

Orf

Orf

Hydro

Hydro

Molsim

Molsim

Cluster

Cluster

Hpc

Hpc

This section will explain how to debug OpenMP code.

  1. Open the source file you want to debug and click on the grey space to the left of the line you want to place a breakpoint at. This will add a red block to the left of the line.


  2. After setting your breakpoints you can take a look at all breakpoints defined by going to Window → Debugging → Breakpoints.

  3. Right click your OpenMP project and select “Debug Project”.
  4. Using the StarHPC virtual machine image you might receive the error shown below. You can safely ignore this error by pressing “OK” and debugging will continue normally. This is related to a bug in Sun's dbx debugger.
  5. After the debugger starts, you will see a set of debugging icons below the file menu.


    Debug Functions

    • Step Over - Execute the current line of code and pause at the next line
    • Step Into - Go into the method call at the current line and pause at the first line of code
    • Step Out - Step out of the current function call and pause at the next line.
    • Resume Execution - Resume code execution without pausing until the next parallel breakpoint is encountered
    • Stop Debugging - Stop debugging. This will stop the parallel run and quit the debugging session.

  6. With the debugger started, you will see a set of tabs towards the lower right of the screen. The “Local Varibles” tab provides a list of variables for the current thread.

  7. To switch threads go to Window → Debugging → Threads.
  8. You will now see a “Threads” tab among the others. Clicking this tab and double clicking to select an alternate thread will refresh the local variables list to show you each thread's local variables.