install-wrf-pgi

LinuxにWRFをインストール with PGI compiler ( 2014/04/19 編集 )

  • netcdfのインストール

  • jasperのインストール(任意)

  • mpich2のインストール(任意)

    • WRFのコンパイル

***************************************************

前提:

・terminalでは、bashを使用する。

・$ マークはユーザー権限を示す。

・# マークはroot権限を示す。

***************************************************

以下で使用するShell script類はここからダウンロード出来ます。

動作確認済み環境:

OS: CentOS 6.4 (x86_64)

Memory: 32GB

CPU: Intel Xeon (Total 24 Cores)

Compiler: PGI ver. 12.5

NetCDF: ver. 3.6.3, 4.1.3 (compiled with pgi compiler but C compiler is gcc)

MPICH2: ver. 1.2.1, 1.4.1p1 (compiled with pgi compiler but C compiler is gcc)

WRF: ver.3.1.1, 3.2.1, 3.3.1, 3.4.1, 3.5.1, 3.6

WPS: ver.3.1.1, 3.2.1, 3.3.1, 3.4.1, 3.5.1, 3.6

---

PGI コンパイラのインストール時に注意すべき点

  • /etc/hosts にホスト名を登録しているか

  • license.dat に記述してある host名 が上記のホスト名と一致しているか

  • lmgrd (ライセンスマネージャ) は起動しているか

  • 上記のライセンスマネージャが正常動作しているかどうか

---

NetCDF 3.6.3 をインストール

(ver. 4.1.3 は こちら を参照)

$ emacs netcdf_install.sh

*** C, C++ コンパイラにはGNUコンパイラを使用します。

-- ここから下をファイルに保存する --

#!/bin/sh

export FC=pgfortran

export F77=pgfortran

export CC=gcc

export CXX=g++

export CPP='gcc -E'

export CXXCPP='gcc -E'

export CPPFLAGS='-DNDEBUG -DpgiFortran

./configure --prefix=/usr/local/netcdf-3.6.3-pgi

-- ファイルの記入はここまで --

$ sh netcdf_install.sh

$ make

$ make check

$ su

# make install

---

Jasper をインストール

$ emacs jasper_install.sh

-- ここから下をファイルに保存する --

#!/bin/sh

export CC=gcc

export FC=pgfortran

./configure --prefix=/usr/local/jasper-1.701.0-pgi

-- ファイルの記入はここまで --

$ sh jasper_install.sh

$ make

$ make check

$ su

# make install

環境設定例:

# jasper-1.701.0

export JASPER="/usr/local/jasper-1.701.0-pgi"

export JASPERBIN="${JASPER}/bin"

export JASPERINC="${JASPER}/include"

export JASPERLIB="${JASPER}/lib"

---

mpich2 をインストール

$ emacs mpich_install.sh

-- ここから下をファイルに保存する --

#!/bin/sh

export CC=gcc

export CXX=g++

export CPP='gcc -E'

export CXXCPP='gcc -E'

export F77=pgfortran

export FC=pgfortran

./configure --prefix=/usr/local/mpich2-1.2-pgi --enable-debuginfo --with-shared --with-device=ch3:nemesis

-- ファイルの記入はここまで --

$ chmod 744 mpich_install.sh

$ make

$ make check

$ su

# make install

$ make testing

参考URL:http://www.softek.co.jp/SPG/Pgi/TIPS/public/general/mpich2_install2.html

---

WRF ver. 3.1.1 - 3.6 をインストール

おまじないを施す。

$ export WRFIO_NCD_LARGE_FILE_SUPPORT=1

$ export KMP_STACKSIZE=999999999

$ ulimit -s 5120000

$ ./configure

$ ./compile em_real >&compile.log

参考URL:

http://www.softek.co.jp/SPG/download/PGI/current/install64.html

http://www.pgroup.com/resources/netcdf/netcdf363_pgi2012.htm

http://www.pgroup.com/resources/mpich/mpich2_121_pgi2010.htm

http://blog.livedoor.jp/rootan2007/archives/51486525.html

以上。