爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 12134|回复: 23

CMAQ编译CCTM时报错

[复制链接]

新浪微博达人勋

发表于 2018-11-25 21:49:49 | 显示全部楼层 |阅读模式

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

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

x
/public/home/JhonZ/Tools/mpich3.2.1/bin/mpif90 -i-static UTILIO_DEFN.o VGRD_DEFN.o HGRD_DEFN.o CGRID_SPCS.o GRID_CONF.o PCGRID_DEFN.o WVEL_DEFN.o BIDI_MOD.o LSM_MOD.o DEPVVARS.o MOSAIC_MOD.o ABFLUX_MOD.o AEROMET_DATA.o BIOG_EMIS.o BEIS_DEFN.o LTNG_DEFN.o UDTYPES.o STK_EMIS.o STK_PRMS.o AERO_DATA.o PTBILIN.o SSEMIS.o PTMET.o PTMAP.o SOA_DEFN.o STD_CONC.o PT3D_DEFN.o PRECURSOR_DATA.o AERO_EMIS.o DEPV_DEFN.o EMIS_DEFN.o PAGRD_DEFN.o AVG_CONC.o advstep.o driver.o hveloc.o sciproc.o wr_aconc.o wr_cgrid.o wr_conc.o distr_env.o mpcomm_init.o par_term.o diffmsg.o flcheck.o grdcheck.o initscen.o load_cgrid.o opconc.o couple.o couplewrf.o advbc_map.o hadvyppm.o hcontvel.o hppm.o rdbcon.o x_ppm.o x_yamo.o y_ppm.o y_yamo.o zfdbc.o vppm.o zadvppmwrf.o deform.o hcdiff3d.o hdiff.o rho_j.o VDIFF_MAP.o conv_cgrid.o eddyx.o matrix.o opddep.o opddep_fst.o opddep_mos.o opmet.o rddepv.o rdmet.o tri.o vdiffacm2.o cgrid_depv.o gas_depv_map.o m3dry.o opdepv_diag.o opdepv_fst.o opdepv_mos.o DUST_EMIS.o cropcal.o opemis.o tfabove.o tfbelow.o beis3.o checkmem.o chkgrid.o czangle.o getfline.o getparb.o hrno.o parsline.o tmpbeis.o wrdaymsg.o delta_zs.o fire_plmris.o openlayout.o oppt3d_diag.o plmris.o plsprd.o preplm.o ungridb2.o write3_distr.o opphot.o phot.o hrdata_mod.o hrcalcks.o hrdriver.o hrg1.o hrg2.o hrg3.o hrg4.o hrinit.o hrprodloss.o hrrates.o hrsolver.o aero_depv.o aero_driver.o aero_subs.o coags.o getpar.o hetchem.o isocom.o isofwd.o isorev.o opdiam.o opvis.o poaage.o AQ_DATA.o acmcld.o aqchem.o aq_map.o cldproc_acm.o convcld_acm.o getalpha.o hlconst.o indexn.o rescld.o scavwdep.o pa_init.o pa_irr_ctl.o pa_irr.o pa_mkhdr.o pa_output.o pa_update.o cksummer.o findex.o get_envlist.o lstepf.o setup_logdev.o subhdomain.o subhfile.o -L/public/home/JhonZ/Model/CMAQ502/lib/se_snl -lse_snl -L/public/home/JhonZ/Model/CMAQ502/lib/pario -lpario -L/public/home/JhonZ/Model/CMAQ502/lib/mpich/lib -lmpich -L/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort -lioapi -L/public/home/JhonZ/Model/CMAQ502/lib/netcdf/lib -lnetcdf -o CCTM_forecast_parallel
ifort: command line remark #10148: option '-i-static' not supported
/public/home/JhonZ/Model/CMAQ502/lib/pario/libpario.a(pshut3.o): In function `pshut3_':
pshut3.f:(.text+0xca): undefined reference to `ncclos_'
/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort/libioapi.a(bmatvec.o): In function `bmatvec_':
bmatvec.f:(.text+0x1a5): undefined reference to `__kmpc_global_thread_num'
bmatvec.f:(.text+0x1b4): undefined reference to `__kmpc_ok_to_fork'
bmatvec.f:(.text+0x200): undefined reference to `__kmpc_fork_call'
bmatvec.f:(.text+0x215): undefined reference to `__kmpc_serialized_parallel'
bmatvec.f:(.text+0x279): undefined reference to `__kmpc_end_serialized_parallel'
bmatvec.f:(.text+0x34b): undefined reference to `__kmpc_for_static_init_4'
bmatvec.f:(.text+0x4b1): undefined reference to `__kmpc_for_static_fini'
/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort/libioapi.a(close3.o): In function `close3_':
close3.f:(.text+0x8c): undefined reference to `__kmpc_global_thread_num'
close3.f:(.text+0xa3): undefined reference to `__kmpc_critical'
close3.f:(.text+0xd0): undefined reference to `ncclos_'
close3.f:(.text+0x1cd): undefined reference to `__kmpc_end_critical'
/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort/libioapi.a(name2fid.o): In function `name2fid_':
name2fid.f:(.text+0x22): undefined reference to `__kmpc_global_thread_num'
name2fid.f:(.text+0x39): undefined reference to `__kmpc_critical'
name2fid.f:(.text+0x5a): undefined reference to `__kmpc_end_critical'
/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort/libioapi.a(desc3.o): In function `desc3_':
desc3.F:(.text+0x270): undefined reference to `__kmpc_global_thread_num'
desc3.F:(.text+0x287): undefined reference to `__kmpc_critical'
desc3.F:(.text+0x2af): undefined reference to `ncagtc_'
desc3.F:(.text+0x450): undefined reference to `ncagt_'
desc3.F:(.text+0x5d6): undefined reference to `ncagt_'
desc3.F:(.text+0x75c): undefined reference to `ncagt_'
desc3.F:(.text+0x8e2): undefined reference to `ncagt_'
desc3.F:(.text+0xa6c): undefined reference to `ncagtc_'
desc3.F:(.text+0xbfa): undefined reference to `ncagtc_'
desc3.F:(.text+0xd88): undefined reference to `ncagtc_'
desc3.F:(.text+0xf6a): undefined reference to `ncagtc_'
desc3.F:(.text+0x1120): undefined reference to `__kmpc_end_critical'
求大神解救

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

