PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

pgdbg fails on Mac OS X
Goto page 1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
Aimé



Joined: 08 Feb 2010
Posts: 7

PostPosted: Mon Feb 08, 2010 3:52 pm    Post subject: pgdbg fails on Mac OS X Reply with quote

I compiled a Fortran90 program with pgf90, and the program seems to run as expected. When I run pgdbg, it reports that the executable was loaded; but when I type "run" it returns "ERROR: CANNOT LOAD". How can I figure out what's going on please?

Also, it's a large complicated program and pgdbg seems to re-build laboriously the same dSYM sub-directory every time. How can I re-use that?
Back to top
View user's profile
Aimé



Joined: 08 Feb 2010
Posts: 7

PostPosted: Mon Feb 08, 2010 3:58 pm    Post subject: Reply with quote

Ps., after posting above, I find I get the same problem even with a very short single F90 source, compiling just with "pgf90 -g".

I am running a Mac OS X Intel Core 2 Duo. Could there be a 32- vs 64-bit issue?
Back to top
View user's profile
donb



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

PostPosted: Mon Feb 08, 2010 4:50 pm    Post subject: Reply with quote

Aime

Sorry you are having troubles with PGDBG. There are a few things you could do to help diagnose the problem.

The first thing to check on Mac OS X is that the debugger will run with group "procmod" privileges. This is supposed to be handled during installation, but perhaps in your case it wasn't. That can be accomplished in two ways:
(1) you are a member of group procmod
(2) the permissions on the executable named "pgdebug" should be "setgid procmod"
In addition, the debugger executable must be installed on a local drive.

This is all due to Mac OS X security requirements.

To see if you are a member of group procmod, run
Code:
   $ id

and look to see if procmod shows up in the list.

To see if the debugger (an executable named "pgdebug") has "setgid procmod" permissions, you can run the following commands:
Code:
   $ which pgdebug
/usr/pgi/osx86-64/10.1/bin/pgdebug
   $ ls -l `which pgdebug`
-rwxrwsr-x  1 myname  procmod  12820680 Jan  6 16:00 /usr/pgi/osx86-64/10.1/bin/pgdebug*

Note that it is owned by group procmod and the setgid bit is set (that is the 's' in rwxrwsr-x).

To see if the debugger is on a local drive, use the 'df' command on the directory where the "pgdebug" executable is located:
Code:
   $df /usr/pgi/osx86-64/10.1/bin

If the Filesystem in the output looks something like /dev/disk0s2, it is a local filesystem and should be OK. If it looks more like foo.bar.com:/vol/vol5/dir1, then it is a network drive, and that is a problem.

Other things of interest: what version of Mac OS X are you running (10.4/Tiger, 10.5/Leopard, 10.6/Snow Leopard)? Select the About box under the Apple menu to find this information.

As to your other questions:
(1) can you re-use the dSYM directory - unfortunately, at this time pgdbg regenerates it for every debug session.
(2) is it a 64-bit vs 32-bit issue - it's possible but seems unlikely given the symptoms you describe.

Let us know what you find out. We want to get you up and running!
thanks
--Don
Back to top
View user's profile
Aimé



Joined: 08 Feb 2010
Posts: 7

PostPosted: Mon Feb 08, 2010 5:04 pm    Post subject: Reply with quote

Thanks for the fast reply!

I belong only to the group "users".

The setgid bit is set exactly as you describe.

The debugger is local, exactly as you describe.

Other info:
Code:
  System Version:   Mac OS X 10.5.8 (9L31a)
  Kernel Version:   Darwin 9.8.0


Details:
Code:
~/tests>id
uid=5611(fournier) gid=15(users) groups=15(users)
~/tests>ls -l `which pgdebug`
-rwxrwsr-x  1 root  procmod  8827988 Feb 11  2009 /usr/local/pgi/bin/pgdebug*
~/tests>which pgdebug
/usr/local/pgi/bin/pgdebug
~/tests>df /usr/local/pgi/bin/
Filesystem   512-blocks     Used Available Capacity  Mounted on
/dev/disk0s2  105829464 76330776  28986688    73%    /


I reproduce the problem with this source:
Code:
 PROGRAM test
 IMPLICIT NONE

 PRINT*,"Hello world"
 END PROGRAM test
Back to top
View user's profile
donb



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

PostPosted: Mon Feb 08, 2010 5:40 pm    Post subject: Reply with quote

Aime,
A few more questions:

(1) what version of PGI software are you running?
Code:
   $ pgf90 -V


(2) what is the command line you are using to invoke pgdbg?

(3) is the CANNOT LOAD error the only one that you see? can you copy/paste the output of your debug session and post it?

(4) you are running 64-bit code on a 64-bit operating system, correct?

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
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
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