<div class="section" id="header-files-migration"> <span id="header-files"></span><span id="index-0"></span> <p>In our main operational suite, 9 files, out of 115, need modification, and 118 out of 932, amongst all suites.</p> <p>Many header files are a snapshot of old versions of the main header files, used to setup stand alone projects. This migration can be an opportunity to converge toward a common configuration file set.</p> <p>We also found that similar code was replicated amongst multiple files. This leads to “code cleaning” and factorisation.</p> <ul> <li><p class="first">We have the main configuration variables defined in our trap.h header file:</p> <div class="highlight-python"><pre>SMSNODE=%SMSNODE% SMS_PROG=%SMS_PROG% SMSNAME=%SMSNAME% SMSPASS=%SMSPASS% SMSTRYNO=%SMSTRYNO% SMSRID=$(echo $QSUB_REQID | cut -f1 -d.) SMSHOSTFILE=$HOME/.smshostfile SMSJOBOUT=%SMSJOBOUT%</pre> </div> </li> <li><p class="first">synchronisation commands existed in the rcp.h header:</p> <div class="highlight-python"><pre>rcp %LOGDIR%%SMSNAME%.%SMSTRYNO% emos@%SMSNODE%:%SMSOUT%%SMSNAME%.%SMSTRYNO%</pre> </div> </li> <li><p class="first">queuing system directives had embedded SMS vairiable (qsub.h):</p> <div class="highlight-python"><div class="highlight"><pre><span class="c"># QSUB -o %LOGDIR%%SMSNAME%.%SMSTRYNO%</span> </pre></div> </div> </li> <li><p class="first">SMS child commands were called in few header files: trap.h (smsabort, smsinit) and endt.h (smscomplete)</p> </li> <li><p class="first">All SMS variable must be used with a default value (%SMSX:0%) to prevent ecFlow to complain when generating job file.</p> </li> <li><p class="first">we can then proceed to variables translation or include specific ecFlow header files. .. literalinclude:: src/ecf.h</p> </li> </ul> </div> |