...
This will check that the suite definition is correct and can be loaded into the server.
Simulation and Verification
You can also use the simulator. allowing you predict/verify the behaviour of your suite in few seconds. The simulator is available with the python api.
The simulator will analyse the definition, and simulate the ecflow server. Allowing time dependencies that span several months, to be simulated in a few seconds.
Ecflow allows the use of verify attributes. This example show how we can verify the number of times a task should run, given a start(optional) and end time(optional).
Code Block | ||
---|---|---|
| ||
suite cron3 # use real clock otherwise clock starts when the simulations starts
clock real 1.1.2006 # define a start date for deterministic behaviour
endclock 13.1.2006 # When to finish. end clock is *only* used for the simulator
family cronFamily
task t
cron -d 10,11,12 10:00 11:00 01:00 # run on 10,11,12 of the month at 10am and 11am
verify complete:6 # task should complete 6 times between 1.1.2006 -> 13.1.2006
endfamily
endsuite |
Please note, for deterministic behaviour, the start and end clock should be specified
However if no 'endclock' is specified the simulation will assume the following defaults.
- No time dependencies: 24 hours
- time || today : 24 hours
- day : 1 week
- date : 1 month
- cron : 1 year
- repeat : 1 year
If there no time dependencies with an minute resolution, then the simulator will by default use 1 hour resolution.
This needs to be taken into account when specifying the verify attribute
If the simulation does not complete it creates defs.flat and defs.depth files.
This provides clues as to the state of the definition at the end of the simulation
Code Block | ||||
---|---|---|---|---|
| ||||
import ecflow
defs = Defs('suite.def') # specify the defs we want to simulate
theResults = defs.simulate() # call the simulator
print theResults # check the results. |