intall WRF on centos

Install HDF5

下载:https://support.hdfgroup.org/HDF5/
tar -xf hdf5-1.8.18.tar

./configure --prefix=/usr/local/HDF5  --with-zlib=/usr/local/zlib --enable-fortran --enable-fortran2003

make (这一步会有很多 warning,不用管,只要保证 make check 成功)

make check
make install
make check-install

说明:1、在./configure 时,注意加上选项 --enable-fortran --enable-fortran2003,否则报错

ld: cannot find -lhdf5_fortran

参考:https://debug.fanzheng.org/post/hdf5-error-when-compiling-WRF.html

2、HDF5 是依赖于 zlib 的,若 zlib 未按照
默认路径安装,configure zlib部分必不可少。

Error

WRF HDF5 not set in environment

Add the following in the .bashrc file

export HDF5=/home/sss/hdf5
export PATH=/home/sss/hdf5/bin:$PATH
export LD_LIBRARY_PATH=/home/sss/hdf5/lib:$LD_LIBRARY_PATH

Install netcdf-c

下载: http://www.unidata.ucar.edu/software/netcdf/

export CC=icc
export CXX=icpc
export CFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CXXFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export F77=ifort
export FC=ifort
export F90=ifort
export FFLAGS='-O3 -xHost -ip -no-prec-div -static-intel'
export CPP='icc -E'
export CXXCPP='icpc -E'
export CPPFLAGS=-I/usr/local/HDF5/include
export LDFLAGS=-L/usr/local/HDF5/lib
export LD_LIBRARY_PATH=$/usr/local/HDF5/lib
./configure --prefix=/usr/local/netcdf  --disable-netcdf-4
make
make check # This is just to check the compilation. You'd better not to skip this.
make install

error occured when make check

error while loading shared libraries: libimf.so

solution:

locate libimf.so

and found that

/opt/intel/composer_xe_2015.1.133/compiler/lib/ia32/libimf.so
/opt/intel/composer_xe_2015.1.133/compiler/lib/intel64/libimf.so
/opt/intel/composer_xe_2015.1.133/compiler/lib/mic/libimf.so
/opt/intel/itac/9.0.2.045/intel64/bin/rtlib/libimf.so

add the following line in the .bashrc file

export LD_LIBRARY_PATH="/opt/intel/composer_xe_2015.1.133/compiler/lib/intel64:$LD_LIBRARY_PATH"

source .bashrc

solved.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值