新浪微博达人勋

发表于 2018-11-25 21:59:20 | 显示全部楼层
nc库没连接到该连的位置
编译参数还需要加个-openmp
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-11-25 22:16:03 | 显示全部楼层
weilin421 发表于 2018-11-25 21:59
nc库没连接到该连的位置
编译参数还需要加个-openmp

nc库没连接到位置是什么意思,/public/home/JhonZ/Model/CMAQ502/lib/netcdf/lib  nc路径是正确的。

请问编译参数在哪里加 在F_FLAGS设置吗
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-11-25 22:24:46 | 显示全部楼层
nc*的问题证明了你nc库有问题,你可以再去查一下。M3lib下那个netcdf连到你安装目录,里面有lib
如果你netcdf高于4.1.3 好像还得加-netcdff,不过那个错不是你这个错,那是找不到nf*,你这个是找不到nc库。
至于openmp,加在config.cmaq里,static-i后面 追加上这个参数可以解决你kmpc问题。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-11-26 12:43:04 | 显示全部楼层
我在编译CCTM时也出现了错误
Makefile generated
/opt/intel/impi/4.1.0.024/intel64/bin/mpiifort -c -fixed -132 -O3 -override-limits -fno-alias -mp1 -fp-model precise -I /home/sdnu/CMAQ-5.0.2/lib/x86_64/intel/ioapi_3.1/Linux2_x86_64ifort -I /home/sdnu/CMAQ-5.0.2/lib/x86_64/intel/pario -I /home/sdnu/CMAQ-5.0.2/lib/x86_64/intel/se_snl -I /home/sdnu/CMAQ-5.0.2/lib/x86_64/intel/mpich/include -I. -Dparallel -DSUBST_MODULES=SE_MODULES -DSUBST_BARRIER=SE_BARRIER -DSUBST_GLOBAL_MAX=SE_GLOBAL_MAX -DSUBST_GLOBAL_MIN=SE_GLOBAL_MIN -DSUBST_GLOBAL_MIN_DATA=SE_GLOBAL_MIN_DATA -DSUBST_GLOBAL_TO_LOCAL_COORD=SE_GLOBAL_TO_LOCAL_COORD -DSUBST_GLOBAL_SUM=SE_GLOBAL_SUM -DSUBST_GLOBAL_LOGICAL=SE_GLOBAL_LOGICAL -DSUBST_LOOP_INDEX=SE_LOOP_INDEX -DSUBST_SUBGRID_INDEX=SE_SUBGRID_INDEX -DSUBST_HI_LO_BND_PE=SE_HI_LO_BND_PE -DSUBST_SUM_CHK=SE_SUM_CHK -DSUBST_INIT_ARRAY=SE_INIT_ARRAY -DSUBST_COMM=SE_COMM -DSUBST_MY_REGION=SE_MY_REGION -DSUBST_SLICE=SE_SLICE -DSUBST_GATHER=SE_GATHER -DSUBST_DATA_COPY=SE_DATA_COPY -DSUBST_IN_SYN=SE_IN_SYN -DSUBST_PE_COMM=\"/home/sdnu/CMAQ-5.0.2/scripts/cctm/BLD_D502a/PE_COMM.EXT\" -DSUBST_CONST=\"/home/sdnu/CMAQ-5.0.2/scripts/cctm/BLD_D502a/CONST.EXT\" -DSUBST_FILES_ID=\"/home/sdnu/CMAQ-5.0.2/scripts/cctm/BLD_D502a/FILES_CTM.EXT\" -DSUBST_EMISPRM=\"/home/sdnu/CMAQ-5.0.2/scripts/cctm/BLD_D502a/EMISPRM.EXT\" -DSUBST_RXCMMN=\"/home/sdnu/CMAQ-5.0.2/scripts/cctm/BLD_D502a/RXCM.EXT\" -DSUBST_RXDATA=\"/home/sdnu/CMAQ-5.0.2/scripts/cctm/BLD_D502a/RXDT.EXT\" -DSUBST_PACTL_ID=\"/home/sdnu/CMAQ-5.0.2/scripts/cctm/BLD_D502a/PA_CTL.EXT\" -DSUBST_PACMN_ID=\"/home/sdnu/CMAQ-5.0.2/scripts/cctm/BLD_D502a/PA_CMN.EXT\" -DSUBST_PADAT_ID=\"/home/sdnu/CMAQ-5.0.2/scripts/cctm/BLD_D502a/PA_DAT.EXT\" -DSUBST_MPI=\"/home/sdnu/CMAQ-5.0.2/lib/x86_64/intel/mpich/include/mpif.h\" PT3D_DEFN.F
ifort: command line warning #10212: -fp-model precise evaluates in source precision with Fortran.
PT3D_DEFN.F(716): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [SE_MODULES]
         USE SE_MODULES         ! stenex
