pgdbg was working, now fails

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.

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.


#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);


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 –

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 with a
browser,etc. Does domain resolution work–what do you see if you
run “/usr/bin/host”?

Can you ssh to the system from itself?


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 line in /etc/hosts. I’ve now done that and pgdbg works, both in text and gui modes. Thanks for your help.