[rescue] Distributed Folding - the Geeks team

Sheldon T. Hall shel at cmhcsys.com
Sat Dec 20 18:07:58 CST 2003


 Magnus Hedemark says ...

> There is the OpenMOSIX cluster at $WORK ... the only way I'd be
> able to do
> that is if there were a command line option to do only so many "work
> units" (or whatever their lingo is) or have an option to run for a set
> period of time and then quit.  Lots of idle cycles after hours
> but I can't
> have something like this running during regular hours.

It will run in "quiet" mode, i.e. no output, it's easy to start, and
deleting a lock file makes it shut down gracefully.  I expect a cron job
would do just fine; crank it up after business hours, shut it down before
the CEO logs in in the morning....

The script I'm using to start and stop three instances is ...

#! /sbin/sh

# Distributed Folding Research Project control
# "$Revision: 1.0 $"

#if /etc/chkconfig distribfold; then :
#else
#        exit
#fi

if /etc/chkconfig verbose; then
        ECHO=echo
else
        ECHO=:
fi

case $1 in
'start')
        $ECHO "Starting Distributed Folding: \c"
        sleep 1
        ( cd /usr/local/bin/distribfold1 ; ./foldit > /dev/null & ) && $ECHO
"One \c"
        sleep 1
        ( cd /usr/local/bin/distribfold2 ; ./foldit > /dev/null & ) && $ECHO
"Two \c"
        sleep 1
        ( cd /usr/local/bin/distribfold3 ; ./foldit > /dev/null & ) && $ECHO
"Three \c"
        # Anything else you might think of goes here...
        $ECHO "."
        ;;
'stop')
        $ECHO "Stopping Distributed Folding: \c"
        ( cd /usr/local/bin/distribfold1 ; rm -f *.lock ; $ECHO "One \c" )
        ( cd /usr/local/bin/distribfold2 ; rm -f *.lock ; $ECHO "Two \c" )
        ( cd /usr/local/bin/distribfold3 ; rm -f *.lock ; $ECHO "Three \c" )
        $ECHO "."
        ;;
*)
        echo "usage: $0 {start|stop}"
        ;;
esac

# END

The chkconfig stuff is IRIX-specific, AFAIK, and you'll want to change the
paths, etc.  I run three instances because it's a 4 processor machine, and
the client isn't SMP-aware.

Suggestions for improving the script always accepted, of course!

-Shel



More information about the rescue mailing list