Text Only Login to PAWS
Baton Rouge, Louisiana |
LSU Homepage
homeaboutprogramprojectscyberinfrastructurenewseventscontact
Parallel debugging for Great Lakes Consortium Summer School 2009

Parallel debugging techniques

Prepared for the Scaling to Petascale Summer School 2009

Presentation

Parallel_Debugging_Summer2009.pdf ( pptx version)

Exercises

Problem

Please refer to the slides of the presentation for the description of the program.

Source files

Below are the source files for the hands-on exercises discussed in the class. They are available in Fortran and C.

C programs Fortran programs
Sequential cell_seq.c cell_seq.f90
MPI

cell_mpi_bug.c

cell_mpi_bug.f90

OpenMP

cell_omp_bug.c

cell_omp_bug.f90

How to compile the program

Detailed instructions on how to compile programs on the following platforms:

Option to enable OpenMP for different compilers:

  • Intel: -openmp
  • PGI: -mp
  • IBM: -qsmp=omp

And do not forget to include the "-g" flag when compiling a program for debugging purpose.

How to run the program

The program takes two command line arguments:

  • N - the size of the 1-D periodic array
  • Niter - the total number of iterations

Here is what I got when running the sequential version on Ranger with N=300 and Niter=100:

 
login3% ./cell_seq_c 300 100

Size of the array:    300
Number of iterations: 100

Maximum: 8
Average: 4.000000

Additional notes

When checking the correctnes of the parallel programs (against the result of the sequential version), you might want to:

  1. Run with different N's to see if it has any effect on the behavior of the program
  2. Run multiple times to see if the result is consistent

Solution

The solutoin can be found here .

How to run TotalView/DDT

Below are links to detailed instructions on how to run TotalView on Bluefire, Pople and Athena, and DDT on Ranger.

Ranger

Bluefire

Athena

Pople

Notes

When starting a MPI program with DDT, it stops the execution at MPI_Init. With TotalView, however, you will see a pop-up message:

 
Process xxx is a parallel job.
Do you want to stop the job now?
Click on "yes" if you want it to stop at MPI_Init, and "no" if you don't.

If you see something like this with DDT, you need to change the font size to 12 (Session -> Options -> Appearance -> Font size):

References

TotalView user manual

DDT user manual

LSU Homepage