Newsgroups: comp.parallel.pvm
From: "Dr A.C. Marshall" <adamm>
Subject: Re: PVM clean up for Shared Memory Machines
Organization: The University of Liverpool
Date: Wed, 29 May 1996 16:27:10 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <Ds6DpB.9nL@liverpool.ac.uk>

"Jeffrey C. Becker" <jcb@engr.sgi.com> wrote:
>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

Jeff,

Thanks for your tip. We do not yet have Irix 6.2, however, this code was
developed for use on our SUNMP. I still maintain that the SUNMP implementation
is buggy and I have had to clean up after hung jobs a number of times.

AdAM


>
>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


