PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Command prompt never appears

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
glendening



Joined: 21 Dec 2004
Posts: 9

PostPosted: Thu Feb 03, 2005 4:47 pm    Post subject: Command prompt never appears Reply with quote

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.
Back to top
View user's profile
mleair



Joined: 19 Jul 2004
Posts: 67
Location: Portland Group

PostPosted: Thu Feb 03, 2005 5:30 pm    Post subject: debugging large programs Reply with quote

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
Back to top
View user's profile
Bryce



Joined: 15 Sep 2004
Posts: 2

PostPosted: Tue Apr 05, 2005 6:04 pm    Post subject: WRF/Chem v2.03 Reply with quote

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...
Back to top
View user's profile
mleair



Joined: 19 Jul 2004
Posts: 67
Location: Portland Group

PostPosted: Wed Apr 06, 2005 12:20 am    Post subject: Re: WRF/Chem v2.03 Reply with quote

Bryce wrote:
...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
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group