"undefined reference" problem when compiling WRF

After I updated PGI from V7.0 to V7.2, I failed to compile WRf and got some message like the following
Does any have any idea how to solve this problem?
Thanks a lot!

ore undefined references to pgf90_auto_alloc' follow ../dyn_em/module_initialize_real.o: In function module_initialize_integ_moist_’:
module_initialize_real.f90:(.text+0x44f61): undefined reference to pgf90_auto_dealloc' module_initialize_real.f90:(.text+0x44f79): undefined reference to pgf90_auto_dealloc’
module_initialize_real.f90:(.text+0x44f91): undefined reference to pgf90_auto_dealloc' module_initialize_real.f90:(.text+0x44fa9): undefined reference to pgf90_auto_dealloc’
module_initialize_real.f90:(.text+0x44fc1): undefined reference to pgf90_auto_dealloc' ../dyn_em/module_initialize_real.o:module_initialize_real.f90:(.text+0x44fd9): more undefined references to pgf90_auto_dealloc’ follow
…/dyn_em/module_initialize_real.o: In function module_initialize_compute_eta_': module_initialize_real.f90:(.text+0x456c1): undefined reference to pgf90_auto_alloc’
module_initialize_real.f90:(.text+0x456dd): undefined reference to pgf90_auto_alloc' module_initialize_real.f90:(.text+0x4652b): undefined reference to pgf90_auto_dealloc’
module_initialize_real.f90:(.text+0x46543): undefined reference to pgf90_auto_dealloc' ../dyn_em/module_initialize_real.o: In function module_initialize_sfcprs_’:
module_initialize_real.f90:(.text+0x46cfc): undefined reference to pgf90_auto_alloc' module_initialize_real.f90:(.text+0x46d1b): undefined reference to pgf90_auto_alloc’
module_initialize_real.f90:(.text+0x46d3a): undefined reference to pgf90_auto_alloc' module_initialize_real.f90:(.text+0x46d59): undefined reference to pgf90_auto_alloc’
module_initialize_real.f90:(.text+0x46d78): undefined reference to pgf90_auto_alloc' ../dyn_em/module_initialize_real.o:module_initialize_real.f90:(.text+0x46d97): more undefined references to pgf90_auto_alloc’ follow
…/dyn_em/module_initialize_real.o: In function module_initialize_sfcprs_': module_initialize_real.f90:(.text+0x483ea): undefined reference to pgf90_auto_dealloc’
module_initialize_real.f90:(.text+0x48402): undefined reference to pgf90_auto_dealloc' module_initialize_real.f90:(.text+0x4841a): undefined reference to pgf90_auto_dealloc’
module_initialize_real.f90:(.text+0x48432): undefined reference to pgf90_auto_dealloc' module_initialize_real.f90:(.text+0x4844a): undefined reference to pgf90_auto_dealloc’
…/dyn_em/module_initialize_real.o:module_initialize_real.f90:(.text+0x48462): more undefined references to pgf90_auto_dealloc' follow libwrflib.a(module_dm.o): In function module_dm_wrf_dm_maxval_real_’:
module_dm.f90:(.text+0x3c96): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x3cb9): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x3dfa): undefined reference to pgf90_auto_dealloc' module_dm.f90:(.text+0x3e0f): undefined reference to pgf90_auto_dealloc’
libwrflib.a(module_dm.o): In function module_dm_wrf_dm_maxval_doubleprecision_': module_dm.f90:(.text+0x3e56): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x3e79): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x3fab): undefined reference to pgf90_auto_dealloc’
module_dm.f90:(.text+0x3fc0): undefined reference to pgf90_auto_dealloc' libwrflib.a(module_dm.o): In function module_dm_wrf_dm_maxval_integer_’:
module_dm.f90:(.text+0x4006): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x4029): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x414d): undefined reference to pgf90_auto_dealloc' module_dm.f90:(.text+0x4162): undefined reference to pgf90_auto_dealloc’
libwrflib.a(module_dm.o): In function module_dm_wrf_dm_minval_real_': module_dm.f90:(.text+0x41a6): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x41c9): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x430e): undefined reference to pgf90_auto_dealloc’
module_dm.f90:(.text+0x4323): undefined reference to pgf90_auto_dealloc' libwrflib.a(module_dm.o): In function module_dm_wrf_dm_minval_doubleprecision_’:
module_dm.f90:(.text+0x4366): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x4389): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x44cf): undefined reference to pgf90_auto_dealloc' module_dm.f90:(.text+0x44e4): undefined reference to pgf90_auto_dealloc’
libwrflib.a(module_dm.o): In function module_dm_wrf_dm_minval_integer_': module_dm.f90:(.text+0x4526): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x4549): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x4685): undefined reference to pgf90_auto_dealloc’
module_dm.f90:(.text+0x469a): undefined reference to pgf90_auto_dealloc' libwrflib.a(module_dm.o): In function module_dm_get_full_obs_vector_’:
module_dm.f90:(.text+0x477a): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x4796): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x47b2): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x47ce): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x47ea): undefined reference to pgf90_auto_alloc' libwrflib.a(module_dm.o):module_dm.f90:(.text+0x4806): more undefined references to pgf90_auto_alloc’ follow
libwrflib.a(module_dm.o): In function module_dm_get_full_obs_vector_': module_dm.f90:(.text+0x51b3): undefined reference to pgf90_auto_dealloc’
module_dm.f90:(.text+0x51cb): undefined reference to pgf90_auto_dealloc' module_dm.f90:(.text+0x51e3): undefined reference to pgf90_auto_dealloc’
module_dm.f90:(.text+0x51fb): undefined reference to pgf90_auto_dealloc' module_dm.f90:(.text+0x5213): undefined reference to pgf90_auto_dealloc’
libwrflib.a(module_dm.o):module_dm.f90:(.text+0x522b): more undefined references to pgf90_auto_dealloc' follow libwrflib.a(module_dm.o): In function write_68_’:
module_dm.f90:(.text+0x583a): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x5c75): undefined reference to pgf90_auto_dealloc’
libwrflib.a(module_dm.o): In function wrf_patch_to_global_generic_': module_dm.f90:(.text+0x612f): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x6190): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x71e5): undefined reference to pgf90_auto_dealloc’
module_dm.f90:(.text+0x71fd): undefined reference to pgf90_auto_dealloc' libwrflib.a(module_dm.o): In function wrf_global_to_patch_generic_’:
module_dm.f90:(.text+0x80bf): undefined reference to pgf90_auto_alloc' module_dm.f90:(.text+0x8120): undefined reference to pgf90_auto_alloc’
module_dm.f90:(.text+0x9110): undefined reference to pgf90_auto_dealloc' module_dm.f90:(.text+0x9128): undefined reference to pgf90_auto_dealloc’
libwrflib.a(module_dm.o): In function feedback_domain_em_part2_': module_dm.f90:(.text+0x87b9a): undefined reference to em_cd_feedback_mask_’
module_dm.f90:(.text+0x87c58): undefined reference to em_cd_feedback_mask_' module_dm.f90:(.text+0x87d53): undefined reference to em_cd_feedback_mask_’
module_dm.f90:(.text+0x87e4e): undefined reference to em_cd_feedback_mask_' module_dm.f90:(.text+0x87f4e): undefined reference to em_cd_feedback_mask_’
libwrflib.a(module_dm.o):module_dm.f90:(.text+0x8804e): more undefined references to em_cd_feedback_mask_' follow libwrflib.a(module_io_quilt.o): In function module_wrf_quilt_setup_quilt_servers_’:
module_io_quilt.f90:(.text+0x189): undefined reference to pgf90_auto_alloc' module_io_quilt.f90:(.text+0x642): undefined reference to pgf90_auto_dealloc’
libwrflib.a(module_io_quilt.o): In function wrf_quilt_put_dom_ti_logical_': module_io_quilt.f90:(.text+0x530c): undefined reference to pgf90_auto_alloc’
module_io_quilt.f90:(.text+0x537c): undefined reference to pgf90_auto_dealloc' libwrflib.a(mediation_integrate.o): In function med_nest_initial_’:
mediation_integrate.f90:(.text+0x16a8): undefined reference to store_terrain_' mediation_integrate.f90:(.text+0x18c1): undefined reference to store_terrain_’
mediation_integrate.f90:(.text+0x1b21): undefined reference to store_terrain_' mediation_integrate.f90:(.text+0x1c92): undefined reference to input_terrain_rsmas_’
mediation_integrate.f90:(.text+0x1e23): undefined reference to blend_terrain_' mediation_integrate.f90:(.text+0x203c): undefined reference to blend_terrain_’
mediation_integrate.f90:(.text+0x229c): undefined reference to blend_terrain_' libwrflib.a(mediation_integrate.o): In function init_domain_constants_’:
mediation_integrate.f90:(.text+0x5084): undefined reference to init_domain_constants_em_' libwrflib.a(mediation_force_domain.o): In function med_force_domain_’:
mediation_force_domain.f90:(.text+0xf8f): undefined reference to couple_or_uncouple_em_' mediation_force_domain.f90:(.text+0x2364): undefined reference to couple_or_uncouple_em_’
mediation_force_domain.f90:(.text+0x5f24): undefined reference to couple_or_uncouple_em_' mediation_force_domain.f90:(.text+0x7300): undefined reference to couple_or_uncouple_em_’
libwrflib.a(mediation_feedback_domain.o): In function med_feedback_domain_': mediation_feedback_domain.f90:(.text+0x3f7d): undefined reference to update_after_feedback_em_’
libwrflib.a(solve_interface.o): In function solve_interface_': solve_interface.f90:(.text+0xe18): undefined reference to solve_em_’
libwrflib.a(start_domain.o): In function start_domain_': start_domain.f90:(.text+0xde8): undefined reference to start_domain_em_’
libwrflib.a(init_modules.o): In function init_modules_': init_modules.f90:(.text+0x64): undefined reference to init_modules_em_’
libwrflib.a(interp_fcn.o): In function interp_fcn_': interp_fcn.f90:(.text+0x11b): undefined reference to pgf90_auto_alloc’
interp_fcn.f90:(.text+0x14d): undefined reference to pgf90_auto_alloc' interp_fcn.f90:(.text+0x963): undefined reference to pgf90_auto_dealloc’
interp_fcn.f90:(.text+0x974): undefined reference to pgf90_auto_dealloc' libwrflib.a(interp_fcn.o): In function bdy_interp1_’:
interp_fcn.f90:(.text+0x2a1f): undefined reference to pgf90_auto_alloc' interp_fcn.f90:(.text+0x2a3e): undefined reference to pgf90_auto_alloc’
interp_fcn.f90:(.text+0x2a5a): undefined reference to pgf90_auto_alloc' interp_fcn.f90:(.text+0x3ada): undefined reference to pgf90_auto_dealloc’
interp_fcn.f90:(.text+0x3aeb): undefined reference to pgf90_auto_dealloc' interp_fcn.f90:(.text+0x3afc): undefined reference to pgf90_auto_dealloc’
libwrflib.a(interp_fcn.o): In function sm121_': interp_fcn.f90:(.text+0x9af4): undefined reference to pgf90_auto_alloc’
interp_fcn.f90:(.text+0xa0fe): undefined reference to pgf90_auto_dealloc' libwrflib.a(interp_fcn.o): In function smdsm_’:
interp_fcn.f90:(.text+0xa1a4): undefined reference to pgf90_auto_alloc' interp_fcn.f90:(.text+0xa74e): undefined reference to pgf90_auto_dealloc’
libwrflib.a(sint.o): In function sint_': sint.f90:(.text+0x8d): undefined reference to pgf90_auto_alloc’
sint.f90:(.text+0xac): undefined reference to pgf90_auto_alloc' sint.f90:(.text+0xd9): undefined reference to pgf90_auto_alloc’
sint.f90:(.text+0xf8): undefined reference to pgf90_auto_alloc' sint.f90:(.text+0x117): undefined reference to pgf90_auto_alloc’
libwrflib.a(sint.o):sint.f90:(.text+0x136): more undefined references to pgf90_auto_alloc' follow libwrflib.a(sint.o): In function sint_’:
sint.f90:(.text+0x167a): undefined reference to pgf90_auto_dealloc' sint.f90:(.text+0x168b): undefined reference to pgf90_auto_dealloc’
sint.f90:(.text+0x169c): undefined reference to pgf90_auto_dealloc' sint.f90:(.text+0x16ad): undefined reference to pgf90_auto_dealloc’
sint.f90:(.text+0x16be): undefined reference to pgf90_auto_dealloc' libwrflib.a(sint.o):sint.f90:(.text+0x16cf): more undefined references to pgf90_auto_dealloc’ follow
libwrflib.a(sint.o): In function sintb_': sint.f90:(.text+0x17ad): undefined reference to pgf90_auto_alloc’
sint.f90:(.text+0x17cc): undefined reference to pgf90_auto_alloc' sint.f90:(.text+0x17f9): undefined reference to pgf90_auto_alloc’
sint.f90:(.text+0x1818): undefined reference to pgf90_auto_alloc' sint.f90:(.text+0x1837): undefined reference to pgf90_auto_alloc’
libwrflib.a(sint.o):sint.f90:(.text+0x1856): more undefined references to pgf90_auto_alloc' follow libwrflib.a(sint.o): In function sintb_’:
sint.f90:(.text+0x2af2): undefined reference to pgf90_auto_dealloc' sint.f90:(.text+0x2b03): undefined reference to pgf90_auto_dealloc’
sint.f90:(.text+0x2b14): undefined reference to pgf90_auto_dealloc' sint.f90:(.text+0x2b25): undefined reference to pgf90_auto_dealloc’
sint.f90:(.text+0x2b36): undefined reference to pgf90_auto_dealloc' libwrflib.a(sint.o):sint.f90:(.text+0x2b47): more undefined references to pgf90_auto_dealloc’ follow
libwrflib.a(module_tiles.o): In function module_tiles_set_tiles_masked_': module_tiles.f90:(.text+0x22f8): undefined reference to pgf90_auto_alloc’
module_tiles.f90:(.text+0x269d): undefined reference to pgf90_auto_dealloc' ../external/esmf_time_f90/libesmf_time.a(ESMF_Clock.o): In function esmf_clockmod_esmf_clockgetalarmlist_’:
ESMF_Clock.f:(.text+0xb2c): undefined reference to pghpf_ptr_assn' ../external/esmf_time_f90/libesmf_time.a(Meat.o): In function timegetmonth_’:
Meat.f:(.text+0xc51): undefined reference to pghpf_ptr_assn' Meat.f:(.text+0xc84): undefined reference to pghpf_ptr_assn’
…/external/esmf_time_f90/libesmf_time.a(Meat.o): In function timegetdayofmonth_': Meat.f:(.text+0xe3f): undefined reference to pghpf_ptr_assn’
Meat.f:(.text+0xe76): undefined reference to pghpf_ptr_assn' ../external/esmf_time_f90/libesmf_time.a(Meat.o):Meat.f:(.text+0x1048): more undefined references to pghpf_ptr_assn’ follow
make[1]: [em_real] Error 2 (ignored)

Hi Jeff,

These symbols are all new to 7.2 release. So my best guess is that you did successfully compile with 7.2 but are linking with the 7.0 libraries. Can you please post your your link command excluding the objects? Also, try adding the flag “-v” to the link. This is ‘verbose’ mode and will show you exactly which libraries are being used.

  • Mat

Hi, Mat
Thanks for your reply.
I switched from 7.2 back to 7.0. It then worked.
Actually, I have not figured out how to do what you have told me in WRF.
I will post updates once I figure out what’s going on there.

Jeff