Newsgroups: comp.parallel.pvm
From: john@tone.jpl.nasa.gov (John Wright)
Subject: Re: Duplicate host error.
Organization: Digital Image Animation Lab, Jet Propulsion Laboratory
Date: 14 Oct 1996 08:22:27 -0700
Message-ID: <53tlrj$173@tone.jpl.nasa.gov>

In article <325E6BBE.8FE@mecheng.strath.ac.uk> Dr Tugrul Comlekci <tc@mecheng.strath.ac.uk> writes:
>Dr Tugrul Comlekci wrote:
>> 
>> Help: we have a problem setting up a virtual machine on our network, has
>> anyone experienced a similar problem and what are the likely causes and
>> solutions?
>> 
>> We are running PVM Version 3.3.9 on a network of 30 Silicon Graphics
>> Indy workstations running IRIX 5.3. Sometimes we receive an error while
>> adding hosts to the virtual machine: Duplicate host:
>> 
>... deleted.
>
>I have found the solution to this error on:
>
>http://www.netlib.org/pvm3/faq_html/faq.html
>
>which requires pvm socket address file : pvmd.uid to be removed from the
>/tmp directory for all workstations giving this error.
>
>Is there a simple way to delete this file from the local disks of many
>workstations?
>
>Thanks.
>
>Tugrul Comlekci
> 
>University of Strathclyde
>Mechanical Engineering Department
>Glasgow, U.K.

Use the killpvm script which is attached as follows:

killpvm `grep = $PVM_ROOT/hostfile | grep "^[A-Za-z0-9]"`

This will cleanup all the hosts in your hostfile.  Otherwise, just
list the hosts you want cleaned up on the command line.

John


#!/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 $TMPDIR/pvm*
#   (4) rm all sockets in $TMPDIR
#
# Any comments to: heimes@@spva.ph.ic.ac.uk
 
#++
# 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 - tidying up .... \
      if ($?TMPDIR) then                                           \
      find $TMPDIR/* -type s -exec /bin/rm {} \;     >& /dev/null  \
      endif                                                        \
      /bin/rm /tmp/pvm*                              >& /dev/null  \
      if ($?TMPDIR) then                                           \
      /bin/rm $TMPDIR/pvm*                           >& /dev/null  \
      endif                                                        \
    endif                                                          \
  '
  shift
end


-- 
john.r.wright@jpl.nasa.gov
http://www-dial.jpl.nasa.gov/~john

