爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 8485|回复: 8

wrf安装过程中netcdf安装问题

[复制链接]
回帖奖励 3 金钱 回复本帖可获得 1 金钱奖励! 每人限 1 次

新浪微博达人勋

发表于 2017-10-20 15:20:47 | 显示全部楼层 |阅读模式
GrADS
系统平台:
问题截图: -
问题概况: wrf安装过程中netcdf安装问题
我看过提问的智慧: 看过
自己思考时长(天): 1

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

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

x
要用wrf,看了教程(l兰溪之水和anedewsoong两位大神的教程),结果最后在安装netcdf的时候出现了问题:

[root@cent netcdf-3.6.3]$ ./configure --prefix=/usr/local/wrf/netcdf FC=pgf90 cc=gcc
configure: netCDF 3.6.3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: checking user options
checking whether CXX is set to ''... no
checking whether FC is set to ''... no
checking whether F90 is set to ''... no
checking whether this is a netCDF-4.x build... no

checking whether netCDF extra tests should be run (developers only)... no
checking whether documentation is to be installed... no
checking whether Fortran compiler(s) should be tested during configure... yes
checking whether configure should try to set compiler flags... yes
checking whether FFIO will be used... no
checking whether to skip C++, F77, or F90 APIs if compiler is broken... yes
checking whether only the C library is desired... no
checking whether examples should be built... yes
checking whether F77 API is desired... yes
checking whether F90 API is desired... yes
checking whether fortran type sizes should be checked... yes
checking whether C API is desired... yes
checking where to get netCDF C-only library for separate fortran libraries...
checking whether CXX API is desired... yes
checking whether v2 netCDF API should be built... yes
checking whether the ncgen/ncdump should be built... yes
checking whether large file (> 2GB) tests should be run... no
checking whether benchmaks should be run (experimental)... no
checking whether extreme numbers should be used in tests... yes
checking where to put large temp files if large file tests are run... .
checking whether a win32 DLL is desired... no
checking whether separate fortran libs are desired... no
configure: finding C compiler
checking for xlc... no
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking whether cc understands -c and -o together... yes
checking for an ANSI C-conforming const... yes
configure: finding Fortran compiler (will not be used if Fortran API is not desired)
checking whether we are using the GNU Fortran compiler... no
checking whether pgf90 accepts -g... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether pgf90 accepts -g... no
configure: setting up Fortran 90
checking for Fortran flag to compile .f90 files... unknown
configure: error: Fortran could not compile .f90 files
[root@cent netcdf-3.6.3] #make
make:***没有指明目标并且找不到makefile。 停止。



看到之前有人说是PGI安装的问题,我又回去重新检查和重装了了PGI,输入:pgf90,按照教程说的应该是装上了,不知道问题出在哪,实在是太闹心了,请大神帮忙看看。
[td]



[/td]

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-10-21 06:58:30 | 显示全部楼层

回帖奖励 +1 金钱

本帖最后由 小其其格 于 2017-10-21 07:02 编辑

您的编译器是PGI,但cc=gcc这句意思应该是编译器为gfortran吧,所以提示你 Fortran could not compile .f90 files,


试一下以下语句:

./configure --prefix=/usr/local/wrf/netcdf  F90=pgf90 FC=pgf90 F77=pgf77 CC=pgcc CPPFLAGS=-DpgiFortran

密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-10-21 16:19:43 | 显示全部楼层
小其其格 发表于 2017-10-21 06:58
您的编译器是PGI,但cc=gcc这句意思应该是编译器为gfortran吧,所以提示你 Fortran could not compile .f90 ...

