启动suite
ecflow_start.sh 脚本会自动启动 ecflow_server。
手动启动 ecFlow 后,服务器处于 halted 状态,需要 restart 服务器。
halted 状态的服务器不会调度任务。
文本方式
检查服务器的状态,输入下列 unix 命令
ecflow_client --stats
stats 命令的运行结果:
$ecflow_client --host=login05 --port=33083 --statsServer statisticsVersion Ecflow version(4.7.1) boost(1.53.0) compiler(gcc 4.8.5) protocol(TEXT_ARCHIVE) Compiled on Jan 18 2018 01:15:48Status RUNNINGHost a303r6n1Port 33083Up since 2018-Jan-30 04:31:46Job sub' interval 60sECF_HOME /g3/wangdp/ecf_homeECF_LOG /g3/wangdp/ecf_home/a303r6n1.33083.ecf.logECF_CHECK /g3/wangdp/ecf_home/a303r6n1.33083.checkCheck pt interval 120sCheck pt mode CHECK_ON_TIMECheck pt save time alarm 20sNumber of Suites 1Request's per 1,5,15,30,60 min 0.02 0.01 0.03 0.02 0.01Restart server 1Ping 7Sync 9News 20Task init 2Task complete 2Load definition 3Begin 2Node delete 2Run 1Suites 3stats cmd 8
如果 ecflow_server 处于 halted 状态,需要重新启动服务器
手动进入 halted 状态
$ecflow_client --host=login05 --port=33083 --haltAre you sure you want to halt the server ? y

重新启动
$ecflow_client --host=login05 --port=33083 --restart
一旦 ecflow_server 处于 running 状态,就可以启动 suite
$ecflow_client --host=login05 --port=33083 --begin=/test
检查状态

Python方式
重新启动和开始调度 suite 可以通过 Client Server API 完成,修改 client.py 并重新运行。
译者注:如果之前加载过 suite,则注释掉 ci.load(...) 行。
import osfrom pathlib import Pathimport ecflowhome = os.path.abspath(Path(Path(__file__).parent, "../../../build/course"))try:print("Loading definition in 'test.def' into the server")ci = ecflow.Client('login05', '33083')ci.load(str(Path(home, "test.def"))) # read definition from disk and load into the serverprint("Restarting the server. This starts job scheduling")ci.restart_server()print("Begin the suite named 'test'")ci.begin_suite("test")except RuntimeError as e:print("Failed:", e)
在运行上述代码前,需要先手动删除之前加载的 test:
$ecflow_client --host=login05 --port=33083 --delete=/testAre you sure want to delete nodes at paths:/test ? y$python test_client.pyLoading definition in 'test.def' into the serverRestarting the server. This starts job schedulingBegin the suite named 'test'
任务
- 重新启动
ecflow_server - 开始调度 suite
