[GE users] Named floating resources
isaac at wagnerfam.com
Wed Mar 18 16:20:22 GMT 2009
[ The following text is in the "iso-8859-1" character set. ]
[ Your display is set for the "ISO-8859-10" character set. ]
[ Some special characters may be displayed incorrectly. ]
Thanks. That sounds like it will work. I appreciate the script.
On Wed, Mar 18, 2009 at 11:06 AM, dangruhn <Dan.Gruhn at groupw.com<mailto:Dan.Gruhn at groupw.com>> wrote:
Perhaps someone else has a better idea, but IMHO you will need to use
Grid Engine to schedule jobs based on the router resources you have
available AND write a script or program that each job will need to run
to actually allocate the particular routers. Something like the
following should work. Note that the router list file needs to be in
some globally accessible location so that each node will be able to
update it. Also, this is a bash script:
# File that is our router "database"
routerFile=/<NFS available directory tree>/router.list
# Cleanup our lock file, if any
rm -f $routerFile.lock
# Decode the comamnd line parameters
while [ $# -gt 0 ]
case $1 in
echo "Unknown parameter $1" 1>&2
# Attempt to lock the router list file
until ln $routerFile $routerFile.lock >/dev/null 2>&1
lockDelay=`expr $lockDelay + $lockSleepTime`
# If we've waited 1 minutes
if [ $lockDelay -gt $lockMaxDelay ]
echo "Abandoning attemps to get lock file $routerFile and
continuing with operation" 1>&2
trap cleanup INT HUP QUIT TERM
for router in `cat $routerFile`
case $router in
# For each router we should release
for releaseRouter in $desiredReleaseRouters
# If we should release this router
if [ $releaseRouter.inUse = $router ]
# Remove ".inUse" from router listing
# If we have gotten all the routers we need
if [ $numRouters -ge $desiredNumRouters ]
numRouters=`expr $numRouters + 1`
# If we don't have our routers
if [ $numRouters -lt $desiredNumRouters ]
echo "Error: only able to allocate $numRouters routers" 1>&2
# Update the router list file
for router in $newRouterList
# Remove the lock file
# If we needed to get some routers
if [ $desiredNumRouters -gt 0 ]
# Output our routers
> How do I add these resources to SGE? I can't run the SGE daemons on
> them because they are routers. So, they can't be compute nodes. Once
> added to SGE how do I request them?
> On Wed, Mar 18, 2009 at 6:05 AM, olesen
> <Mark.Olesen at emcontechnologies.com<mailto:Mark.Olesen at emcontechnologies.com>
> <mailto:Mark.Olesen at emcontechnologies.com<mailto:Mark.Olesen at emcontechnologies.com>>> wrote:
> > router_a
> > router_b
> > ...
> > router_z
> > I want to make the generic request to give me say 2 of those
> > I need to know which two were allocated to me by name. Make sense?
> > Does anyone know if SGE can be configured in such a way?
> It looks to me like you actually have a parallel job (ie, multiple
> slots/machines at once) even if you aren't actually using mpirun or
> equivalent to run things.
> If you setup and use a parallel environment, you can always get at the
> exact machine names from the $PE_HOSTFILE contents - see qsub(1). You
> might find the script under $SGE_ROOT/mpi/startmpi.sh provides a good
> hint for extracting the names.
> This e-mail message and any attachments may contain
> legally privileged, confidential or proprietary Information,
> or information otherwise protected by law of EMCON
> Technologies, its affiliates, or third parties. This notice
> serves as marking of its "Confidential" status as defined
> in any confidentiality agreements concerning the sender
> and recipient. If you are not the intended recipient(s),
> or the employee or agent responsible for delivery of this
> message to the intended recipient(s), you are hereby
> notified that any dissemination, distribution or copying
> of this e-mail message is strictly prohibited.
> If you have received this message in error, please
> immediately notify the sender and delete this e-mail
> message from your computer.
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe at gridengine.sunsource.net<mailto:users-unsubscribe at gridengine.sunsource.net>
> <mailto:users-unsubscribe at gridengine.sunsource.net<mailto:users-unsubscribe at gridengine.sunsource.net>>].
Group W Inc.
8315 Lee Hwy, Suite 303
Fairfax, VA, 22031
PH: (703) 752-5831
FX: (703) 752-5851
To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net<mailto:users-unsubscribe at gridengine.sunsource.net>].
More information about the gridengine-users