Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There can be occasions when we want to add variables dynamically  i.e In this example we want to configure the ECF_LOGHOST to the machine where the job is running. ECF_LOGHOST is used by the log server, to view the running output in the GUI.

Code Block
languagebash
titleexample.ecf
%include <head.h>

ecflow_client --alter add variable ECG_LOGHOST %HOST% %ECF_NAME%
ecflow_client --alter add variable ECG_LOGPORT 9316 %ECF_NAME%

....
....

ecflow_client --alter delete variable ECG_LOGHOST  %ECF_NAME%
ecflow_client --alter delete variable ECG_LOGPORT  %ECF_NAME%

%include <tail.h>


All this works, it does add a lot of overhead.

In ecflow 5, we can now add/remove variable with the standard child commands init and complete


Code Block
languagebash
titleheah.h
......
ecflow_client --init=$$ --add "ECF_LOGHOST=%HOST%" "ECF_LOGPORT=9316"


Code Block
languagebash
titletail.h
....
ecflow_client --complete --remove ECF_LOGHOST ECF_LOGPORT