File: InLimit.rst

package info (click to toggle)
ecflow 5.15.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,868 kB
  • sloc: cpp: 269,341; python: 22,756; sh: 3,609; perl: 770; xml: 333; f90: 204; ansic: 141; makefile: 70
file content (76 lines) | stat: -rw-r--r-- 2,271 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
ecflow.InLimit
//////////////


.. py:class:: InLimit
   :module: ecflow

   Bases: :py:class:`~Boost.Python.instance`

:term:`inlimit` is used in conjunction with :term:`limit` to provide simple load management:

.. code-block:: shell

   suite x
      limit fast 1
      family f
         inlimit /x:fast
         task t1
         task t2

Here 'fast' is the name of :py:class:`ecflow.Limit` and the number defines the maximum number of tasks
that can run simultaneously using this limit. That is why you do not need a :term:`trigger`
between tasks 't1' and 't2'. There is no need to change the tasks. The jobs are
created in the order they are defined

Constructor::

   InLimit(name, optional<path = ''>, optional<token = 1>, optional<limit_this_node_only = false>)
      string name           : The name of the referenced Limit
      string path<optional> : The path to the Limit, if this is left out, then Limit of 'name' must be specified
                              some where up the parent hierarchy
      int value<optional>   : The usage of the Limit. Each job submission will consume 'value' tokens
                              from the Limit. defaults to 1 if no value specified.
      bool limit_this_node_only<optional> : Only limits this node and *NOT* its children
                                            Can be used load balance families

Usage:

.. code-block:: python

   inlimit = InLimit('fast','/x/f', 2)
    ...
   family = Family('f1',
                   InLimit('mars','/x/f', 2)) # create InLimit in Node constructor
   family.add_inlimit(inlimit)                # add existing inlimit using function


.. py:method:: InLimit.limit_submission( (InLimit)arg1) -> bool :
   :module: ecflow

Limit submission only


.. py:method:: InLimit.limit_this_node_only( (InLimit)arg1) -> bool :
   :module: ecflow

Only this node is limited. i.e. typically Family or Suite


.. py:method:: InLimit.name( (InLimit)arg1) -> str :
   :module: ecflow

Return the :term:`inlimit` name as string


.. py:method:: InLimit.path_to_node( (InLimit)arg1) -> str :
   :module: ecflow

Path to the node that holds the limit, can be empty


.. py:method:: InLimit.tokens( (InLimit)arg1) -> int :
   :module: ecflow

The number of token to consume from the Limit