<style type="text/css">
.highlight .hll
.highlight
.highlight .c
/* Comment */
.highlight .err
/* Error */
.highlight .k
/* Keyword */
.highlight .o
/* Operator */
.highlight .cm
/* Comment.Multiline */
.highlight .cp
/* Comment.Preproc */
.highlight .c1
/* Comment.Single */
.highlight .cs
/* Comment.Special */
.highlight .gd
/* Generic.Deleted */
.highlight .ge
/* Generic.Emph */
.highlight .gr
/* Generic.Error */
.highlight .gh
/* Generic.Heading */
.highlight .gi
/* Generic.Inserted */
.highlight .go
/* Generic.Output */
.highlight .gp
/* Generic.Prompt */
.highlight .gs
/* Generic.Strong */
.highlight .gu
/* Generic.Subheading */
.highlight .gt
/* Generic.Traceback */
.highlight .kc
/* Keyword.Constant */
.highlight .kd
/* Keyword.Declaration */
.highlight .kn
/* Keyword.Namespace */
.highlight .kp
/* Keyword.Pseudo */
.highlight .kr
/* Keyword.Reserved */
.highlight .kt
/* Keyword.Type */
.highlight .m
/* Literal.Number */
.highlight .s
/* Literal.String */
.highlight .na
/* Name.Attribute */
.highlight .nb
/* Name.Builtin */
.highlight .nc
/* Name.Class */
.highlight .no
/* Name.Constant */
.highlight .nd
/* Name.Decorator */
.highlight .ni
/* Name.Entity */
.highlight .ne
/* Name.Exception */
.highlight .nf
/* Name.Function */
.highlight .nl
/* Name.Label */
.highlight .nn
/* Name.Namespace */
.highlight .nt
/* Name.Tag */
.highlight .nv
/* Name.Variable */
.highlight .ow
/* Operator.Word */
.highlight .w
/* Text.Whitespace */
.highlight .mf
/* Literal.Number.Float */
.highlight .mh
/* Literal.Number.Hex */
.highlight .mi
/* Literal.Number.Integer */
.highlight .mo
/* Literal.Number.Oct */
.highlight .sb
/* Literal.String.Backtick */
.highlight .sc
/* Literal.String.Char */
.highlight .sd
/* Literal.String.Doc */
.highlight .s2
/* Literal.String.Double */
.highlight .se
/* Literal.String.Escape */
.highlight .sh
/* Literal.String.Heredoc */
.highlight .si
/* Literal.String.Interpol */
.highlight .sx
/* Literal.String.Other */
.highlight .sr
/* Literal.String.Regex */
.highlight .s1
/* Literal.String.Single */
.highlight .ss
/* Literal.String.Symbol */
.highlight .bp
/* Name.Builtin.Pseudo */
.highlight .vc
/* Name.Variable.Class */
.highlight .vg
/* Name.Variable.Global */
.highlight .vi
/* Name.Variable.Instance */
.highlight .il
/* Literal.Number.Integer.Long */
</style>
The next step is to let ecflow_server know about your suite or to “load” the suite definition file.
This checks the file test.def and describes the suite to the ecflow_server.
This can be done in several ways, depending on how the suite was created.
Note
Choose between the two methods below, to avoid errors associated with loading suite definition twice.
Loading a Suite created as a text file¶
From within the course directory do the following from the unix shell:
> ecflow_client --load=test.def
You will have already seen ecflow_client being used in head.h and tail.h include files.
Loading a Suite created in python¶
#!/usr/bin/env python2.5
import os
import ecflow
defs = ecflow.Defs()
suite = defs.add_suite("test")
suite.add_variable("ECF_HOME",os.getenv("HOME") + "/course")
suite.add_task("t1")
# Save definition to file 'test.def'
defs.save_as_defs("test.def")
# Restore the definition from file 'test.def'
restored_defs = ecflow.Defs("test.def")
You can also print the defs. The output will written to standard out:
print defs
If you called “defs.save_as_defs()” the file test.def will be written.
This can be loaded in the server as described earlier Loading a Suite created as a text file
This can be done by using ecflow.Client python class:
ci = ecflow.Client();
try:
ci.load(defs) # load the definition into the server
except RuntimeError, e:
print "failed: " + str(e);
If everything is OK, you should have defined a suite.
Have a look in the window running the ecflow_server, and look at the log file
What to do¶
- Load the definition file. Choose between loading as a text file, or using python api.
- Check the log file