Newsgroups: comp.parallel.pvm
From: "Jeffrey C. Becker" <jcb@engr.sgi.com>
Subject: Re: PVM clean up for Shared Memory Machines
Organization: Silicon Graphics Inc., Mountain View, CA
Date: Tue, 28 May 1996 14:28:25 -0700
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <31AB6FF9.41C6@engr.sgi.com>

The script below is not necessary for SGI PVM 1.1 (released for IRIX
6.2) since Sys V shared memory code has been ripped out and replaced
with a new implementation based on IRIX shared memory.

Jeff

Dr A.C. Marshall wrote:
> 
> The following program is a modification of something (written by Jack Perry,
> SGI, Hudson, MA, for the SGI PCXL) that I grabbed from this newsgroup. It will
> use the ipcrm to mop up after PVM has been running on a Shared Memory
> Multiprocessor.
> 
> #!/bin/sh
> #
> # AC Marshall 18 Apr 1996 (modified from comp.parallel.pvm)
> # Original script Jack Perry, SGI, Hudson, MA, developed for the
> # Power Challenge.
> #
> # This script should be used on a shared memory system
> # after a PVM job crashes. It uses ipcs and ipcrm to remove the shared
> # memory  memory identifiers and semaphores.
> #
> 
> # find out who I am
> MY_USER_NAME=`whoami`
> UID=`ypcat passwd | grep $MY_USER_NAME | awk '{FS=":";print $3}'`
> 
> # kill the daemon if it's still running
> /usr/bin/kill `ps -u $UID | grep pvmd3 | sed 's/ *\([0-9]*\).*/\1/'`
> 
> # get rid of the temp file that indicates the daemon is there
> /usr/bin/rm /tmp/pvmd.$UID
> 
> # get rid of any system V semaphores and shared memory that were left
> ipcs | grep $MY_USER_NAME | sed 's/\(.\) *\([0-9]*\).*/ipcrm -\1 \2/' | sh -v
> 
> Adam Marshall

-- 
Jeffrey C. Becker       Silicon Graphics, Inc.         "Too many pieces
of 
jcb@engr.sgi.com       	M/S 802				music finish too long
Tel: 415-933-3978  	2011 N. Shoreline Blvd.		after the end."
FAX: 415-933-3542  	Mountain View, CA 94043-1389    - Igor Stravinsky

