Newsgroups: comp.parallel.pvm
From: heimes@spva.ph.ic.ac.uk (Frank Heimes)
Subject: Re: Can't start pvmd
Organization: Imperial College of Science, Technology, and Medicine, London, England
Date: Sat, 5 Nov 94 01:52:47 GMT
Message-ID: <1994Nov5.015247.25140@cc.ic.ac.uk>

In article <VS4TBTDI@math.fu-berlin.de>, jnc@pip.fpms.ac.be (Jean-Noel Colin) writes:
> 
> Hi,
> 
> I am trying to setup PVM 3.3.4 on a network of 1 SUN4 and 1 SUNMP (670MP
> 2 Procs).
> 
> Everything compiled OK. But when I run the pvm console ($PVM_ROOT/lib/pvm)
> on either host and try to add the other one, I always get the message 
> can't start pvmd.
> 
> However, when I quit the console, log into the other host and there run
> the console, I get the answer 'pvmd already running', and when I do a 
> 'conf', I can see the local hostname and another one without a valid 
> name (marked with a ?) and with unknown arch.

The cause very likely is some deserted files and sockets - left after pvm
was not properly shut down.

These have to be cleaned up. You can do that manually or use the appended
script (which assumes that rsh works).

Hope that will help you,

Best regards,
              Frank Heimes

-----------------------
#!/bin/csh
#
# Cleans up the mess after pvm or xpvm crashed.
#   (1) calls pvm on all hosts and gives command 'halt'
#   (2) rm all /tmp/pvm*
#   (3) rm all /usr/tmp/pvm*
#   (4) rm all sockets in /usr/tmp
#
# Any comments to: s_heimes@ira.uka.de

#++
# Check if hosts have been listed, complain if not
if ($1 == "") then
  echo 'Usage: killpvm hostname1 hostname2 ...'
  echo '       Give a list of hosts that were involved in the pvm-crash'
  echo '       e.g.: killpvm `cat ../.xpvm_hosts` (if just hostnames in it)'
  exit
endif

#++
# No printing of exit values
unset printexitvalue

#++
# Clean up host by host
echo Hosts to check: $*
while ($1 != "")
  echo Checking $1 .....
  rsh $1 -l $USER '                                                \
    if ($PVM_ROOT/lib/$PVM_ARCH/pvm != `which pvm`) then           \
      echo PVM is not properly installed on $HOST \!               \
    else                                                           \
      echo halt | pvm                                 >& /dev/null \
      if ($status) echo Found deserted PVM files - tiding up ..... \
      find /usr/tmp/* -type s -exec /bin/rm {} \;     >& /dev/null \
      /bin/rm /tmp/pvm*                               >& /dev/null \
      /bin/rm /usr/tmp/pvm*                           >& /dev/null \
    endif                                                          \
  '
  shift
end


