SGE_ROOT=/usr/share/gridengine
# If running under a different cell and using systemd, you will also need to
# copy # /uer/lib/systemd/system/sgemaster.service to /etc/systemd/system/sgemaster.service
# and change the cell name there.
SGE_CELL=default
#Uncomment this if using infiniband to remove the locked memory limit
#RTLIMIT_MEMLOCKED=unlimited

#-- shadow master daemon control variables
# These variables interact in the following way.
#  - The master host updates the heartbeat file every 30 seconds.
#  - The sge_shadowd daemon checks for changes to heartbeat file every
#    number of seconds defined by the SGE_CHECK_INTERVAL variable. So,
#    this value must be greater than 30 seconds.
#  - If the sge_shadowd daemon notices that the heartbeat file has been
#    updated, it starts waiting again until it is once more time to check
#    the heartbeat file.
#  - If the sge_shadowd daemon notices that the heartbeat file has not
#    been updated, it waits for number of seconds defined by the
#    SGE_CHECK_INTERVAL variable to expire. This step lets you make sure
#    that the sge_shadowd daemon is not too aggressive in trying to
#    takeover and allows the master host some leeway in updating the
#    heartbeat file.
#  - When the SGE_GET_ACTIVE_INTERVAL has expired, sge_shadowd daemon
#    takes over if heartbeat file is still not updated.
#  - A reasonable configuration might be to set the SGE_CHECK_INTERVAL
#    to be 45 seconds and the SGE_GET_ACTIVE_INTERVAL to be 90 seconds.
#    So, after about 2 minutes, the take over will occur. If you want to
#    check the operation of the shadow host after you have configured
#    these environment variables you will have to pull out the master
#    host's network cable or kill -9 the master daemon process to simulate
#    a failure because a clean shutdown creates a lock file in
#    $SGE_ROOT/$SGE_CELL/qmaster/lock that prevents shadow daemons taking
#    over.  This can be avoided by deleting the lock file on shudown, e.g
#    by adding the following line to the sgemaster.service systemd unitfile
#   ExecStopPost=/bin/su - sgeadmin -c 'rm -f $SGE_ROOT/$SGE_CELL/qmaster/lock'

# This variable controls the interval in which sge_shadowd pauses if a
# takeover bid fails.  This value is used only when there are multiple
# sge_shadowd instances and they are contending to be the master.
# (the default is 600 seconds.)
#SGE_DELAY_TIME=600

# This variable controls the interval in which the sge_shadowd checks
# the heartbeat file (60 seconds by default.)
#SGE_CHECK_INTERVAL=60

# This variable controls the interval when a sge_shadowd instance tries
# to take over when the heartbeat file has not changed.
#SGE_GET_ACTIVE_INTERVAL=120
