请选择 进入手机版 | 继续访问电脑版
爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 10480|回复: 13

【求助帖】在搭建WRF主程序时安装失败,不生成exe

[复制链接]

新浪微博达人勋

发表于 2019-2-13 17:36:09 | 显示全部楼层 |阅读模式

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

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

x
这两天一直在研究WRF系统的安装,参考了很多帖子之后还是没有安装成功,故来叨扰一下。求大腿罩一下小弟。WRF版本是3.6.1

系统环境:
Distributor ID:        Ubuntu
Description:        Ubuntu 16.04.5 LTS
Release:        16.04
Codename:        xenial


编译器:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609


相关库:
hdf5-1.10.4
jasper-1.900.1
jpegsrc.v9c
libpng-1.6.35
netcdf-c-4.6.1
netcdf-fortran-4.4.4
zlib-1.2.11

安装的过程是参考的一下两篇帖子
http://bbs.06climate.com/forum.p ... id=38636&page=1
http://bbs.06climate.com/forum.php?mod=viewthread&tid=55032
安装WRF主程序之前的步骤是按帖子上来的,也没提示什么错误。
在安装WRF主程序的时候出错了,部分log如下,(因为错误太多,所以截取一部分。完成log在附件上)

===================================log start===========================================================

V3.6.1   

Compiling: WRF_EM_CORE  
WRFIO_NCD_LARGE_FILE_SUPPORT=1

Linux rabbitmq_node2 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING


==============================================================================================
。。。

gfortran: error: ../../frame/module_driver_constants.o: 没有那个文件或目录
gfortran: error: ../../frame/module_machine.o: 没有那个文件或目录
makefile:76: recipe for target 'diffwrf' failed
make[3]: [diffwrf] Error 1 (ignored)
make[3]: Leaving directory '/home/qingheng1/mode/WRFV3/external/io_int'

Makefile:181: recipe for target 'module_state_description.F' failed
make[2]: [module_state_description.F] Error 137 (ignored)
rm -f module_state_description.o
/lib/cpp -P -I/home/qingheng1/mode/WRFV3/inc -DEM_CORE=1 -DNMM_CORE=0 -DNMM_MAX_DIM=2600 -DCOAMPS_CORE=0 -DDA_CORE=0 -DEXP_CORE=0 -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNONSTANDARD_SYSTEM_SUBR -DWRF_USE_CLM  -DDM_PARALLEL -DSTUBMPI -DNETCDF -DGRIB2 -DUSE_ALLOCATABLES -DGRIB1 -DINTIO -DLIMIT_ARGS -DCONFIG_BUF_LEN=65536 -DMAX_DOMAINS_F=21 -DMAX_HISTORY=25 -DNMM_NEST=0  -I. -traditional   module_state_description.F  > module_state_description.bb
cpp: error: module_state_description.F: 没有那个文件或目录
cpp: warning: ‘-x c’ after last input file has no effect
cpp: fatal error: no input files
compilation terminated.
../configure.wrf:531: recipe for target 'module_state_description.o' failed
make[2]: [module_state_description.o] Error 1 (ignored)
/home/qingheng1/mode/WRFV3/tools/standard.exe module_state_description.bb | /lib/cpp -P -traditional > module_state_description.f90
rm -f module_state_description.b module_state_description.bb
gfortran -c   -O0 -w -ffree-form -cpp -ffree-line-length-none -fconvert=big-endian -frecord-marker=4  -I../dyn_em -I../dyn_nmm   -I/home/qingheng1/mode/WRFV3/external/esmf_time_f90  -I/home/qingheng1/mode/WRFV3/main -I/home/qingheng1/mode/WRFV3/external/io_netcdf -I/home/qingheng1/mode/WRFV3/external/io_int -I/home/qingheng1/mode/WRFV3/frame -I/home/qingheng1/mode/WRFV3/share -I/home/qingheng1/mode/WRFV3/phys -I/home/qingheng1/mode/WRFV3/chem -I/home/qingheng1/mode/WRFV3/inc -I/usr/local/NETCDF/include  module_state_description.f90
f951: Warning: Nonexistent include directory ‘/home/qingheng1/mode/WRFV3/chem’ [-Wmissing-include-dirs]
rm -f module_driver_constants.o
rm -f module_streams.o
/lib/cpp -P -I/home/qingheng1/mode/WRFV3/inc -DEM_CORE=1 -DNMM_CORE=0 -DNMM_MAX_DIM=2600 -DCOAMPS_CORE=0 -DDA_CORE=0 -DEXP_CORE=0 -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNONSTANDARD_SYSTEM_SUBR -DWRF_USE_CLM  -DDM_PARALLEL -DSTUBMPI -DNETCDF -DGRIB2 -DUSE_ALLOCATABLES -DGRIB1 -DINTIO -DLIMIT_ARGS -DCONFIG_BUF_LEN=65536 -DMAX_DOMAINS_F=21 -DMAX_HISTORY=25 -DNMM_NEST=0  -I. -traditional   module_driver_constants.F  > module_driver_constants.bb
/lib/cpp -P -I/home/qingheng1/mode/WRFV3/inc -DEM_CORE=1 -DNMM_CORE=0 -DNMM_MAX_DIM=2600 -DCOAMPS_CORE=0 -DDA_CORE=0 -DEXP_CORE=0 -DIWORDSIZE=4 -DDWORDSIZE=8 -DRWORDSIZE=4 -DLWORDSIZE=4 -DNONSTANDARD_SYSTEM_SUBR -DWRF_USE_CLM  -DDM_PARALLEL -DSTUBMPI -DNETCDF -DGRIB2 -DUSE_ALLOCATABLES -DGRIB1 -DINTIO -DLIMIT_ARGS -DCONFIG_BUF_LEN=65536 -DMAX_DOMAINS_F=21 -DMAX_HISTORY=25 -DNMM_NEST=0  -I. -traditional   module_streams.F  > module_streams.bb
module_driver_constants.F:21:0: fatal error: model_data_order.inc: 没有那个文件或目录
#include <model_data_order.inc>
^
compilation terminated.
module_streams.F:7:0: fatal error: switches_and_alarms.inc: 没有那个文件或目录
#include "switches_and_alarms.inc"
^
compilation terminated.

