PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Naive PGI Visual Fortran question

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



Joined: 18 Aug 2010
Posts: 14

PostPosted: Thu Sep 09, 2010 3:57 pm    Post subject: Naive PGI Visual Fortran question Reply with quote

My Fortran application is a DLL called from a C++ main GUI application. I have compiled it successfully using PGI Visual Fortran in Visual Studio 2008, and it runs, but the debugger doesn't work as I expected.

For example, if I set a breakpoint within a Fortran routine that I know is regularly called from the GUI, the breakpoint is never triggered; likewise, if I set a breakpoint in the C++ code just before a call to a Fortran function and try to step through, the debugger ignores the Fortran code and steps on to the next C++ line.

I am of course compiling the Fortran code in debug mode. What am I doing wrong?
Back to top
View user's profile
ams



Joined: 14 Jul 2004
Posts: 24

PostPosted: Thu Sep 09, 2010 4:46 pm    Post subject: Reply with quote

The VC++ debugger may be having trouble debugging in the PGI-compiled code. The PGI debug engine is included with PVF and can debug both VC++-compiled and PGI-compiled objects. You can invoke the PGI debug engine by following these steps:

1) Set the PVF project as the StartUp Project (right-click on the project in the Solution Explorer to get this option in the context menu).
2) Open the properties for the PVF project and select the Debugging property page.
3) Set Application Command to the full path to the exe to run (i.e., in your main project).
4) Set Application Arguments, Environment, and Working Directory if necessary.
5) Try running without debugging first.
6) Try debugging (F5 as usual). This should invoke the PGI debug engine. For the most part the debugging experience should look the same as when you use VC++, but the PGI-compiled code should also be accessible.
Back to top
View user's profile
Eos Pengwern



Joined: 18 Aug 2010
Posts: 14

PostPosted: Thu Sep 09, 2010 5:33 pm    Post subject: Reply with quote

Thank you very much. I tried that, and it worked when I selected "Start without debugging".

However,when I selected "Start debugging" using the same settings, all that happened was that after a very long (5-10 minute) delay, a blue box (entitled "PGDGB Program I/O Window") appeared on the screen with a message saying:

"- accept: timed out: client init: No such file or directory"

I must have missed something out somewhere, but the fact that it worked well the first time round indicates that I should have the paths set up properly. Where else should I look?
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 © 2001, 2002 phpBB Group