-------------^
compilation aborted for PT3D_DEFN.F (code 1)
make: *** [PT3D_DEFN.o] 错误 1
**ERROR** while running make command

mv Makefile Makefile.intel
mv: "Makefile" 与"Makefile.intel" 为同一文件
if ( -e Makefile.intel && -e Makefile ) rm Makefile
rm Makefile
ln -s Makefile.intel Makefile
if ( 0 != 0 ) then
if ( -e /home/sdnu/CMAQ-5.0.2/scripts/cctm/cfg.CCTM_D502a_Linux3_x86_64intel ) then
mv cfg.CCTM_D502a_Linux3_x86_64intel.bld cfg.CCTM_D502a_Linux3_x86_64intel
set is_using_git = `ls -alog $M3MODEL | grep git | wc -l`
ls -alog /home/sdnu/CMAQ-5.0.2/models
wc -l
grep git
if ( 1 ) then
cd /home/sdnu/CMAQ-5.0.2/models
set brnch = `git branch`
git branch
@ i = 0
while ( 0 < 0 )
set rep = `echo $cwd | tr "/" "#"`
echo /home/sdnu/CMAQ-5.0.2/models
tr / #
l: Undefined variable.
[sdnu@bogon cctm]$

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

新浪微博达人勋

 楼主| 发表于 2018-11-26 12:55:33 | 显示全部楼层
