Pgdbg: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 2: Line 2:
=PGI Debugger (pgdbg) =
=PGI Debugger (pgdbg) =
== What is Pgdbg ? ==
== What is Pgdbg ? ==
For the most of the C, C++, or Fortran 77 codes one can use a regular GNU debugger such as GDB. However, the Fortran 90/95 programs are not handled very well by the GDB. The Portland Group has developed a debugger called [https://www.pgroup.com/products/tools.htm/pgdbg.htm pgdbg]  which is more suited for such codes.
For the most of the C, C++, or Fortran 77 codes one can use a regular GNU debugger such as GDB. However, the Fortran 90/95 programs are not handled very well by the GDB. The Portland Group has developed a debugger called [https://www.pgroup.com/products/tools.htm/pgdbg.htm pgdbg]  which is more suited for such codes. Pgdbg is provided in two modes: a graphical mode with the enabled X11 forwarding or a text mode. Pgdbg can be used to debug codes with MPI-parallel, OpenMP thread-parallel, or MPI-OpenMP hybrid instructions.
 
== Preparing your application ==
=== Switch to PGI compiler ===
Load the appropriate PGI compiler. For example, for PGI 17.3:
{{Command|module load pgi/17.3}}
 
=== Compile your code ===
To be able to debug with pgdbg you first need to compile your code with debugging information enabled. With the pgdbg you do so by adding a debugging flag "-g":
{{Command|pgcc -g program.c -o program}}
Bureaucrats, cc_docs_admin, cc_staff
337

edits

Navigation menu