LoginSignup
0
0

FrontFlow/BlueをUbuntu20.04にインストール

Posted at

「革新的シミュレーションソフトウエアの研究開発」プロジェクトの一環として開発された、熱流体解析ソルバーであるFrontFlow/BlueをUbuntu20.04にインストールする方法を紹介します。

FrontFlow/Blue

FrontFlow/blue は非圧縮流体の非定常流動を高精度に予測可能なLarge Eddy Simulation(LES)に基づいた汎用流体解析コードで、有限要素法による離散化を採用しています。
乱流現象(騒音、振動、非定常流体力、乱流熱輸送等)の高精度予測が可能で、PCクラスタから京まで、多様なマシンで高速に動作し1000億規模の大規模流体解析および1億規模の大規模音響解析およびこれらの連成解析が可能となっています。

個人利用の範囲内においては、無償で利用できるフリーソフトウェアとして公開されており、以下のリンク先からソースコードがダウンロードできます。
http://www.ciss.iis.u-tokyo.ac.jp/dl/download/permission.php?group_id=7
ソースコードの中にインストール手順も記載してありますが、CentOS向けに作成されており、内容も古いもののため、Ubuntu20.04にインストールする手順を紹介します。

手順

事前zyン美

コンパイラーとしてifortやiccなどを使用するため、intelのコンパイラーをインストールします。
GNU系のコンパイラーだといろいろと修正が必要になるためintelのコンパイラーを使用することをお勧めします。以下のスクリプトを実行します。

.sh
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
sudo apt install intel-basekit-2023.2.0
sudo apt install intel-hpckit-2023.2.0

また、ソースコードのmakeの実行スクリプトがCshell用に作成されているためcshellをインストールします。

.sh
sudo apt install csh

ソースコードのダウンロード

以下のリンクからソースコードをインストールします。
http://www.ciss.iis.u-tokyo.ac.jp/dl/download/permission.php?group_id=7
今回は/optインストールしますので、ダウンロードしたファイルを/optに移動し、以下のスクリプトで解凍してください。その後、、解凍先のフォルダに移動します。

.sh
tar -xzvf FrontFlow_blue.8.1.tar.gz
cd /opt/FFB8

リポジトリを追加した後に、パッケージを/opt/intelにインストールしています。

標準プログラムのコンパイル

環境変数の設定などを行います。

.sh
export LES3DHOME=/opt/FFB8
source /opt/intel/oneapi/setvars.sh

その後、makeオプションなどの設定を変更します。
以下コマンドで変更し,makeします。

.sh
sed -i -e "s,COPT = -O3 -mcmodel=large -shared-intel,COPT =," -e "s,INCDIR = /usr/lib64/openmpi/1.4-gcc/include,INCDIR = /opt/intel/oneapi/mpi/2021.11/include," -e "s,LIBDIR = /usr/lib64/openmpi/1.4-gcc/lib,LIBDIR = /opt/intel/oneapi/mpi/2021.11/lib," make/OPTION
cd FFB8
sed -i -e "s,COPT = -O3 -mcmodel=large -shared-intel,COPT =," -e "s,INCDIR = /usr/lib64/openmpi/1.4-gcc/include,INCDIR = /opt/intel/oneapi/mpi/2021.11/include," -e "s,LIBDIR = /usr/lib64/openmpi/1.4-gcc/lib,LIBDIR = /opt/intel/oneapi/mpi/2021.11/lib," make/OPTION
sed -i -e "22,33s/^/#/" -e "39,49s/^#//" lib/src/REVOCAP_Refiner-0.4.3/OPTIONS
sed -i "16s/^/#include <cstdlib>/" lib/src/REVOCAP_Refiner-0.4.3/Geometry/kmb_Common.h
sed -i "s,g++,icpc," util/xvx2gf/Makefile
./Makeall > make.log 2>&1

並列版プログラムのコンパイル

続いて並列計算用のプログラムをコンパイルします。
設定ファイルを書き換えた後、makeします。

.sh
cd ..
sed -i -e "s,icc,mpiicc," -e "s,ifort,mpiifort," make/OPTION
for i in d c ct; do sed -i "s,-lmpi_f77,," util/les3${i}.mpi/FILES; done
sed -i "s, LIBS = -lfort -lgf2 -ldd_mpi -lmpi_f77, LIBS = -lfort -lgf2 -ldd_mpi," util/les3x.mpi/FILES
cd lib/src/dd_mpi
make lib > make.log 2>&1
cd $LES3DHOME/util/les3d.mpi
make
cd ../les3c.mpi
make
cd ../les3ct.mpi
make
cd ../les3x.mpi
make

以上でインストールは完了です。
無事完了していれば、チュートリアル等が実行できます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0