不好意思啊,今天一个去参加一个师兄的婚礼去了,回来才看到您的回复,我试了一下您说的,但发现还是不行,结果如下:
[root@Cent netcdf-3.6.3]# ./configure --prefix=/usr/local/wrf/netcdf F90=pgf90 FC=pgf90 F77=pgf77 CC=pgcc CPPFLAGS=-DpgiFortran
configure: netCDF 3.6.3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: checking user options
checking whether CXX is set to ''... no
checking whether FC is set to ''... no
checking whether F90 is set to ''... no
checking whether this is a netCDF-4.x build... no
checking whether netCDF extra tests should be run (developers only)... no
checking whether documentation is to be installed... no
checking whether Fortran compiler(s) should be tested during configure... yes
checking whether configure should try to set compiler flags... yes
checking whether FFIO will be used... no
checking whether to skip C++, F77, or F90 APIs if compiler is broken... yes
checking whether only the C library is desired... no
checking whether examples should be built... yes
checking whether F77 API is desired... yes
checking whether F90 API is desired... yes
checking whether fortran type sizes should be checked... yes
checking whether C API is desired... yes
checking where to get netCDF C-only library for separate fortran libraries...
checking whether CXX API is desired... yes
checking whether v2 netCDF API should be built... yes
checking whether the ncgen/ncdump should be built... yes
checking whether large file (> 2GB) tests should be run... no
checking whether benchmaks should be run (experimental)... no
checking whether extreme numbers should be used in tests... yes
checking where to put large temp files if large file tests are run... .
checking whether a win32 DLL is desired... no
checking whether separate fortran libs are desired... no
configure: finding C compiler
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
[root@Cent netcdf-3.6.3]# make
make: *** 没有指明目标并且找不到 makefile。 停止。

还请您帮我看一下问题在哪
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-10-22 10:30:20 | 显示全部楼层
里斯斯里 发表于 2017-10-21 16:19
不好意思啊,今天一个去参加一个师兄的婚礼去了,回来才看到您的回复,我试了一下您说的,但发现还是不行 ...

请你您用什么系统在安装的?32位还是64位?

configure: error: C compiler cannot create executables

意思就是gcc没安装成功,你看看这个链接:http://blog.csdn.net/sxhong/article/details/740572
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-11-1 17:21:45 | 显示全部楼层

回帖奖励 +1 金钱

你好,请问你解决了吗?我也是这个问题,两个月了,挺痛苦的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-11-1 23:57:43 | 显示全部楼层
小其其格 发表于 2017-10-22 10:30
请你您用什么系统在安装的?32位还是64位?

configure: error: C compiler cannot create executables ...

64位的,我在win7的虚拟机上安装的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-11-1 23:59:30 | 显示全部楼层
小莹子 发表于 2017-11-1 17:21
你好,请问你解决了吗?我也是这个问题,两个月了,挺痛苦的

是安装包的问题,破解版里有peach的文件,放到安装目录里运行一下就好了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-11-3 23:45:12 | 显示全部楼层
里斯斯里 发表于 2017-11-1 23:57
64位的,我在win7的虚拟机上安装的

你安装的PGI没有破解。按照以下方法重新安装PGI看看:

对pgi_10.6.tar.gz安装包进行解压,再进入pgi106的目录对其进行编译:# ./install,之后根据提示输入所需的选项(中间有提示要激活license的选项,一定选y)。需要值得一提的是,安装结束后,要对pgi编译器进行打补丁,进入Crack目录下,解压pgi_10.6.0_linux32_patch.tar.bz2,将解压后的license.dat和pgi_10.6.0_linux32_patch复制到pgi目录下,并执行后者文件:# ./pgi_10.6.0_linux32_patch。

PGI安装结束后,需要对Linux环境变量进行设置。用su命令进入超级用户,修改配置文件.bashrc,再使用source命令使环境变量生效。最后,输入命令pgf90进行检验,若出现“pgf90-Warning-No files to process”,则说明PGI安装成功。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-11-4 11:20:26 | 显示全部楼层
小其其格 发表于 2017-11-3 23:45
你安装的PGI没有破解。按照以下方法重新安装PGI看看:

对pgi_10.6.tar.gz安装包进行解压,再进入pgi10 ...

谢谢您!主要是没有安装补丁,patch那个复制运行之后就可以了,我找了一个脚本用了用pgf90编译了一下发现可以。谢谢。。
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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