]> SALOME platform Git repositories - modules/yacs.git/blob - doc/execution.rst
Salome HOME
mergefrom branch BR_V511_PR tag mergeto_trunk_03feb09
[modules/yacs.git] / doc / execution.rst
1
2
3 .. _execution:
4
5 Execution of a schema
6 =====================
7
8
9
10 In the frames of one YACS GUI session YACS module allows the user to operate with several study documents (one per desktop). Each study may contain some schemas, but only one YACS engine instance exists per study.
11
12 .. _execute_schema:
13
14 Execute a schema
15 ----------------
16 The user can execute a schema in different modes. Each of these modes can be chosen from :ref:`execute` of the YACS GUI in schema run mode. They are
17
18
19
20
21 + **Without stop Mode** - execute a schema in a normal way,
22
23 .. _breakpoints_mode:
24
25 + **Breakpoints Mode** - execution of a schema is paused on each breakpoint,
26
27
28 + **Step by step Mode** - execute a schema step-by-step (i.e. node by node).
29
30
31
32
33
34 It's worth mentioning that for breakpoints mode it is suitable to use nodes' check boxes in the schema Tree View for run mode in order to set a breakpoint on the certain node.
35
36 **Stop on error** option from :ref:`execute` finishes execution of a schema if any error occurs. It's useful if a schema has some parallel chains of nodes which can be executed simultaneously, and the user wants to break execution process of the whole schema if only one of chains raise an error.
37
38 .. _start_resume:
39
40 In order to start/resume execution of a schema it is needed to choose **Start/Resume** item from :ref:`execute` or click corresponding button on :ref:`execution_toolbar`. **Resume** command resumes schemas' execution, if it was paused earlier.
41
42 .. _pause_abort_reset:
43
44 The user can pause execution of a schema with help of **Pause** item from :ref:`execute` or corresponding button on :ref:`execution_toolbar`. By analogy to **Pause** operation **Abort** and **Reset** commands can be activated either from Execute menu or Execution toolbar. **Abort** command kills execution of a schema, and
45 **Reset** command resets nodes statuses and ports values to the initial ones as its were before the execution process.
46
47 In the frames of YACS GUI a preliminary step of checking schemas' validity before create a schema run is implemented. The user is informed by the system about all problems detected by this operation.
48
49
50
51 .. image:: images/functionality_list_79.jpg
52   :align: center
53
54
55 .. centered::
56   **An example result of checking schemas' validity before create a schema run**
57
58
59 If a preliminary check is successfully done, schema run is created and then the user can start its execution in the chosen mode. Schema run is exported to an XML file and passed to YACS CORBA engine and executed there. YACS CORBA engine is also given a study ID.
60
61 For visual representation of execution state the following means are provided by YACS module.
62
63
64
65
66 + **State of a node** - each state has its own color code at any moment of the execution. During the execution the background color of the nodes' status bar is changed according to its execution status. In the YACS module for SALOME 4.1 this color code is predefined. Color codes from existing Supervisor GUI are reused where possible. But in the further versions of YACS module the user will have
67   the possibility to specify it in the user preferences (see :ref:`set_user_preferences` section).
68
69
70 + **Values of ports** are shown during the execution process either on ports inside nodes' presentation or on nodes' property page in run mode.
71
72
73 + For each node, a **progress indicator** is shown that informs the user about the time spent on execution of the node and approximate execution percentage of the job. This information is shown on both presentation of a node and its property page in run mode too.
74
75
76
77
78
79 More than that, schema Tree View in run mode shows information about the current execution state of the whole schema and the current execution state of each node.
80
81
82
83 .. image:: images/functionality_list_80.jpg
84   :align: center
85   :width: 46ex
86
87 .. centered::
88   **The state of run Tree View during schemas' execution**
89
90
91 The selection of object in the run Tree View activates Input Panel with schema or node property page depending on the type of selected object.
92
93
94
95 .. image:: images/functionality_list_81.jpg
96   :align: center
97   :width: 43ex
98
99
100 .. centered::
101   **Schema property page in run mode**
102
103
104
105
106 .. image:: images/functionality_list_82.jpg
107   :align: center
108   :width: 53ex
109
110
111 .. centered::
112   **Inline node property page in run mode**
113
114
115 The user can get a detailed information about errors (if any) occured during the execution process from "Error Log" list view on the schema run property page.
116
117 .. _save_restore_execution_state:
118
119 Save/Restore execution state
120 ----------------------------
121 If the current study contains an executable schema and the schema is in paused or stopped state, the user can save the current execution state of the schema for its further usage.
122
123 The user can save an execution state of the schema by choosing the **Save execution state ...** command from the :ref:`execute` or from the :ref:`execution_toolbar`. As a result of this operation, the dialog box similar to the standard SALOME GUI "Save file" dialog box is shown by YACS module. The user should select an XML file to
124 save schemas execution state into and the current execution state of a schema is saved into the selected XML file.
125
126 Here is an example of XML file structure storing the current state of schemas' execution.
127
128 ::
129
130
131  <?xml version='1.0'?>
132  <graphState>
133   <node type='elementaryNode'>
134     <name>poly_7</name>
135     <state>READY</state>
136     <inputPort>
137       <name>x</name>
138       <value><double>0.5</double></value>
139     </inputPort>
140   </node>
141   <node type='elementaryNode'>
142     <name><b>init</b></name>
143     <state><b>DONE</b></state>
144   </node>
145   <node type='elementaryNode'>
146     <name><b>Legendre.loopIter.deuxIter.iter1</b></name>
147     <state><b>DONE</b></state>
148     <inputPort>
149       <name>Pnm1</name>
150       <value><double>-0.4375</double></value>
151     </inputPort>
152     <inputPort>
153       <name>Pnm2</name>
154       <value><double>-0.289062</double></value>
155     </inputPort>
156     <inputPort>
157       <name>x</name>
158       <value><double>0.5</double></value>
159     </inputPort>
160     <inputPort>
161       <name>n</name>
162       <value><int>4</int></value>
163     </inputPort>
164   </node>
165   <node type='elementaryNode'>
166     <name><b>Legendre.loopIter.deuxIter.iter2</b></name>
167     <state><b>TOACTIVATE</b></state>
168     <inputPort>
169       <name>Pnm1</name>
170       <value><double>-0.289062</double></value>
171     </inputPort>
172     <inputPort>
173       <name>Pnm2</name>
174       <value><double>-0.4375</double></value>
175     </inputPort>
176     <inputPort>
177       <name>x</name>
178       <value><double>0.5</double></value>
179     </inputPort>
180     <inputPort>
181       <name>n</name>
182       <value><int>5</int></value>
183     <inputPort>
184   </node>
185   <node type='bloc'>
186     <name><b>Legendre.loopIter.deuxIter</b></name>
187     <state><b>ACTIVATED</b></state>
188   </node>
189   <node type='forLoop'>
190     <name><b>Legendre.loopIter</b></name>
191     <state><b>ACTIVATED</b></state>
192     <nbdone>1</nbdone>
193     <nsteps>3</nsteps>
194   </node>
195   <node type='elementaryNode'>
196     <name><b>Legendre.iter_1</b></name>
197     <state><b>DONE</b></state>
198     <inputPort>
199       <name>x</name>
200       <value><double>0.5</double></value>
201     </inputPort>
202   </node>
203   <node type='elementaryNode'>
204     <name><b>Legendre.iter_0</b></name>
205     <state><b>DONE</b></state>
206   </node>
207   <node type='bloc'>
208     <name><b>Legendre</b></name>
209     <state><b>ACTIVATED</b></state>
210   </node>
211   <node type='proc'>
212     <name><b>proc</b></name>
213     <state><b>ACTIVATED</b></state>
214   </node>
215  </graphState>
216
217 XML file contains states of all schema nodes and the state of the whole schema.
218
219 If during saving the execution state into the XML file the problems with access rights or free space on a disk drive occur, YACS module cancels saving of the execution state and shows an error message.
220
221 To continue the execution later from saved state the user can restore execution state for the selected schema from an XML file with help of **Load execution state ...** command from the :ref:`execute`, from the :ref:`execution_toolbar` or from schema context popup menu in the Object Bowser.
222
223 By default the **Save execution state...** and **Load execution state ...** commands are applicable to the active schema. But if there is any selected schema in the Object Browser, it is used.
224
225 .. _create_new_edition:
226
227 Create new edition
228 ------------------
229 In the run mode YACS GUI for SALOME 4.1 provides the user with the possibility to create a copy of executed schema in order to do some modifications in it. This functionality is avalable with help of **New edition** command from :ref:`execute` in run mode of a schema, from corresponding button on the :ref:`execution_toolbar` in
230 the same mode or from the schema run context popup menu in the Object Browser.
231
232 In such a case the user can done any modifications in the edition copy of the current schema run and after some corrections create a new run schema object corresponding to the modified version of the schema. It can be considered as a cyclic process of execution and correction of a schema.
233
234