![]() |
|
|
|
Debugging and optimizing codes on LosLobos
1.0 Available debuggers The GNU debugger gdb is available on LosLobos for debugging C and C++ codes. Fortran support is not available at this time. To debug your code using gdb first compile using the '-g' flag for the compiler, and then enter
where a.out is your executable. More information is available by entering "man gdb" to read the man page, or by entering "info gdb". Note: The gdb debugger does not allow you to debug multiple threads of a MPI code. To debug MPI codes use TotalView. The X Windows interface xxgdb to gdb is available. It provides visual feedback and mouse input for the user to control program executions, to examine the function call stack, and to display values of variables. To debug your code enter
where a.out is your executable. More information is available by entering "man xxgdb" to read the man page. Note: You must be using a terminal or workstation capable of displaying X Windows in order to use xxgdb. See Using the X Window System for more information. The pgdbg debugger from PGI is available on the LosLobos cluster. To debug your code enter
where a.out is your executable. For more information enter "man pgdbg" to read the man page. Note: The pgdbg debugger does not allow you to debug multiple threads of a MPI code. To debug MPI codes use TotalView. The X Windows interface Xpgdbg to pgdbg is available. It provides visual feedback and mouse input for the user to control program executions, to examine the function call stack, and to display values of variables. To debug your code enter
where a.out is your executable. Note: You must be using a terminal or workstation capable of displaying X Windows in order to use Xpgdbg. See Using the X Window System for more information. The PGI profiling tool pgprof is available on the LosLobos cluster. To use pgprof to profile your code you must first compile your code using either the -Mprof=func flag or the -Mprof=lines. Then run your code as usual. After your code finishes a datafile named "pgprof.out" containing the profiling data that will be generated. To examine the datafile on the command line enter:
The pgprof tool also has an X Windows interface. To examine the datafile using the X Windows interface enter
More information is available by entering "man pgprof" to read the man page for pgprof. Note: The PGI profiler pgprof does not allow you to profile multiple threads of a MPI code. |
|
|