安装ecflow

安装ecflow

软件版本
boost1.71.0
cmake3.15.37
ecflow5.8.1
openssl1.1.1o
python3.8.5
节点IP系统功能CPU内存硬盘
node110.80.10.1centos7.9ecFlow4核心8GB20GB

node1

下载安装依赖包:

1
# yum install -y gcc gcc-c++ libffi-devel zlib zlib-devel ncurses openssl-devel

下载安装gcc7:

1
2
3
4
5
6
7
8
9
# yum install -y centos-release-scl
# yum install -y devtoolset-7
# scl enable devtoolset-7 bash
# echo "source /opt/rh/devtoolset-7/enable" >> /etc/bashrc
# gcc --version
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

下载安装openssl:

下载地址:https://www.openssl.org/source/

1
2
3
4
5
6
7
8
# cd /usr/local/src/
# wget https://www.openssl.org/source/openssl-1.1.1o.tar.gz --no-check-certificate
# tar -xzvf openssl-1.1.1o.tar.gz
# cd openssl-1.1.1o/
# ./config --prefix=/usr/local/openssl shared
# make -j 4 && make -j 4 install
# ln -s /usr/local/openssl/lib/libssl.so.1.1 /lib64/libssl.so.1.1
# ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /lib64/libcrypto.so.1.1

下载安装python:

下载地址:https://www.python.org/ftp/python/

1
2
3
4
5
6
# cd /usr/local/src/
# wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
# tar -xzvf Python-3.8.5.tgz
# cd Python-3.8.5/
# ./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl --enable-shared CFLAGS=-fPIC
# make -j 4 && make -j 4 install

删除系统自带python3软连接:

1
# rm -rf /usr/bin/python3

添加python环境变量:

1
2
3
# vim /etc/profile
# 尾行,添加配置
export PATH=$PATH:/usr/local/python3/bin/
1
# source /etc/profile

添加python3.8动态库:

1
2
3
# cp /usr/local/python3/lib/libpython3.8.so.1.0 /usr/lib64/
# python3 --version
Python 3.8.5

下载安装cmake:

下载地址:https://cmake.org/files/

1
2
3
4
5
6
# cd /usr/local/src/
# wget https://cmake.org/files/v3.15/cmake-3.15.7.tar.gz --no-check-certificate
# tar -xzvf cmake-3.15.7.tar.gz
# cd cmake-3.15.7/
# ./configure --prefix=/usr/local/cmake3.15
# make -j 4 && make -j 4 install

备份并拷贝cmake:

1
2
3
4
5
6
# ls /usr/local/cmake
# ln -s /usr/local/cmake3.15/bin/cmake /usr/bin/cmake
# cmake --version
cmake version 3.15.7

CMake suite maintained and supported by Kitware (kitware.com/cmake).

下载安装boost和ecflow:

下载地址:https://boostorg.jfrog.io/artifactory/main/release/

下载地址:https://confluence.ecmwf.int/display/ECFLOW/Releases

1
2
3
4
5
# cd /usr/local/src/
# wget https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.gz --no-check-certificate
# wget https://confluence.ecmwf.int/download/attachments/8650755/ecFlow-5.8.1-Source.tar.gz --no-check-certificate
# tar -xzvf boost_1_71_0.tar.gz
# tar -xzvf ecFlow-5.8.1-Source.tar.gz
1
2
3
4
# vim /etc/profile
# 尾行,添加配置
export WK=/usr/local/src/ecFlow-5.8.1-Source/
export BOOST_ROOT=/usr/local/src/boost_1_71_0/
1
2
3
4
5
6
7
# source /etc/profile
# cd $BOOST_ROOT
# ./bootstrap.sh
# $WK/build_scripts/boost_build.sh
# vim /etc/profile
# 尾行,添加配置
export CPLUS_INCLUDE_PATH=/usr/local/python3/include/python3.8/
1
# source /etc/profile

安装ecflow:

1
2
3
4
5
6
# cd $WK
# mkdir build; cd build;
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/apps/ecflow -DCMAKE_BUILD_TYPE=Release -DENABLE_UI=OFF
# make -j 4 && make -j 4 install
# ls /usr/local/apps/ecflow/
bin include lib lib64
1
2
3
# vim /etc/profile
# 尾行,添加配置
export PATH=$PATH:/usr/local/apps/ecflow/bin/
1
# source /etc/profile

python使用ecflow,ecflow python api仅支持python3:

1
2
3
# vim /etc/profile
# 尾行,添加配置
export PYTHONPATH=$PYTHONPATH:/usr/local/apps/ecflow/lib/python3.8/site-packages/ecflow/
1
2
3
4
5
# source /etc/profile
# cd $WK/build
# cmake -DCMAKE_INSTALL_PREFIX=/tmp/avi/custom/ecflow/5.8.1 -DCOMPONENT=python -P cmake_install.cmake -- make install
# cp -ar /tmp/avi/custom/ecflow/5.8.1/lib/python3.8/site-packages/ecflow/ /usr/local/python3/lib/python3.8/site-packages/
# python3 -c "import ecflow"