爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 11869|回复: 8

hrldas noah-mp 编译报错

[复制链接]

新浪微博达人勋

发表于 2021-3-3 19:51:06 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 奇迹一哥 于 2021-3-14 09:50 编辑

以下是我的报错;请问是我的路径设置问题呢 还是编译器版本问题呢
  1. (cd MPP; make -f Makefile.NoahMP)
  2. make[1]: Entering directory '/home/wxy/Build_WRF/HRLDAS/hrldas/MPP'
  3. make[1]: Nothing to be done for 'all'.
  4. make[1]: Leaving directory '/home/wxy/Build_WRF/HRLDAS/hrldas/MPP'
  5. (cd Utility_routines;           make)
  6. make[1]: Entering directory '/home/wxy/Build_WRF/HRLDAS/hrldas/Utility_routines'
  7. make[1]: Nothing to be done for 'all'.
  8. make[1]: Leaving directory '/home/wxy/Build_WRF/HRLDAS/hrldas/Utility_routines'
  9. (cd ../wrf/phys;                make)
  10. make[1]: Entering directory '/home/wxy/Build_WRF/HRLDAS/wrf/phys'
  11. make[1]: Nothing to be done for 'all'.
  12. make[1]: Leaving directory '/home/wxy/Build_WRF/HRLDAS/wrf/phys'
  13. (cd IO_code;                    make)
  14. make[1]: Entering directory '/home/wxy/Build_WRF/HRLDAS/hrldas/IO_code'
  15. make[1]: Nothing to be done for 'all'.
  16. make[1]: Leaving directory '/home/wxy/Build_WRF/HRLDAS/hrldas/IO_code'
  17. (cd run;                        make)
  18. make[1]: Entering directory '/home/wxy/Build_WRF/HRLDAS/hrldas/run'

  19. echo "    -Wl,-rpath, -L -lhdf5 -lz"
  20.     -Wl,-rpath, -L -lhdf5 -lz
  21. /opt/intel/oneapi/compiler/2021.1.2/linux/bin/intel64/ifort -o hrldas.exe -I../IO_code -I../../wrf/phys ../IO_code/main_hrldas_driver.o ../IO_code/module_hrldas_netcdf_io.o ../../wrf/phys/module_sf_noahmpdrv.o ../../wrf/phys/module_sf_noahmplsm.o ../../wrf/phys/module_sf_noahmp_glacier.o ../../wrf/phys/module_sf_noahmp_groundwater.o ../../wrf/phys/module_sf_gecros.o ../../wrf/phys/module_sf_urban.o ../../wrf/phys/module_sf_bep.o ../../wrf/phys/module_sf_bem.o ../../wrf/phys/module_sf_bep_bem.o ../Utility_routines/module_wrf_utilities.o ../Utility_routines/module_model_constants.o ../Utility_routines/module_date_utilities.o ../Utility_routines/kwm_string_utilities.o ../Utility_routines/module_ra_gfdleta.o ../IO_code/module_NoahMP_hrldas_driver.o  ../MPP/mpp_land.o ../MPP/CPL_WRF.o  -L/home/wxy/Build_WRF/LIBRARIES/netcdf/lib -lnetcdf -lnetcdff
  22. ld: /opt/intel/oneapi/compiler/2021.1.2/linux/bin/intel64/../../compiler/lib/intel64_lin/for_main.o: in function `main':
  23. for_main.c:(.text+0x2e): undefined reference to `MAIN__'

  24. make[1]: *** [Makefile:47: hrldas.exe] Error 1
  25. make[1]: Leaving directory '/home/wxy/Build_WRF/HRLDAS/hrldas/run'
  26. make: *** [Makefile:10: all] Error 2
复制代码


已解决,稀里糊涂就编译出来了···以下是我的 user_build_option配置(之前 f90、CC和CPP都用的Intel编译器报错,现在只有f90用intel ,其他的都用gcc套件,好像就编译过了)
netcdf使用的官网文档并行编译
  1. NETCDF-C
  2. https://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html
  3. NETCDF-FORTRAN
  4. https://www.unidata.ucar.edu/software/netcdf/docs/building_netcdf_fortran.html
复制代码
  1. #=============================================================================================
  2. #  Options for Linux with Intel Fortran MPI
  3. #=============================================================================================

  4. COMPILERF90    =       mpiifort
  5. MPPFLAG        =       YES
  6. FREESOURCE     =       -free
  7. F90FLAGS       =       -convert big_endian -g -O0 -fpe0
  8. MODFLAG        =       -I ../MPP
  9. HYDRO_LIB      =       ../MPP/mpp_land.o ../MPP/CPL_WRF.o
  10. LDFLAGS        =      
  11. CPP            =       cpp
  12. CPPFLAGS       =       -P -traditional -DMPP_LAND # -DSPATIAL_SOIL
  13. LIBS           =
  14. LIBJASPER      =       -ljpeg -L/home/wxy/Build_WRF/LIBRARIES/grib2/lib -ljasper
  15. INCJASPER      =      -I/home/wxy/Build_WRF/LIBRARIES/grib2/include
  16. NETCDFMOD      =      -I/home/wxy/Build_WRF/LIBRARIES/netcdf/include
  17. NETCDFLIB      =      -L/home/wxy/Build_WRF/LIBRARIES/netcdf/lib -lnetcdf -lnetcdff
  18. BZIP2          =       NO
  19. BZIP2_INCLUDE  =       -I/usr/include
  20. BZIP2_LIB      =       -L/usr/lib64 #-lbz2
  21. RM             =       rm -f
  22. CC             =      cc
复制代码






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

新浪微博达人勋

发表于 2021-3-3 20:21:43 | 显示全部楼层
netcdf能用吗
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2021-3-3 21:09:56 | 显示全部楼层

我用的是编译WRF用的netcdf,编译wrf时没有问题
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-3-3 23:08:53 | 显示全部楼层
奇迹一哥 发表于 2021-3-3 21:09
我用的是编译WRF用的netcdf,编译wrf时没有问题

嗯,看着好像是mpi那块有问题
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-3-4 13:56:48 | 显示全部楼层
最后一步链接是用的ifort,换成mpiifort应该就可以了。或者链接mpi库,加个-lmpi
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2021-3-5 11:19:52 | 显示全部楼层
werewolf 发表于 2021-3-4 13:56
最后一步链接是用的ifort,换成mpiifort应该就可以了。或者链接mpi库,加个-lmpi

嗯嗯 换成mpiifort mpi的报错没有了 但是还有新的报错,能再帮看那一下吗
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2021-3-5 11:24:43 | 显示全部楼层
andrewsoong 发表于 2021-3-3 23:08
嗯,看着好像是mpi那块有问题

是的 改成mpiifort后 mpi报错没有了,但是还有个报错,你能看出原因吗
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-3-5 11:28:08 | 显示全部楼层
奇迹一哥 发表于 2021-3-5 11:24
是的 改成mpiifort后 mpi报错没有了,但是还有个报错,你能看出原因吗

啥?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2021-3-8 11:37:04 | 显示全部楼层

额 没讲清楚 我更新了下报错信息,麻烦再帮看一下
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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