Get SGE master from config file
This commit is contained in:
parent
8eb7a52aef
commit
1d1bf88bd6
|
@ -291,17 +291,11 @@ Try to clean temp files, downloaded packages,…".
|
||||||
# }}}
|
# }}}
|
||||||
main() { # {{{
|
main() { # {{{
|
||||||
|
|
||||||
## If SGE is not yet available on this host {{{
|
|
||||||
### Exit
|
|
||||||
is_sge_host \
|
|
||||||
|| exit 0
|
|
||||||
## }}}
|
|
||||||
|
|
||||||
## Test if SGE Master is reachable {{{
|
## Test if SGE Master is reachable {{{
|
||||||
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
||||||
if [ -z "${sge_master_uri}" ]; then
|
if [ -z "${sge_master_uri}" ]; then
|
||||||
## Use local host for sge_master_uri
|
## Get SGE master from current configuration
|
||||||
sge_master_uri="physix-master.ipr.univ-rennes1.fr"
|
sge_master_uri=$(grep --max-count=1 -- "" /var/lib/gridengine/default/common/act_qmaster 2>/dev/null || echo "NO MASTER")
|
||||||
fi
|
fi
|
||||||
### }}}
|
### }}}
|
||||||
### If sge_master_port wasn't defined (environment variable,…) {{{
|
### If sge_master_port wasn't defined (environment variable,…) {{{
|
||||||
|
@ -318,6 +312,12 @@ main() { # {{{
|
||||||
### }}}
|
### }}}
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
|
## If SGE is not yet available on this host {{{
|
||||||
|
### Exit
|
||||||
|
is_sge_host \
|
||||||
|
|| exit 0
|
||||||
|
## }}}
|
||||||
|
|
||||||
manage_args "${ARGS}"
|
manage_args "${ARGS}"
|
||||||
|
|
||||||
## Define vars
|
## Define vars
|
||||||
|
|
|
@ -227,17 +227,11 @@ SGE slots currently in use: ${RED}${sge_slots_used:=/dev/null}${COLOR_DEBUG}."
|
||||||
# }}}
|
# }}}
|
||||||
main() { # {{{
|
main() { # {{{
|
||||||
|
|
||||||
## If SGE is not yet available on this host {{{
|
|
||||||
### Exit
|
|
||||||
is_sge_host \
|
|
||||||
|| exit 0
|
|
||||||
## }}}
|
|
||||||
|
|
||||||
## Test if SGE Master is reachable {{{
|
## Test if SGE Master is reachable {{{
|
||||||
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
||||||
if [ -z "${sge_master_uri}" ]; then
|
if [ -z "${sge_master_uri}" ]; then
|
||||||
## Use local host for sge_master_uri
|
## Get SGE master from current configuration
|
||||||
sge_master_uri="physix-master.ipr.univ-rennes1.fr"
|
sge_master_uri=$(grep --max-count=1 -- "" /var/lib/gridengine/default/common/act_qmaster 2>/dev/null || echo "NO MASTER")
|
||||||
fi
|
fi
|
||||||
### }}}
|
### }}}
|
||||||
### If sge_master_port wasn't defined (environment variable,…) {{{
|
### If sge_master_port wasn't defined (environment variable,…) {{{
|
||||||
|
@ -254,6 +248,12 @@ main() { # {{{
|
||||||
### }}}
|
### }}}
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
|
## If SGE is not yet available on this host {{{
|
||||||
|
### Exit
|
||||||
|
is_sge_host \
|
||||||
|
|| exit 0
|
||||||
|
## }}}
|
||||||
|
|
||||||
## Define all vars
|
## Define all vars
|
||||||
define_vars
|
define_vars
|
||||||
|
|
||||||
|
|
|
@ -288,17 +288,11 @@ Try to clean temp files,…"
|
||||||
# }}}
|
# }}}
|
||||||
main() { # {{{
|
main() { # {{{
|
||||||
|
|
||||||
## If SGE is not yet available on this host {{{
|
|
||||||
### Exit
|
|
||||||
is_sge_host \
|
|
||||||
|| exit 0
|
|
||||||
## }}}
|
|
||||||
|
|
||||||
## Test if SGE Master is reachable {{{
|
## Test if SGE Master is reachable {{{
|
||||||
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
||||||
if [ -z "${sge_master_uri}" ]; then
|
if [ -z "${sge_master_uri}" ]; then
|
||||||
## Use local host for sge_master_uri
|
## Get SGE master from current configuration
|
||||||
sge_master_uri="physix-master.ipr.univ-rennes1.fr"
|
sge_master_uri=$(grep --max-count=1 -- "" /var/lib/gridengine/default/common/act_qmaster 2>/dev/null || echo "NO MASTER")
|
||||||
fi
|
fi
|
||||||
### }}}
|
### }}}
|
||||||
### If sge_master_port wasn't defined (environment variable,…) {{{
|
### If sge_master_port wasn't defined (environment variable,…) {{{
|
||||||
|
@ -315,6 +309,12 @@ main() { # {{{
|
||||||
### }}}
|
### }}}
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
|
## If SGE is not yet available on this host {{{
|
||||||
|
### Exit
|
||||||
|
is_sge_host \
|
||||||
|
|| exit 0
|
||||||
|
## }}}
|
||||||
|
|
||||||
manage_args "${ARGS}"
|
manage_args "${ARGS}"
|
||||||
|
|
||||||
sge_hostname="$(hostname -f)"
|
sge_hostname="$(hostname -f)"
|
||||||
|
|
|
@ -295,8 +295,8 @@ main() { # {{{
|
||||||
## Test if SGE Master is reachable {{{
|
## Test if SGE Master is reachable {{{
|
||||||
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
||||||
if [ -z "${sge_master_uri}" ]; then
|
if [ -z "${sge_master_uri}" ]; then
|
||||||
## Use local host for sge_master_uri
|
## Get SGE master from current configuration
|
||||||
sge_master_uri="physix-master.ipr.univ-rennes1.fr"
|
sge_master_uri=$(grep --max-count=1 -- "" /var/lib/gridengine/default/common/act_qmaster 2>/dev/null || echo "NO MASTER")
|
||||||
fi
|
fi
|
||||||
### }}}
|
### }}}
|
||||||
### If sge_master_port wasn't defined (environment variable,…) {{{
|
### If sge_master_port wasn't defined (environment variable,…) {{{
|
||||||
|
|
|
@ -66,20 +66,6 @@ define_vars() { # {{{
|
||||||
fi
|
fi
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
## If sge_master_uri wasn't defined (environment variable,…) {{{
|
|
||||||
if [ -z "${sge_master_uri}" ]; then
|
|
||||||
## Use local host for sge_master_uri
|
|
||||||
sge_master_uri="physix-master.ipr.univ-rennes1.fr"
|
|
||||||
fi
|
|
||||||
## }}}
|
|
||||||
|
|
||||||
## If sge_master_port wasn't defined (environment variable,…) {{{
|
|
||||||
if [ -z "${sge_master_port}" ]; then
|
|
||||||
## Use local host for sge_master_port
|
|
||||||
sge_master_port="6444"
|
|
||||||
fi
|
|
||||||
## }}}
|
|
||||||
|
|
||||||
## If the given host to manage is the current one {{{
|
## If the given host to manage is the current one {{{
|
||||||
if is_current_host "${sge_hostname}" ; then
|
if is_current_host "${sge_hostname}" ; then
|
||||||
debug_message "define_vars − \
|
debug_message "define_vars − \
|
||||||
|
@ -262,15 +248,30 @@ Try to disable SGE queue: ${RED}${local_sge_queue_name:=/dev/null}@${local_sge_h
|
||||||
# }}}
|
# }}}
|
||||||
main() { # {{{
|
main() { # {{{
|
||||||
|
|
||||||
## Define all vars according the selected options
|
## Test if SGE Master is reachable {{{
|
||||||
define_vars
|
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
||||||
|
if [ -z "${sge_master_uri}" ]; then
|
||||||
|
## Get SGE master from current configuration
|
||||||
|
sge_master_uri=$(grep --max-count=1 -- "" /var/lib/gridengine/default/common/act_qmaster 2>/dev/null || echo "NO MASTER")
|
||||||
|
fi
|
||||||
|
### }}}
|
||||||
|
### If sge_master_port wasn't defined (environment variable,…) {{{
|
||||||
|
if [ -z "${sge_master_port}" ]; then
|
||||||
|
## Use local host for sge_master_port
|
||||||
|
sge_master_port="6444"
|
||||||
|
fi
|
||||||
|
### }}}
|
||||||
|
|
||||||
## If SGE Master is not reachable from this host {{{
|
### If SGE Master is not reachable from this host {{{
|
||||||
### Exit
|
#### Exit
|
||||||
is_sge_master_available \
|
is_sge_master_available \
|
||||||
|| exit 0
|
|| exit 0
|
||||||
|
### }}}
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
|
## Define all vars according the selected options
|
||||||
|
define_vars
|
||||||
|
|
||||||
## Simple debug message with color to valid current variables
|
## Simple debug message with color to valid current variables
|
||||||
debug_message "main − Try to manage \
|
debug_message "main − Try to manage \
|
||||||
SGE queue(s): ${RED}${sge_queues_name_print:=/dev/null}${COLOR_DEBUG}\
|
SGE queue(s): ${RED}${sge_queues_name_print:=/dev/null}${COLOR_DEBUG}\
|
||||||
|
|
|
@ -521,17 +521,11 @@ Previously disabled by a script (or FORCE is enable), try to enable SGE queue: $
|
||||||
# }}}
|
# }}}
|
||||||
main() { # {{{
|
main() { # {{{
|
||||||
|
|
||||||
## If SGE is not yet available on this host {{{
|
|
||||||
### Exit
|
|
||||||
is_sge_host \
|
|
||||||
|| exit 0
|
|
||||||
## }}}
|
|
||||||
|
|
||||||
## Test if SGE Master is reachable {{{
|
## Test if SGE Master is reachable {{{
|
||||||
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
### If sge_master_uri wasn't defined (environment variable,…) {{{
|
||||||
if [ -z "${sge_master_uri}" ]; then
|
if [ -z "${sge_master_uri}" ]; then
|
||||||
## Use local host for sge_master_uri
|
## Get SGE master from current configuration
|
||||||
sge_master_uri="physix-master.ipr.univ-rennes1.fr"
|
sge_master_uri=$(grep --max-count=1 -- "" /var/lib/gridengine/default/common/act_qmaster 2>/dev/null || echo "NO MASTER")
|
||||||
fi
|
fi
|
||||||
### }}}
|
### }}}
|
||||||
### If sge_master_port wasn't defined (environment variable,…) {{{
|
### If sge_master_port wasn't defined (environment variable,…) {{{
|
||||||
|
@ -548,6 +542,12 @@ main() { # {{{
|
||||||
### }}}
|
### }}}
|
||||||
## }}}
|
## }}}
|
||||||
|
|
||||||
|
## If SGE is not yet available on this host {{{
|
||||||
|
### Exit
|
||||||
|
is_sge_host \
|
||||||
|
|| exit 0
|
||||||
|
## }}}
|
||||||
|
|
||||||
## Define all vars according the selected options
|
## Define all vars according the selected options
|
||||||
define_vars
|
define_vars
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue