cmaq安装教程linux,cmaq编译笔记1 ioapi安装

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

(2009-04-24 10:14:50)

c47820ea15ce36d3cbc1076239f33a87eb50b1ed.jpg转载▼

标签: 杂谈 分类: 输送模式

提醒下cmaq4.7需要ioapi3.0,而不是ioapi2.2

安装说明

IOAPI 3.0 - 30 September 2008

I/O API V3.0 的源代码,说明文档和适用于不同操作平台的binary 库在下面的网址:

http://www.baronams.com/products/ioapi/AVAIL.html

这个web站点说明了建立ioapi binary的详细方法,简单的摘要如下:

1、解压缩下载的文件

tar xvfz ioapi-3.0.tar.gz

2、根据你的机器结构和可用的fortran和c编译器

命令"uname -a"提供了机器结构的信息

例如:

3、去ioapi的次级目录决定支持的结构和编译器

ls -al Makeinclude.*

The Makeinclude file extensions are named according to the type of

architecture and compiler.

For instance, if your machine is a Linux box with Pentium

processor and you are using an Portland Group Fortran compiler

(pgf90), you should use Makeinclude.Linux2_x86pg.

4) Set up the library directory:

setenv BIN

where is the file extension you determined in step #3.

Using the previous example, you would type:

在csh下

setenv BIN Linux2_x86pg

在bash下

export BIN= Linux2_x86pg

5) 进入ioapi-3.0/ioapi ,Select the no-couple Makefile:

cp Makefile.nocpl Makefile

你需要编译Makefile来设置BASEDIR的根目录

You may need to edit the Makefile to set the location for BASEDIR.

6) For this version of CMAQ, the I/O API default limit for the number

of species in a file (MXVARS3) will need to be changed from 120.

To accommodate all of our in-house diagnostic model versions, we

set MXVARS3 to a very large number (50000).

Edit the value of MXVARS3 in the following files:

PARMS3.EXT

parms3.h

fixed_src/PARMS3.EXT

7) 补充 在ioapi-3.0/ioapi Build the library by typing:

make

在此出现了Makefile:1: *** 遗漏分隔符这个错误,解决办法是

makefile的命令要以TAB开头,依赖条件顶格

如果还是出错,则可以打开makefile,在84行找到

#include ${SRCDIR}/Makeinclude.${BIN} 此行注释掉,并把makeinclude.BIN的文件内容拷贝到此处,编译即可。

Note: 1. If the compilers you chose are not found, check Makeinclude.

to see whether the compiler paths are set correctly.

2. In our compilation, we used pgf90 and gcc. We made the

following changes to the Makeinclude.Linux2_x86pg file ("patch"

style difference):

25c25,26

< CC = pgcc

---

> #CC = pgcc

> CC = /usr/bin/gcc

33c34,35

< OMPFLAGS = -mp

---

> #OMPFLAGS = -mp

> OMPFLAGS =

35,36c37,40

< COPTFLAGS = -O2 ${MFLAGS}

< FOPTFLAGS = -O2 ${MFLAGS}

---

> #COPTFLAGS = -O2 ${MFLAGS}

> COPTFLAGS = -O2 -ffast-math -DIOAPI_NO_STDOUT

> #FOPTFLAGS = -O2 ${MFLAGS}

> FOPTFLAGS = -O2 -fast -DIOAPI_NO_STDOUT

38c42,43

< FSFLAGS = -Msave

---

> #FSFLAGS = -Msave

> FSFLAGS = -Bstatic

Note: You can change the file by using the Unix "patch"

utility. Cut the indented section listed above and paste into a

file, say "mod." Then type "patch

The -DIOAPI_NO_STDOUT in COPTFLAGS and FOPTFLAGS in the

Makeinclude. file avoids verbose run-time output messages.

3. The library is created in the subdirectory (see step #4).

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值