gfortran: error: wrf.o: 没有那个文件或目录
gfortran: error: ../main/module_wrf_top.o: 没有那个文件或目录
gfortran: error: libwrflib.a: 没有那个文件或目录
Makefile:16: recipe for target 'em_wrf' failed
make[1]: [em_wrf] Error 1 (ignored)
make[1]: Leaving directory '/home/qingheng1/mode/WRFV3/main'
( cd run ; /bin/rm -f wrf.exe ; ln -s ../main/wrf.exe . )
if [ 0 -eq 1 ] ; then \
  ( cd main ; make -i -r MODULE_DIRS="-I../dyn_em -I../dyn_nmm   -I/home/qingheng1/mode/WRFV3/external/esmf_time_f90  -I/home/qingheng1/mode/WRFV3/main -I/home/qingheng1/mode/WRFV3/external/io_netcdf -I/home/qingheng1/mode/WRFV3/external/io_int -I/home/qingheng1/mode/WRFV3/frame -I/home/qingheng1/mode/WRFV3/share -I/home/qingheng1/mode/WRFV3/phys -I/home/qingheng1/mode/WRFV3/chem -I/home/qingheng1/mode/WRFV3/inc -I/usr/local/NETCDF/include " SOLVER=em em_wrf_SST_ESMF ) ; \
fi
build started:   2019年 02月 12日 星期二 23:40:48 PST
build completed: 2019年 02月 12日 星期二 23:41:07 PST
--------------------------------------


