Command prompt never appears

When I try to use the debugger ala “pgdgb -text program.exe” (to keep
things simple, but same problem occurs in gui mode) after the
“Loading” message I never get a debugger prompt but “top” tells me
that “pgdgb” is running and using a full cpu of cycles (this lasts until I kill
pgdgb, after 30 mins). The program itself is not running since the
output it would produce never appears. I do get the prompt when
I instead use a toy fortran test example. The executable in question
is rather large (50MB) but runs with no apparent problems if invoked
outside the debugger (I have a 1 GB RAM, dual 1900 AMD XP box running
RHEL3 Linux and have removed all other applications to free as much memory
as possible). The program is capable of threads, but I compile in the
simplest mode which omits threads - and I can see during the make
process that the -g option is being used for the pgf90 calls.

Hi,

My guess is that PGDBG is busy loading in the symbol information (a.k.a. dwarf information) since it is a very large program as you noted. To verify, try compiling your program without the -g option. Then bring your program up with PGDBG. My guess is that PGDBG will immediately complain that it cannot find a main compiled -g and give you a prompt. Assuming you see this, then your problem is probably a large debug section in your code. You have two options: 1. wait for PGDBG to finish reading in the dwarf info. or 2. Compile the file that contains the main routine of your program -g (In C this is the main() function, in fortran it’s your program’s entry point) and each file that you wish to debug. The rest can be compiled without -g. Hopefully PGDBG can read the dwarf information in faster.

Hope this helps,

Mark

I am having similar problems debugging the Weather Reasearch & Forecasting model w/Chem (WRFChem). The WRF executable is ~64Mb. It reads the DWARFv2 information, claims the file is loaded, then sits there hogging up the CPU and not giving me a prompt. It’s been going for about 20 minutes now. I think I’ll let it go overnight, but this is is
something which absolutely must be fixed…

Oh yes, it’s a statically linked, k8-64 target with both C and F90 code mixed. It doesn’t seem to make a difference whether I use gcc or pgcc.

OS is Cray Linux 1.1 build 19 running on a cluster of dual processor Opterons.

Ugh. Well I checked at 35-40 minutes and I had a prompt. Not exactly conducive to an iterative debugging cycle…

Hi Bryce,

It’s probably a large dwarf debug section in your code. We hope to improve this performance in future releases. For most programs this load time is not bad. My suggestion is the same as my previous reply. Try compiling just the program’s entry point and a subset of the source files with the -g option. This should cut down on the load time.

Regards,

Mark