没有合适的资源?快使用搜索试试~ 我知道了~
首页CMAQ安装笔记.pdf
资源详情
资源评论
资源推荐
一、 系统配置
uname -a 可显示电脑以及操作系统的相关信息
Linux bogon 3.10.0-862.el7.x86_64 x86_64 x86_64 x86_64 GNU/Linux
gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
lsb_release -a 显示的是发行版本信息
Description: CentOS Linux release 7.5.1804 (Core)
Release: 7.5.1804
Linux version 3.10.0-862.el7.x86_64 (builder@kbuilder.dev.centos.org)
(gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) )
CentOS Linux release 7.5.1804 (Core)
二、 安装 netcdf
参考网址:https://blog.csdn.net/schumacher2016/article/details/80850240
安装步骤如下:
1. 配置环境(很重要!!!)
在终端输入 export CC=gcc (本系统编译器为 gcc)
2. 开始安装
需要提前安装的库文件有:zlib 和 hdf5 将把这些安装在同一个目录下,方便后面的环
境变量配置。安装路径为:/usr/local/netcdf
安装包存放路径在:
1) 安装 zlib(应该是用于数据压缩,szip 安装同 zlib)
a) 下载地址:ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/
b) 解压 tar -zxvf zlib-1.2.8.tar.gz
c) 配置安装信息. ./configure --prefix=/usr/local/netcdf
其中可以使用/configure--help 来查看可以使用那些选项。这里选择默认选项安装。
d) 编译. Make
e) 检查. make check
f) 安装. make install
安装完成之后会在/usr/local/netcdf 这个目录下生成三个文件 lib include share
2) 安装 hdf5
a) 下载地址:ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/
b) 解压 tar -zxvf hdf5-1.8.13.tar.gz
c) 配置安装信息. ./configure --prefix=/usr/local/netcdf --with-zlib=/usr/local/netcdf
d) 编译 make
e) 检查编译信息 make check
f) 安装 make install
安装完成后,会被安装进/usr/local/netcdf 目录下的四个文件 lib include share bin 中.
3) 安装 curl(非必需)
a) 解压 tar curl-7.55.1.tar.gz
b) 配置安装信息. ./configure --prefix=/usr/local/netcdf --with-zlib=/usr/local/netcdf
c) 编译 make
d) 检查编译信息 make check
e) 安装 make install
4) 安装 netcdf-c
a) 下载地址 ftp://ftp.unidata.ucar.edu/pub/netcdf/old/
b) 解压 tar -zxvf netcdf-4.3.2.tar.gz
c) 配置安装信息 CPPFLAGS=-I/usr/local/netcdf/include LDFLAGS=-L/usr/local/netcdf
/lib ./configure --prefix=/usr/local/netcdf --disable-dap
d) 编译 make
e) 编译信息检查 make check
f) 安装 make install
5) 安装 netcdf c++库
a) tar xf netcdf- cxx4-4.3.0.tar.gz
b) cd netcdf- cxx4-4.3.0
c) LDFLAGS=-L/usr/local/netcdf/lib CPPFLAGS=-I/usr/local/netcdf/include ./configure --
enable-shared --prefix=/usr/local/netcdf
d) make
e) make check
f) sudo make install
6) 安装 netcdf-fortran
a) 告知库文件位置.终端中输入
export LD_LIBRARY_PATH=/usr/local/netcdf /lib:$LD_LIBRARY_PATH
b) 解压 tar -zxvf netcdf-fortran-4.4.0.tar.gz
c) 配 置 安 装 信 息 . CPPFLAGS=-I/usr/local/netcdf/include LDFLAGS=-
L/usr/local/netcdf/lib ./configure --prefix=/usr/local/netcdf
d) 编译 make
e) 编译信息检查 make check
f) 安装 make install
3. 配置环境变量
1) 配置环境变量
终端中输入 vim ~/.bashrc 按进入插入模式,输入如下信息
#netcdf4.4
export NETCDF=/usr/local/netcdf
export PATH=$NETCDF/bin:$PATH
export LD_LIBRARY_PATH=$NETCDF/lib:$LD_LIBRARY_PATH
export CPPFLAGS='-I/usr/local/netcdf/include'
export LDFLAGS='-L/usr/local/netcdf/lib'
输入完成保存退出(先按 esc 键,然后输入:wq 保存退出)
2) .使环境变量生效
终端中输入 source ~/.bashrc
4. 查看安装了那些组件
1) nc-config --all
This netCDF 4.3.2 has been built with the following features:
--cc -> gcc
--cflags -> -I/usr/local/netcdf4-needed/include -I/usr/local/netcdf4-needed/include
--libs -> -L/usr/local/netcdf4-needed/lib -lnetcdf
--has-c++ -> no
--cxx ->
--has-c++4 -> yes
--cxx4 -> yes
--fc -> gfortran
--fflags -> -I/usr/local/netcdf4-needed/include
--flibs -> -L/usr/local/netcdf4-needed/lib -lnetcdff -L/usr/local/netcdf4-needed/lib -lnetcdf
-lnetcdf
--has-f90 -> no
--has-dap -> no
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-pnetcdf-> no
--prefix -> /usr/local/netcdf4-needed
--includedir-> /usr/local/netcdf4-needed/include
--version -> netCDF 4.3.2
2) nf-config --all
ThisnetCDF-Fortran 4.4.0 has been built with the following features:
--cc -> icc
--cflags -> -I/usr/local/netcdf4-needed/include-I/usr/local/netcdf4-needed/include
--fc -> ifort
--fflags -> -I/usr/local/netcdf4-needed/include
--flibs -> -L/usr/local/netcdf4-needed/lib -lnetcdff-L/usr/local/netcdf4-needed/lib -lnetcdf -lnetcdf
--has-f90 -> no
--has-f03 -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--prefix -> /usr/local/netcdf4-needed
--includedir->/usr/local/netcdf4-needed/include
--version -> netCDF-Fortran 4.4.0
三、 安装 mpich
1. 下载安装包安装
a) tar xf mpich-3.3.tar.gz
b) cd mpich-3.3
c) ./configure --prefix=/usr/local/mpich
d) make -j 4
e) make -j 4 check
f) sudo make -j 4 install
2. 设置环境变量:
在 ~/.bashrc 添加一下内容:
export PATH=/usr/local/mpich/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/mpich/lib:${LD_LIBRARY_PATH}
export MANPATH=/usr/local/mpich/share/man:${MANPATH}
3. 使环境变量生效
source ~/.bashrc
剩余19页未读,继续阅读
zzNeverGiveUp
- 粉丝: 10
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0