physzw 发表于 2018-11-26 12:43
我在编译CCTM时也出现了错误
Makefile generated
/opt/intel/impi/4.1.0.024/intel64/bin/mpiifort -c -f ...

INCLUDE 路径应该有问题
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-11-26 13:09:44 | 显示全部楼层
weilin421 发表于 2018-11-25 22:24
nc*的问题证明了你nc库有问题,你可以再去查一下。M3lib下那个netcdf连到你安装目录,里面有lib
如果你net ...

/public/home/JhonZ/Tools/mpich3.2.1/bin/mpif90 -i-static -qopenmp UTILIO_DEFN.o VGRD_DEFN.o HGRD_DEFN.o CGRID_SPCS.o GRID_CONF.o PCGRID_DEFN.o WVEL_DEFN.o BIDI_MOD.o LSM_MOD.o DEPVVARS.o MOSAIC_MOD.o ABFLUX_MOD.o AEROMET_DATA.o BIOG_EMIS.o BEIS_DEFN.o LTNG_DEFN.o UDTYPES.o STK_EMIS.o STK_PRMS.o AERO_DATA.o PTBILIN.o SSEMIS.o PTMET.o PTMAP.o SOA_DEFN.o STD_CONC.o PT3D_DEFN.o PRECURSOR_DATA.o AERO_EMIS.o DEPV_DEFN.o EMIS_DEFN.o PAGRD_DEFN.o AVG_CONC.o advstep.o driver.o hveloc.o sciproc.o wr_aconc.o wr_cgrid.o wr_conc.o distr_env.o mpcomm_init.o par_term.o diffmsg.o flcheck.o grdcheck.o initscen.o load_cgrid.o opconc.o couple.o couplewrf.o advbc_map.o hadvyppm.o hcontvel.o hppm.o rdbcon.o x_ppm.o x_yamo.o y_ppm.o y_yamo.o zfdbc.o vppm.o zadvppmwrf.o deform.o hcdiff3d.o hdiff.o rho_j.o VDIFF_MAP.o conv_cgrid.o eddyx.o matrix.o opddep.o opddep_fst.o opddep_mos.o opmet.o rddepv.o rdmet.o tri.o vdiffacm2.o cgrid_depv.o gas_depv_map.o m3dry.o opdepv_diag.o opdepv_fst.o opdepv_mos.o DUST_EMIS.o cropcal.o opemis.o tfabove.o tfbelow.o beis3.o checkmem.o chkgrid.o czangle.o getfline.o getparb.o hrno.o parsline.o tmpbeis.o wrdaymsg.o delta_zs.o fire_plmris.o openlayout.o oppt3d_diag.o plmris.o plsprd.o preplm.o ungridb2.o write3_distr.o opphot.o phot.o hrdata_mod.o hrcalcks.o hrdriver.o hrg1.o hrg2.o hrg3.o hrg4.o hrinit.o hrprodloss.o hrrates.o hrsolver.o aero_depv.o aero_driver.o aero_subs.o coags.o getpar.o hetchem.o isocom.o isofwd.o isorev.o opdiam.o opvis.o poaage.o AQ_DATA.o acmcld.o aqchem.o aq_map.o cldproc_acm.o convcld_acm.o getalpha.o hlconst.o indexn.o rescld.o scavwdep.o pa_init.o pa_irr_ctl.o pa_irr.o pa_mkhdr.o pa_output.o pa_update.o cksummer.o findex.o get_envlist.o lstepf.o setup_logdev.o subhdomain.o subhfile.o -L/public/home/JhonZ/Model/CMAQ502/lib/se_snl -lse_snl -L/public/home/JhonZ/Model/CMAQ502/lib/pario -lpario -L/public/home/JhonZ/Model/CMAQ502/lib/mpich/lib -lmpich -L/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort -lioapi -L/public/home/JhonZ/Model/CMAQ502/lib/netcdf/lib -lnetcdf -o CCTM_forecast_parallel
ifort: command line remark #10148: option '-i-static' not supported
/public/home/JhonZ/Model/CMAQ502/lib/pario/libpario.a(pshut3.o): In function `pshut3_':
pshut3.f:(.text+0xca): undefined reference to `ncclos_'
/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort/libioapi.a(close3.o): In function `close3_':
close3.f:(.text+0xd0): undefined reference to `ncclos_'
/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort/libioapi.a(desc3.o): In function `desc3_':
desc3.F:(.text+0x2af): undefined reference to `ncagtc_'
desc3.F:(.text+0x450): undefined reference to `ncagt_'
desc3.F:(.text+0x5d6): undefined reference to `ncagt_'
desc3.F:(.text+0x75c): undefined reference to `ncagt_'
desc3.F:(.text+0x8e2): undefined reference to `ncagt_'
desc3.F:(.text+0xa6c): undefined reference to `ncagtc_'
desc3.F:(.text+0xbfa): undefined reference to `ncagtc_'
desc3.F:(.text+0xd88): undefined reference to `ncagtc_'
desc3.F:(.text+0xf6a): undefined reference to `ncagtc_'
desc3.F:(.text+0x1288): undefined reference to `ncagt_'
desc3.F:(.text+0x1476): undefined reference to `ncanam_'
desc3.F:(.text+0x1684): undefined reference to `ncagt_'
/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort/libioapi.a(init3.o): In function `init3_':
init3.F:(.text+0x86): undefined reference to `ncpopt_'
init3.F:(.text+0x99): undefined reference to `nf_inq_libvers_'
/public/home/JhonZ/Model/CMAQ502/lib/ioapi_3.1/Linux2_x86_64ifort/libioapi.a(open3.o): In function `open3_':
open3.F:(.text+0x785): undefined reference to `ncclos_'
open3.F:(.text+0x7a4): undefined reference to `ncclos_'
还是报错,kmpc的问题解决了,这个会不会是netcdf没有安装好的问题,我编译wrf的是可以的。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-11-26 13:26:52 | 显示全部楼层
你确定-L/public/home/JhonZ/Model/CMAQ502/lib/netcdf/lib这个目录存在,并且里面有libnetcdf.a?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-11-26 13:44:16 | 显示全部楼层
本帖最后由 TTCK 于 2018-11-26 14:08 编辑
weilin421 发表于 2018-11-26 13:26
你确定-L/public/home/JhonZ/Model/CMAQ502/lib/netcdf/lib这个目录存在,并且里面有libnetcdf.a?

确定是存在的。那这是什么原因导致的呢
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-11-26 13:47:53 | 显示全部楼层

ls /public/home/JhonZ/Model/CMAQ502/lib/netcdf/lib/libnetcdf.a
/public/home/JhonZ/Model/CMAQ502/lib/netcdf/lib/libnetcdf.a
路径及文件是存在的
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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