爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 19856|回复: 20

用netcdf-4.7.4能安装ioapi3.2吗

[复制链接]
发表于 2020-12-24 11:09:01 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
奇怪,老版本的netcdf装不上,但4.74能装上,但ioapi安装老出现undefined reference to `_gfortran_string_len_trim'

密码修改失败请联系微信:mofangbao
发表于 2020-12-24 13:24:53 | 显示全部楼层
_gfortran_string_len_trim  google  like gfortran
do you have install gfortran
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-12-25 08:11:01 | 显示全部楼层
本帖最后由 macas 于 2020-12-25 08:13 编辑
linyu0219 发表于 2020-12-24 13:24
_gfortran_string_len_trim  google  like gfortran
do you have install gfortran

netcdf4.7.4能安装成功,nc-config 能响应
但随后安装的netcdf-fortran-4.5.2,虽然结果提示安装成功,但nf-config没响应
应该是netcdf-f没安装成功,但不知道为什么
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-12-25 13:40:30 | 显示全部楼层
你的gfortran 安装好了吗 netcdf-fortran的路径 是不是加到path里lib里什么的
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-12-25 19:16:35 | 显示全部楼层
linyu0219 发表于 2020-12-25 13:40
你的gfortran 安装好了吗 netcdf-fortran的路径 是不是加到path里lib里什么的

对 which gfortran可以得到/bin/gfortran
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-12-25 19:19:35 | 显示全部楼层
linyu0219 发表于 2020-12-25 13:40
你的gfortran 安装好了吗 netcdf-fortran的路径 是不是加到path里lib里什么的

make check时出现的fail,您能看出来是什么问题吗
make[3]: Entering directory `/public/home/mqx/soft_source/netcdf-fortran-4.5.2/nf03_test'
../test-driver: line 107: 25840 Segmentation fault      (core dumped) "$@" > $log_file 2>&1
FAIL: tst_f90
../test-driver: line 107: 25863 Segmentation fault      (core dumped) "$@" > $log_file 2>&1
FAIL: tst_fill_int64
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-12-27 17:26:42 | 显示全部楼层
google 了一下好像还是编译器的问题 你可以看一下这个链接里gfortran的测试 gcc的测试https://metclim.ucd.ie/2017/06/wrf-installation-on-a-linux-machine/
你也可以用里面的version命令 看下gcc gfortran版本
1.ubuntu安装gcc g++ gfortran 7.5版本

        apt-get install gcc-7 g++-7
        update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
        apt-get install gfortran-7
        update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-7 60

        进行一些环境的测试,使用wrf测试文件
                https://metclim.ucd.ie/2017/06/wrf-installation-on-a-linux-machine/
1. centos 安装gcc g++ gfortran 7
        https://www.centos.bz/2018/07/centos-7-%E7%9B%B4%E6%8E%A5%E5%AE%89%E8%A3%85-gcc-7/
        https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/
        sudo yum install centos-release-scl
        sudo yum install devtoolset-7-gcc*
        scl enable devtoolset-7 bash
        which gcc
        gcc --version
        yum groupinstall "Development Tools"
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-12-27 18:33:18 | 显示全部楼层
linyu0219 发表于 2020-12-27 17:26
google 了一下好像还是编译器的问题 你可以看一下这个链接里gfortran的测试 gcc的测试https://metclim.ucd. ...

谢谢
后来用netcdf-c-4.6.2和netcdf-fortran-4.4.5安装成功了。ioapi安装也产生了需要的文件,但还是以error结束。不过wrf能安装成功,但cmaq的cctm没有安装成功,所以可能还是ioapi没成功
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2020-12-27 21:20:45 | 显示全部楼层
你看看 这个
https://github.com/USEPA/CMAQ/blob/master/DOCS/Users_Guide/Tutorials/CMAQ_UG_tutorial_build_library_gcc.md
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-12-28 11:03:49 | 显示全部楼层
linyu0219 发表于 2020-12-27 21:20
你看看 这个
https://github.com/USEPA/CMAQ/blob/master/DOCS/Users_Guide/Tutorials/CMAQ_UG_tutorial_b ...

多谢!按这个教程安装好netcdf-c,netcdf-fortran和ioapi了。但是安装CCTM还是不成功
不知道您是否遇到过下面这种错误?
pshut3.F(53): error #5102: Cannot open include file 'STATE3.EXT'
        INCLUDE 'STATE3.EXT'
----------------^
pshut3.F(72): error #6404: This name does not have a type, and must have an explicit type.   [FINIT3]
        IF (.NOT. FINIT3) THEN
------------------^
pshut3.F(82): error #6404: This name does not have a type, and must have an explicit type.   [COUNT3]
        DO FILE = 1, COUNT3
---------------------^
pshut3.F(84): error #6404: This name does not have a type, and must have an explicit type.   [CDFID3]
           FID = CDFID3(FILE)
-----------------^
pshut3.F(86): error #6404: This name does not have a type, and must have an explicit type.   [FLIST3]
           IF ((FID .GE. 0) .AND. (FLIST3(FILE) .NE. CMISS3)) THEN
-----------------------------------^
pshut3.F(86): warning #6043: This Hollerith or character constant is too long and cannot be used in the current numeric context.   ['????????????????']
           IF ((FID .GE. 0) .AND. (FLIST3(FILE) .NE. CMISS3)) THEN
-----------------------------------------------------^
pshut3.F(99): error #6404: This name does not have a type, and must have an explicit type.   [FTYPE3]
              IF( FTYPE3( FILE ) .EQ. LOC_MPIGRD3 ) THEN
------------------^
pshut3.F(118): error #6404: This name does not have a type, and must have an explicit type.   [LOGDEV]
                       WRITE( LOGDEV,91010 )
------------------------------^
pshut3.F(120): error #6054: A CHARACTER data type is required in this context.   [FLIST3]
     &                 'File name:  ' // FLIST3( FILE ) ,
-----------------------------------------^
pshut3.F(128): error #6410: This name has not been declared as an array or a function.   [FLIST3]
           FLIST3(FILE) = CMISS3
-----------^
pshut3.F(129): error #6404: This name does not have a type, and must have an explicit type.   [NVARS3]
           DO V = 1, NVARS3( FILE )
---------------------^
pshut3.F(130): error #6410: This name has not been declared as an array or a function.   [ILAST3]
              ILAST3(V,FILE) = IMISS3
--------------^
pshut3.F(131): error #6410: This name has not been declared as an array or a function.   [LDATE3]
              LDATE3(V,FILE) = IMISS3
--------------^
pshut3.F(132): error #6410: This name has not been declared as an array or a function.   [LTIME3]
              LTIME3(V,FILE) = IMISS3
--------------^
pshut3.F(133): error #6410: This name has not been declared as an array or a function.   [NDATE3]
              NDATE3(V,FILE) = IMISS3
--------------^
pshut3.F(134): error #6410: This name has not been declared as an array or a function.   [NTIME3]
              NTIME3(V,FILE) = IMISS3
--------------^
pshut3.F(140): error #6303: The assignment operation or the binary expression operation is invalid for the data types of the two operands.
        FINIT3 = .FALSE.
-----------------^
compilation aborted for pshut3.F (code 1)
make: *** [pshut3.o] Error 1
**ERROR** while running make command
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表