PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

pgdbg was working, now fails

 
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: Sun Feb 12, 2006 5:47 pm    Post subject: pgdbg was working, now fails Reply with quote

While I've not used my pgdbg for awhile, it had previously been working but
today I got errors trying to use pgdbg in both GUI and text mode. I can think
of nothing significant I've altered OS-wise, just periodic updates to
RHEL3 running on an AMD Athlon MP. I did have to get a new PGI key at the
beginning of this month due to installation of new NIC card, but pgf90
works. No other problems with system. The messages I get from command
"pgdbg -text a.out" are
PGDBG 6.0-2 x86 (Workstation, 4 CPU)
***Reading DWARFv2 Information.
- gethostbyname: server init: No such file or directory
pgserv 5128: init fails
pgserv 5128: ... exiting now
- accept: client init: Bad file descriptor
ERROR: CANNOT LOAD /home/glendeni/FOR/a.out.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 5952
Location: The Portland Group Inc.

PostPosted: Mon Feb 13, 2006 4:12 pm    Post subject: Reply with quote

Hi glendening,

We think it might be a problem with your system configuration, but aren't sure. Can you try compiling and running the following test program? We want to make sure that "gethostbyname" is working properly on your system.

Thanks,
Mat

Code:
#include <stdio.h>
#include <unistd.h>
#include <netdb.h>
extern int h_errno;

int main () {
  char hostname[256];
  struct hostent *ip;

  gethostname(hostname, 255);
  ip = gethostbyname(hostname);
  if (ip) {
    printf("Host %s\n", ip->h_name);
  } else {
    printf("ERROR: %d\n", h_errno);
  }
  exit(0);
}
Back to top
View user's profile
glendening



Joined: 21 Dec 2004
Posts: 9

PostPosted: Mon Feb 13, 2006 6:34 pm    Post subject: Reply with quote

Mat,

I do not have a PGI C compiler on my machine, just PGI fortran. I've not really used C myself, but assume I need to compile using gcc and then execute the a.out created. Doing that gave "ERROR: 1".

Jack
Back to top
View user's profile
jrm



Joined: 30 Jun 2004
Posts: 34
Location: PGI

PostPosted: Wed Feb 15, 2006 6:03 pm    Post subject: Reply with quote

Jack --

The fact that things were presumably working before the NIC card was
changed leads me to wonder about the network configuration on that
computer. So can you tell us a little about it? Like, is it networked,
can you get to other systems on your site, get to Google.com with a
browser,etc. Does domain resolution work--what do you see if you
run "/usr/bin/host google.com"?

Can you ssh to the system from itself?

John
Back to top
View user's profile
glendening



Joined: 21 Dec 2004
Posts: 9

PostPosted: Thu Feb 16, 2006 9:41 pm    Post subject: Reply with quote

Your test script pointing to a problem with the gethostbyname utility did lead me to a solution. When adding the NIC card (changing from dialup to cable access) I also altered the HOSTNAME in RHEL3 /etc/sysconfig/network from the default localhost.localdomain. I had encountered no apparent problems from that (done 2 weeks ago), but now further reading indicates that I should also have correspondlingly altered the 127.0.0.1 line in /etc/hosts. I've now done that and pgdbg works, both in text and gui modes. Thanks for your help.
Jack
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