<div id="checking-the-results"> <span id="index-0"></span><span id="id1"></span> <p>Let us now see how our suite ran, type the following:</p> <div ><pre>> ecflow_client --get_state</pre> </div> <div > <div >This command will retrieve the <a href="/wiki/display/ECFLOW/Glossary#term-suite-definition"><em >suite definition</em></a> from the server,</div> <div >which is is then shown with all the <strong>state</strong> for each <a href="/wiki/display/ECFLOW/Glossary#term-node"><em >node</em></a></div> </div> <div > <div >Look at the <a href="/wiki/display/ECFLOW/Glossary#term-task"><em >task</em></a> <strong>t1</strong> if it is <a href="/wiki/display/ECFLOW/Glossary#term-complete"><em >complete</em></a> and the <a href="/wiki/display/ECFLOW/Glossary#term-suite"><em >suite</em></a> is <em>complete</em></div> <div >then the run was successful.</div> </div> <div > <div >If this is not the case, and you might see <a href="/wiki/display/ECFLOW/Glossary#term-aborted"><em >aborted</em></a>.</div> <div >Please check the location (directory) of your <a href="/wiki/display/ECFLOW/Glossary#term-ecf-script"><em >ecf script</em></a> before referring</div> <div >to your instructor.</div> </div> <div > <div >The <a href="/wiki/display/ECFLOW/Glossary#term-job-file"><em >job file</em></a> created by the server is located in the same directory as the</div> <div ><a href="/wiki/display/ECFLOW/Glossary#term-ecf-script"><em >ecf script</em></a>, and is named <em>t1.job1</em>.</div> <div >Compare the files <tt ><span >t1.ecf</span></tt>, <tt ><span >head.h</span></tt>, <tt ><span >tail.h</span></tt> and <tt ><span >t1.job1</span></tt>.</div> </div> <div > <div >The <strong>output</strong> of the job is located in the same directory as the <a href="/wiki/display/ECFLOW/Glossary#term-ecf-script"><em >ecf script</em></a>,</div> <div >and is named <tt ><span >t1.1</span></tt>.</div> </div> <div id="retrieving-the-suite-definition"> <h2>Retrieving the suite definition<a href="#retrieving-the-suite-definition" title="Permalink to this headline">ΒΆ</a></h2> <ul> <li><p >To retrieve the <a href="/wiki/display/ECFLOW/Glossary#term-suite-definition"><em >suite definition</em></a> in a form that is parse-able, type:</p> <div ><pre>> ecflow_client --get</pre> </div> <p>This can be done in a python script:</p> <div ><div ><pre><span >ci</span> <span >=</span> <span >ecflow</span><span >.</span><span >Client</span><span >();</span> <span >try</span><span >:</span> <span >ci</span><span >.</span><span >sync_local</span><span >()</span> <span ># get server definition, by sync with client defs</span> <span >ecflow</span><span >.</span><span >PrintStyle</span><span >.</span><span >set_style</span><span >(</span> <span >ecflow</span><span >.</span><span >Style</span><span >.</span><span >DEFS</span> <span >)</span> <span ># set printing to format that is re-parseable</span> <span >print</span> <span >ci</span><span >.</span><span >get_defs</span><span >()</span> <span ># print the returned suite definition</span> <span >except</span> <span >RuntimeError</span><span >,</span> <span >e</span><span >:</span> <span >print</span> <span >"failed: "</span> <span >+</span> <span >str</span><span >(</span><span >e</span><span >);</span> </pre></div> </div> </li> <li><p >To retrieve the <a href="/wiki/display/ECFLOW/Glossary#term-suite-definition"><em >suite definition</em></a> and show state:</p> <div ><pre>> ecflow_client --get_state</pre> </div> <p>In python this would be:</p> <div ><div ><pre><span >ci</span> <span >=</span> <span >ecflow</span><span >.</span><span >Client</span><span >();</span> <span >try</span><span >:</span> <span >ci</span><span >.</span><span >sync_local</span> <span ># retrieve server definition</span> <span >ecflow</span><span >.</span><span >PrintStyle</span><span >.</span><span >set_style</span><span >(</span> <span >ecflow</span><span >.</span><span >Style</span><span >.</span><span >STATE</span> <span >)</span> <span ># show node state, this is not re-parseable</span> <span >print</span> <span >ci</span><span >.</span><span >get_defs</span><span >()</span> <span ># print the returned suite definition</span> <span >except</span> <span >RuntimeError</span><span >,</span> <span >e</span><span >:</span> <span >print</span> <span >"failed: "</span> <span >+</span> <span >str</span><span >(</span><span >e</span><span >);</span> </pre></div> </div> </li> </ul> <p>What to do:</p> <ol > <li>Locate the ECF job and the output</li> <li>Check results by retrieving the <a href="/wiki/display/ECFLOW/Glossary#term-suite-definition"><em >suite definition</em></a> from the server</li> </ol> </div> </div> |