Skip to content

Commit

Permalink
globalcfg: process pool * -> [scheduler]process pool
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Nov 12, 2020
1 parent 723e109 commit 19d114d
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 24 deletions.
30 changes: 14 additions & 16 deletions cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,6 @@
Prior to Cylc 8, ``global.cylc`` was named ``global.rc``, but that name
is no longer supported.
''') as SPEC:

# suite
Conf('process pool size', VDR.V_INTEGER, 4, desc='''
Maximum number of concurrent processes used to execute external job
submission, event handlers, and job poll and kill commands - see
:ref:`Managing External Command Execution`.
''')
Conf('process pool timeout', VDR.V_INTERVAL, DurationFloat(600), desc='''
Interval after which long-running commands in the process pool will be
killed - see :ref:`Managing External Command Execution`.
.. note::
The default is set quite high to avoid killing important
processes when the system is under load.
''')

with Conf('scheduler', desc='''
Default values for entries in :cylc:conf:`flow.cylc[scheduler]`
section. This should not be confused with scheduling in the
Expand All @@ -99,6 +83,20 @@
Conf('UTC mode', VDR.V_BOOLEAN, False, desc='''
Default for :cylc:conf:`flow.cylc[scheduler]UTC mode`.
''')
Conf('process pool size', VDR.V_INTEGER, 4, desc='''
Maximum number of concurrent processes used to execute external job
submission, event handlers, and job poll and kill commands - see
:ref:`Managing External Command Execution`.
''')
Conf('process pool timeout', VDR.V_INTERVAL, DurationFloat(600),
desc='''
Interval after which long-running commands in the process pool
will be killed - see :ref:`Managing External Command Execution`.
.. note::
The default is set quite high to avoid killing important
processes when the system is under load.
''')
Conf('run directory rolling archive length', VDR.V_INTEGER, -1,
desc='''
The number of old run directory trees to retain at start-up.
Expand Down
5 changes: 3 additions & 2 deletions cylc/flow/subprocpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ class SubProcPool:
RET_CODE_SUITE_STOPPING = 999

def __init__(self):
self.size = glbl_cfg().get(['process pool size'])
self.proc_pool_timeout = glbl_cfg().get(['process pool timeout'])
self.size = glbl_cfg().get(['scheduler', 'process pool size'])
self.proc_pool_timeout = glbl_cfg().get(
['scheduler', 'process pool timeout'])
self.closed = False # Close queue
self.stopping = False # No more job submit if True
# .stopping may be set by an API command in a different thread
Expand Down
2 changes: 1 addition & 1 deletion etc/bin/run-functional-tests
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Run the Cylc test battery, in <CYLC_REPO_DIR>/tests.
Options and arguments are appended to "prove -j \$NPROC -s -r \${@:-tests/f}".
NPROC is the number of concurrent processes to run, which defaults to the
global config "process pool size" setting.
global config "[scheduler]process pool size" setting.
The tests ignore normal site/user global config and instead use:
~/.cylc/flow/<cylc-version>/global-tests.cylc
Expand Down
4 changes: 3 additions & 1 deletion tests/flakyfunctional/events/44-timeout.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
set_test_number 4

create_test_global_config "
process pool timeout = PT10S" ""
[scheduler]
process pool timeout = PT10S
"

install_suite "${TEST_NAME_BASE}" "${TEST_NAME_BASE}"

Expand Down
3 changes: 2 additions & 1 deletion tests/flakyfunctional/job-submission/18-check-chunking.t
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
set_test_number 3

create_test_global_config '
process pool size = 1
[scheduler]
process pool size = 1
' ''

init_suite "${TEST_NAME_BASE}" <<'__FLOW_CONFIG__'
Expand Down
3 changes: 2 additions & 1 deletion tests/flakyfunctional/job-submission/19-chatty.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export REQUIRE_PLATFORM='batch:at'
set_test_number 15

create_test_global_config "
process pool timeout = PT10S" "
[scheduler]
process pool timeout = PT10S
[platforms]
[[$CYLC_TEST_PLATFORM]]
batch submit command template = talkingnonsense %(job)s
Expand Down
4 changes: 3 additions & 1 deletion tests/functional/events/47-long-output.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ fi
set_test_number 10

create_test_global_config "
process pool timeout = PT10S" ""
[scheduler]
process pool timeout = PT10S
" ""

# Long STDOUT output

Expand Down
3 changes: 2 additions & 1 deletion tests/functional/job-submission/16-timeout.t
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export REQUIRE_PLATFORM='batch:at comms:tcp'
set_test_number 4

create_test_global_config "
process pool timeout = PT10S
[scheduler]
process pool timeout = PT10S
" "
[platforms]
[[$CYLC_TEST_PLATFORM]]
Expand Down

0 comments on commit 19d114d

Please sign in to comment.