OpenFOAM 2.1.0 を Red Hat Enterprise Linux 5.6 にインストールメモ2011年12月22日 | |
インストール対象マシンRed Hat Enterprise Linux Server release 5.6, x86_64 コンパイルOpenFOAM 2.1.0 のインストールOpenFOAM 2.1.0 のパッケージを展開。 $ tar xvzf OpenFOAM-2.1.0.tgz -C ~/OpenFOAM $ tar xvzf ThirdParty-2.1.0.tgz -C ~/OpenFOAM ~/.bashrc に以下を追加。 . ~/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc GCC 4.3.3 のコンパイルOpenFOAM 1.6 に付属の GCC 4.3.3 を使用する。セットアップ手順は こちら を参照。コンパイル済みのものをコピーしてもよい。 ここでは OpenFOAM 2.0.1 で使ったものをコピー。 $ mkdir ~/OpenFOAM/ThirdParty-2.1.0/platforms $ cp -r ~/OpenFOAM/ThirdParty-2.0.1/platforms/linux64 ~/OpenFOAM/ThirdParty-2.1.0/platforms OpenFOAM のコンパイル~/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc の foamCompiler=systemと書かれた行を以下のように修正。 #foamCompiler=system foamCompiler=ThirdParty また export WM_COMPILER=Gccと書かれた行を以下のように修正。 #export WM_COMPILER=Gcc export WM_COMPILER=Gcc43 システムにインストール済みの Open MPI を使うために以下のように修正。 #export WM_MPLIB=OPENMPI export WM_MPLIB=SYSTEMOPENMPI Open MPI のパスを通しておく。 ~/.bashrc を読み込む。 $ . ~/.bashrc OpenFOAM のコンパイルの実行。 $ cd ~/OpenFOAM/OpenFOAM-2.1.0/ $ ./Allwmake ParaView のコンパイルParaView 3.12.0 のコンパイルに失敗。OpenFOAM 2.0.1 の ParaView 3.10.1 を使うことにする。 $ cp -r ~/OpenFOAM/ThirdParty-2.0.1/platforms/linux64Gcc43/paraview-3.10.1 ~/OpenFOAM/ThirdParty-2.1.0/platforms/linux64Gcc43 $WM_PROJECT_DIR/etc/config/paraview.sh で ParaView のバージョンを変更。 #export ParaView_VERSION=3.12.0 export ParaView_VERSION=3.10.1 ~/.bashrc を読み込みなおす。 ParaView プラグインのコンパイル。 $ cd ~/OpenFOAM/OpenFOAM-2.1.0/applications/utilities/postProcessing/graphics/PV3Readers/ $ ./Allwmake paraFoam 起動時、以前の OpenFOAM 2.0.1 のプラグインを外す必要があった。 共有の場所に設置他のユーザーも使えるように共有の場所 (たとえば /opt) に設置。 $ cd ~/OpenFOAM $ su ... # mkdir /opt/OpenFOAM # cp -r OpenFOAM-2.1.0 /opt/OpenFOAM # cp -r ThirdParty-2.1.0 /opt/OpenFOAM /opt/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc を以下のように修正。 #foamInstall=$HOME/$WM_PROJECT foamInstall=/opt/$WM_PROJECT 各ユーザーには ~/.bashrc に以下を追加してもらう。 . /opt/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc | |
PENGUINITIS |