Am 28.10.2013 um 17:41 schrieb Joseph Farran:
> Thanks Reuti as always.
>
> If you have a *default* starter_method script please post it as it will help
> many since it's
> tricky to get everything right for those of us who don't know GE inside-out.
I came up with this:
#!/bin/sh
case "$SGE_STARTER_SHELL_START_MODE" in
unix_behavior)
exec "$@" ;;
#
# Although posix_compliant and script_from_stdin are the same, the behavior is
different:
# posix_compliant => $1 is the name of the script
# script_from_stdin => $1 is -s (option to the shell to read from stdin)
#
posix_compliant | script_from_stdin)
if [ "$SGE_STARTER_USE_LOGIN_SHELL" = "true" ]; then
exec -l -a "${SGE_STARTER_SHELL_PATH##*/}"
"$SGE_STARTER_SHELL_PATH" "${@}"
else
exec -a "${SGE_STARTER_SHELL_PATH##*/}" "$SGE_STARTER_SHELL_PATH"
"${@}"
fi ;;
esac
-- Reuti
> Best,
> Joseph
>
> On 10/28/2013 12:12 AM, Reuti wrote:
>> Hi,
>>
>> Am 28.10.2013 um 01:21 schrieb Joseph Farran:
>>
>> We have setup BLCR ( Berkeley Lab Checkpoint/Restart ) on our cluster with
>>> Grid Engine ckpt scripts to process the checkpoints and restart methods.
>>>
>>> In an effort to make things as easy as possible for our user base, I am
>>> using
>>> Grid Engine "starter_method" to run our blcr_submit script which in turns
>>> runs BLCR cr_run. All is working well but I have a question with regards
>>> to the starter_method script which looks something like this for our queue:
>>>
>>> $ qconf -sq free64 | grep starter_method
>>> starter_method /data/hpc/sge/starter-method.sh
>>>
>>> $ cat /data/hpc/sge/starter-method.sh
>>> #!/bin/sh
>>> if [ "$SGE_CKPT_ENV" = blcr ]
>>> then
>>> <our BLCR scripts>
>>> else
>>> exec $SGE_STARTER_SHELL_PATH "$@"
>>> fi
>>>
>>> My question is with what is the *default* starter method, the else part?
>>> With respect to the else section, Is this correct?
>>>
>>> exec $SGE_STARTER_SHELL_PATH "$@"
>> To mimic the default behavior, it's also necessary to check
>> SGE_STARTER_SHELL_START_MODE and SGE_STARTER_USE_LOGIN_SHELL.
>>
>> In case it's relevant - as I always use
>> SGE_STARTER_SHELL_START_MODE=unix_behavior, I just call:
>>
>> exec "$@"
>>
>> If you have different settings for the queues, it's necessary to check for
>> SGE_STARTER_SHELL_START_MODE=posix_compliant and call the configured shell
>> or just the script/binary like you mentioned above resp. a proper case for
>> "script_from_stdin".
>>
>> -- Reuti
>>
>>
>
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users