未定义对符号'xt_finalize'的引用/错误添加符号:命令行缺少DSO

时间:2018-10-26 17:22:12

标签: linker fortran intel

我迷路了。这是编译行(一个巨大的行):

mpif90 -autodouble -I./ -I../src -I../modules -I../../messy/bmil -I../../messy/echam5/bmil -I../../messy/echam5/smil -I../../messy/smil -I../../messy/smcl -I../../mpiom/src -I../../mpiom/src_hamocc -I/gpfs/software/juwels/stages/2018a/software/netCDF-Fortran/4.4.4-ipsmpi-2018a/include -I/gpfs/software/juwels/stages/2018a/software/netCDF-Fortran/4.4.4-ipsmpi-2018a/include  -I/gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/include -I../include -g -traceback -debug all -check all -fpp -O0 -fp-model precise -fp-speculation=safe -fno-alias -no-ansi-alias -lpthread -save-temps -DMESSY -DLITTLE_ENDIAN -D_LINUX64 -DPNCREGRID -DMESSYTIMER -DMESSYGRID -DECHAM5 -DE5302 -DHAVE_LIBNETCDF64 -DFFT991 -DALBMELTHI -DMPIOM_13B -DHAVE_YAXT -DMECCA_TAG -c ../src/tf2.f90
mpif90 -Wl,-rpath,/gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/lib -o ../../bin/echam5.exe auxhyb.o clsst.o clveg.o conteq.o control.o dyn.o ewd.o fftd.o ffti.o geopot.o gpc.o hdiff.o helmo.o inhysi.o inictl.o inidoc.o init_decomposition.o initemp.o initialize.o ioinitial.o iorestart.o labrun.o legtri.o ltd.o lti.o m_alloc_mods.o master.o maxwind.o messy_a2o_e5.o messy_aeropt_si.o messy_airsea_si.o messy_airtraf_e5.o messy_bioburn_si.o messy_bufly_e5.o messy_cam_aerocld_e5.o messy_cam_drydepo_e5.o messy_cam_e5.o messy_cam_sfflux_e5.o messy_ch4_si.o messy_chemglue_si.o messy_clams_si.o messy_clamsbmix_si.o messy_clamscirrus_si.o messy_clamsmix_si.o messy_clamsrdfrc_si.o messy_clamssedi_si.o messy_clamstraj_si.o messy_cloud_si.o messy_cloudj_si.o messy_cloudopt_si.o messy_contrail_si.o messy_convect_si.o messy_cvtrans_si.o messy_d14co_e5.o messy_ddep_si.o messy_dissoc_si.o messy_diumod_si.o messy_dradon_si.o messy_e4chem_si.o messy_e5vdiff_si.o messy_ec2cosmo_e5.o messy_gec_si.o messy_gmxe_si.o messy_gwave_si.o messy_h2o_e5.o messy_h2oiso_e5.o messy_hamocc_e5.o messy_hd_e5.o messy_jval_si.o messy_jvst_si.o messy_lnox_si.o messy_m7_si.o messy_made3_si.o messy_made_si.o messy_main_blather_bi.o messy_main_bmluse_bi.o messy_main_channel_bi.o messy_main_control_bi.o messy_main_data_bi.o messy_main_decomp_bi.o messy_main_grid_bi.o messy_main_grid_netcdf_bi.o messy_main_import_bi.o messy_main_import_grid_bi.o messy_main_import_grid_tools_bi.o messy_main_import_lt_bi.o messy_main_import_rgt_bi.o messy_main_import_ts_bi.o messy_main_mpi_bi.o messy_main_qtimer_bi.o messy_main_rnd_bi.o messy_main_switch_bi.o messy_main_tendency_bi.o messy_main_timer_bi.o messy_main_tools_bi.o messy_main_tracer_bi.o messy_main_tracer_family_bi.o messy_main_tracer_mem_bi.o messy_main_tracer_pdef_bi.o messy_main_transform_bi.o messy_mecca_aero_si.o messy_mecca_khet_si.o messy_mecca_mem_si.o messy_mecca_poly_si.o messy_mecca_si.o messy_mecca_tag_fcm_si.o messy_mecca_tag_si.o messy_megan_si.o messy_mlocean_e5.o messy_mmd2way_child_si.o messy_mmd2way_parent_si.o messy_mmd2way_si.o messy_mmforce_e5.o messy_mpiom_e5.o messy_mpiom_mem_e5.o messy_mpiom_tools_e5.o messy_msbm_si.o messy_mtskip_si.o messy_ncregrid_interface.o messy_ncregrid_tools_bi.o messy_o3orig_si.o messy_offemis_si.o messy_onemis_si.o messy_oracle_si.o messy_orbit_si.o messy_orogw_si.o messy_otphysc_e5.o messy_plumegas_si.o messy_ptrac_si.o messy_ptracini_si.o messy_qbo_si.o messy_rad_fubrad_si.o messy_rad_si.o messy_relax_e5.o messy_s4d_si.o messy_satsims_e5.o messy_scalc_si.o messy_scav_si.o messy_scout_si.o messy_sedi_si.o messy_sorbit_si.o messy_spacenox_e5.o messy_spe_e5.o messy_surface_si.o messy_tagging_si.o messy_tbudget_si.o messy_timepos_e5.o messy_tnudge_si.o messy_trexp_si.o messy_tropop_si.o messy_trsync_si.o messy_ubcnox_e5.o messy_vahr_e5.o messy_vaxtra_si.o messy_vertex_si.o messy_viso_si.o mo_advection.o mo_base_types.o mo_buffer_fft.o mo_call_trans.o mo_clim.o mo_constants.o mo_control.o mo_decomposition.o mo_diag_tendency.o mo_diff.o mo_doctor.o mo_exception.o mo_fft991.o mo_fft992.o mo_field.o mo_filename.o mo_forecast_switches.o mo_gaussgrid.o mo_geoloc.o mo_gl1.o mo_global_op.o mo_grib.o mo_hdiff.o mo_hyb.o mo_interpo.o mo_io.o mo_kind.o mo_legendre.o mo_linked_list.o mo_machine.o mo_memory_base.o mo_memory_f.o mo_memory_g1a.o mo_memory_g1b.o mo_memory_g2a.o mo_memory_g2b.o mo_memory_g3a.o mo_memory_g3b.o mo_memory_gl.o mo_memory_ls.o mo_memory_sp.o mo_memory_streams.o mo_mpi.o mo_namelist.o mo_netcdf.o mo_netcdfstream.o mo_nmi.o mo_nudging.o mo_nudging_buffer.o mo_nudging_constants.o mo_nudging_correl.o mo_nudging_init.o mo_nudging_io.o mo_nudging_pattern.o mo_nudging_sst.o mo_nudging_utils.o mo_parameters.o mo_parrrtm.o mo_port_test.o mo_real_timer.o mo_scan_buffer.o mo_semi_impl.o mo_semi_lagrangian.o mo_specfun.o mo_spectral.o mo_spitfire.o mo_sst.o mo_test_trans.o mo_time_base.o mo_time_control.o mo_time_conversion.o mo_time_event.o mo_time_manager.o mo_timer.o mo_timestamp.o mo_tmp_buffer.o mo_tpcore.o mo_tr_allgather.o mo_tr_gather.o mo_transpose.o mo_truncation.o mo_upper_sponge.o mo_util_string.o pgrad.o physc.o pres.o presf.o readfld.o scan1.o scan2.o sccd.o scctp.o setdyn.o si1.o si2.o stepon.o sudif.o sym1.o sym2.o tf1.o tf2.o mo_echam_yaxt.o -L../../lib -lmpiom -L../../lib -lsupport -L../lib -lmessy -lisorropia -lqhull  -L/gpfs/software/juwels/stages/2018a/software/netCDF/4.6.1-ipsmpi-2018a/lib64 -lnetcdf  -L/gpfs/software/juwels/stages/2018a/software/netCDF-Fortran/4.4.4-ipsmpi-2018a/lib -lnetcdff  -L/gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/lib -lyaxt -L../../lib -llapack -L../../lib -lblas

我尝试更改了库的顺序,在之前,之后等添加了额外的-lyaxt。库中确实包含以下符号:

19:16:00|cstao05@juwels09:[__LINUX64]> readelf -s /gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/lib/libyaxt.so | grep xt_finalize
28: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND xt_finalized
45: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND xt_finalize
126: 000000000000c230    32 FUNC    GLOBAL DEFAULT   13    xt_core_mp_xt_finalized_
671: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND xt_finalized
740: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND xt_finalize
947: 000000000000c230    32 FUNC    GLOBAL DEFAULT   13 xt_core_mp_xt_finalized_

以及

nm /gpfs/software/juwels/stages/2018a/software/YAXT/0.6.0-ipsmpi-2018a/lib/libyaxt.so | grep xt_finalize
000000000000c230 T xt_core_mp_xt_finalized_
             U xt_finalize
             U xt_finalized

我在这里已经阅读了所有其他答案,但是我仍然无法弄清楚这个答案。

1 个答案:

答案 0 :(得分:0)

缺少的库是lyaxt_c(我错过了_c)。修复Makefile有效。