|
|
Submitting binaries in Grid Engine 6Grid Engine 6 supports the direct submission of binaries via qsub and qrsh via the new argument -b y|n. The default behavior assumes -b n, use -b y to directly invoke a binary executable.
Submitting binaries in Grid Engine 5.x
The command qsub(1) cannot be used to directly submit binary files as jobs. Although one could write a small wrapper script around binaries to submit them, there are two convenient techniques to submit binaries as jobs very simply without involving a separate script.
Both techniques above take advantage of the fact that qsub uses the STDIN stream as a job script if you don't specify a script file as an argument. For seamlessly integrating certain applications in your environment with a Grid Engine cluster, it might be necessary to write a custom wrapper script which does some setup work before running a job. The second technique from above can be embedded into such wrapper scripts. Example: create wrapper for submitting a binary batch job from a SunRay to a back-end farm. To do this, it is necessary to modify the LD_PRELOAD variable to remove SunRay-specific entry.#!/bin/ksh
# analyze.sh: run the analyze binary from a SunRay on a back-end cluster
# be sure to maintain all environment settings from the caller's shell
# except LD_PRELOAD, which must be modified to remove SunRay-specific entry.
# Usage: analyze.sh <other options>
extract_libc_ut () {
# modify library path to remove reference to libc_ut.so
# leave other entries in LD_PRELOAD untouched
LIST=$1
# first decompose list of libraries
i=0
while [ -n $LIST ]; do
var[i]=${LIST%% *}
LIST=${LIST#* }
if [ "$LIST" = ${var[i]} ]
then break
fi
let i=i+1
done
unset LIST
# now recompose list, without libc_ut.so
for lib in ${var[*]}; do
if [ $lib != libc_ut.so ]
then LIST="$LIST $lib"
fi
done
echo $LIST
}
# Begin main
if [ X$LD_PRELOAD != X ]; then
LD_PRELOAD="`extract_libc_ut $LD_PRELOAD`"
fi
ARGS="$*"
# submit binary
qsub -V << END
/export/share/bin/analyze $ARGS
ENDA generic binary submit wrapper script "qbsub" can be found at this link. It can be used as a "binary version" of qsub. The wrapper script allows the submitter to use the standard submission flags, and it also accounts for the flags specified in the qtask file (which is used by qtcsh when transparently submitting binaries to the system). An example of usage of this script is: qbsub -v DISPLAY netscape http://gridengine.sunsource.net This runs the netscape binary while explicitly maintaining the DISPLAY environment variable. NOTE: you of course need to ensure that the binary matches the architecture on which it will eventually run. You could specify this, for example, by doing: qbsub -l arch=glinux mylinuxbinary
|
|
![]() |
By any use of this Website, you agree to be bound by these Policies and Terms of Use. |