gfortran: error: ndown_em.o: 没有那个文件或目录
gfortran: error: ../dyn_em/module_initialize_real.o: 没有那个文件或目录
gfortran: error: libwrflib.a: 没有那个文件或目录
Makefile:28: recipe for target 'em_real' failed
make[1]: [em_real] Error 1 (ignored)
gfortran -o nup.exe  -O2 -ftree-vectorize -funroll-loops -w -ffree-form -cpp -ffree-line-length-none -fconvert=big-endian -frecord-marker=4    nup_em.o  ../dyn_em/module_initialize_real.o libwrflib.a /home/qingheng1/mode/WRFV3/external/fftpack/fftpack5/libfftpack.a /home/qingheng1/mode/WRFV3/external/io_grib1/libio_grib1.a /home/qingheng1/mode/WRFV3/external/io_grib_share/libio_grib_share.a /home/qingheng1/mode/WRFV3/external/io_int/libwrfio_int.a -L/home/qingheng1/mode/WRFV3/external/esmf_time_f90 -lesmf_time /home/qingheng1/mode/WRFV3/external/RSL_LITE/librsl_lite.a /home/qingheng1/mode/WRFV3/frame/module_internal_header_util.o /home/qingheng1/mode/WRFV3/frame/pack_utils.o  -L/home/qingheng1/mode/WRFV3/external/io_netcdf -lwrfio_nf -L/usr/local/NETCDF/lib -lnetcdff -lnetcdf   -L/home/qingheng1/mode/WRFV3/external/io_grib2 -lio_grib2 -L/usr/local/JASPER/lib -ljasper   
gfortran: error: nup_em.o: 没有那个文件或目录
gfortran: error: ../dyn_em/module_initialize_real.o: 没有那个文件或目录
gfortran: error: libwrflib.a: 没有那个文件或目录
Makefile:28: recipe for target 'em_real' failed
make[1]: [em_real] Error 1 (ignored)
build started:   2019年 02月 12日 星期二 23:40:48 PST
build completed: 2019年 02月 12日 星期二 23:41:07 PST

===========================================log end==================================================================================
其中多次出现了gfortran error;找不到某个文件的错误;还有cpp的错误。

这里到底是什么原因导致的无法成功编译呢?求教。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-2-13 17:49:17 | 显示全部楼层
发附件为什么超级慢,最后被我取消了。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-2-14 13:00:57 | 显示全部楼层
看错误还是看第一个出现的Error
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-2-14 14:39:57 | 显示全部楼层
croton 发表于 2019-2-14 13:00
看错误还是看第一个出现的Error

第一个出现的错误是这个,
gfortran: error: ../../frame/module_driver_constants.o: 没有那个文件或目录
gfortran: error: ../../frame/module_machine.o: 没有那个文件或目录

我仔细看了log之后,在我的文件中去查,的确是没有module_driver_constants.o,里面只有同名的.F文件
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-2-14 15:03:18 | 显示全部楼层
您的服务器上有您安装wrf时选择的编译器吗?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-2-14 15:25:57 | 显示全部楼层
croton 发表于 2019-2-14 15:03
您的服务器上有您安装wrf时选择的编译器吗?

编译器不就是gcc,g++和gfortran三个吗?三个编译器的版本都一致,5.4.0
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-2-15 10:16:27 | 显示全部楼层
若是这样的话,可能的原因:
Makefile里面有些参数可能不合适(虽然Makefile是WRF本身提供的,但是并不是所有编译器都适用),在此使用此编译器时不适用。

解决办法:可以更换编译器,或修改Makefile(我之前编译其他软件,Makefile在我的编译器版本下不适用,请人帮忙修改了Makefile,其实就是删了一个参数,后面编译成功了)
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-2-15 10:50:04 | 显示全部楼层
croton 发表于 2019-2-15 10:16
若是这样的话,可能的原因:
Makefile里面有些参数可能不合适(虽然Makefile是WRF本身提供的,但是并不是 ...

       我刚刚有看到一个帖子,那个教程里面就是用的5.4.0版本的gcc,g++,gfortran.这个版本的编译器应该是没有问题的。
       sunzy025:http://bbs.06climate.com/forum.p ... &extra=page%3D1
       log里面提示的错误大多是没有找到某个文件或者某个文件夹不存在。去找了一下,的确是不存在这些的。至于修改MakeFile的难度太大了,看着这个文件找不着北。WRF自己的MakeFile为什么会去找自己本身并不存在的文件和文件夹?您知道怎么修改这个MakeFile吗?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-2-28 19:20:09 | 显示全部楼层
在安装的过程中,换了ubuntu16.04和18.04都是同样的问题,最后使用了centOS7,成功的安装了。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2019-3-3 16:58:02 | 显示全部楼层
你好 可以互相交流一下吗 最近也在 研究这个
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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