PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

basic usage questions

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



Joined: 25 Sep 2007
Posts: 2

PostPosted: Tue Sep 25, 2007 1:59 pm    Post subject: basic usage questions Reply with quote

Hello,

I'm trying to use the PGroup debugger to step through a horrible mess of legacy spaghetti F77 code, in hopes of porting it to linux. The code dies after trying to read the 6th line of input. The debugger hangs at line 31 of the "Disassembly". I confess to never having used a debugger before.

The code expects to find several files in the directory of execution and it needs input on stdin. If I execute "pgdbg (path to executable)" should the executable be able to find the files it needs? Further, entering a "run < input" command in the debugger should feed the contents of "input" to the program on stdin, correct? This doesn't seem to be working. Does it need the absolute path to "input".

The debugger hangs right at the point where it tries to read input from unit 5. Any suggestions?

Thanks.
Greg
Back to top
View user's profile
donb



Joined: 20 Jul 2004
Posts: 88
Location: The Portland Group, Inc.

PostPosted: Tue Sep 25, 2007 2:36 pm    Post subject: Reply with quote

Greg,
It sounds like you are doing the right things. Invoke the debugger as follows ('$' is the prompt):

$ pgdbg your_app

Then to run it with redirection from stdin, use the following command ('pgdbg>' is the prompt):

pgdbg> run < your_input_file

A relative path to your_input_file should work fine. If you are having trouble with this and just want to make progress, you could try the following:

(1) invoke your program using the 'run' command without input redirection
(2) copy and paste the first dozen or so lines of your input file into the Program I/O Window. Your program should read it from that window as though you typed it in.

I suggest this since you say the program is hanging on line six of the input. Obviously this workaround isn't useful if you have thousands of lines of input, but you should be able to get at your particular problem this way.

If you run into more problems with this please let us know.
Don
Back to top
View user's profile
fischega



Joined: 25 Sep 2007
Posts: 2

PostPosted: Wed Sep 26, 2007 6:42 am    Post subject: Reply with quote

donb wrote:

Then to run it with redirection from stdin, use the following command ('pgdbg>' is the prompt):

pgdbg> run < your_input_file

A relative path to your_input_file should work fine.


Hmm. Weird. I still can't get this to work. Your other suggestion about pasting the input into the IO window works, though, and the input file is small (~15 lines). Thanks!
Back to top
View user's profile
donb



Joined: 20 Jul 2004
Posts: 88
Location: The Portland Group, Inc.

PostPosted: Wed Sep 26, 2007 1:27 pm    Post subject: Reply with quote

Please let us know the following information, by either posting here or sending email to trs@pgroup.com:

(1) which version of the debugger you are using (run 'pgdbg -V' to get this information)

(2) what operating system you are running on

(3) what version of the operating system it is

and we will look into the problem further.

Glad to hear the workaround helped, at least.
Thanks
--Don
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