Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Undefined symbols cesm2.1.1 on a Mac

I'm attempting to build a cesm2.1.1 case on a 2019 Mac Pro running Catalina with the Intel compiler v19.1.0.166. I added my machine specfics to config_machines.xml and config_compilers.xml. The case is:

create_newcase --case cam6_fv2deg_mar2022 --res f19_f19_mg17 --compset F2000climo --machine tundra --run-unsupported

I didn't add any source code changes to SourceMods, nor any changes to the user_nl_xxx files.

All of the individual model components get built successfully, but then I get undefined symbols in the link step. The first of the errors are surprising to me as they are seemingly benign pieces of code from the CLM:

Undefined symbols for architecture x86_64:
"_clm_varorb_mp_eccen_", referenced from:
_lnd_comp_mct_mp_lnd_run_mct_ in libclm.a(lnd_comp_mct.o)
_lnd_comp_mct_mp_lnd_init_mct_ in libclm.a(lnd_comp_mct.o)
_clm_initializemod_mp_initialize2_ in libclm.a(clm_initializeMod.o)
"_clm_varorb_mp_lambm0_", referenced from:
_lnd_comp_mct_mp_lnd_run_mct_ in libclm.a(lnd_comp_mct.o)
_lnd_comp_mct_mp_lnd_init_mct_ in libclm.a(lnd_comp_mct.o)
_clm_initializemod_mp_initialize2_ in libclm.a(clm_initializeMod.o)
"_clm_varorb_mp_mvelpp_", referenced from:
_lnd_comp_mct_mp_lnd_run_mct_ in libclm.a(lnd_comp_mct.o)
_lnd_comp_mct_mp_lnd_init_mct_ in libclm.a(lnd_comp_mct.o)
_clm_initializemod_mp_initialize2_ in libclm.a(clm_initializeMod.o)
"_clm_varorb_mp_obliqr_", referenced from:
_lnd_comp_mct_mp_lnd_run_mct_ in libclm.a(lnd_comp_mct.o)
_lnd_comp_mct_mp_lnd_init_mct_ in libclm.a(lnd_comp_mct.o)
_clm_driver_mp_clm_drv_ in libclm.a(clm_driver.o)
_clm_initializemod_mp_initialize2_ in libclm.a(clm_initializeMod.o)

Any ideas?

Thanks,
Mark Branson
 

Attachments

  • config_compilers.xml.txt
    42.5 KB · Views: 1
  • mct.bldlog.220411-142423.txt
    12.3 KB · Views: 0
  • lnd.bldlog.220411-142423.txt
    365 bytes · Views: 2
  • ice.bldlog.220411-142423.txt
    154.1 KB · Views: 1
  • csm_share.bldlog.220411-142423.txt
    1 KB · Views: 1
  • cesm.bldlog.220411-142423.txt
    136.7 KB · Views: 2
  • config_machines.xml.txt
    102.4 KB · Views: 4

jedwards

CSEG and Liaisons
Staff member
Hi Mark,

I don't see any problems with the config_machines.xml but the lnd.bldlog that you provided is empty. I also looked at the
cice errors and can't make sense of them. It looks like it's looking for a routine ice_scam_mp_scmlat but the closest thing to
that is a module variable scmlat in the cice ice_scam.F90 file which was apparently compiled correctly.
 
Oops, sorry about that. Here's a new set of log files where the lnd bld log is complete.
There's also a multitude of rrtmg undefined symbols that also don't make any sense either.
 

Attachments

  • cesm.bldlog.220411-152003.txt
    136.7 KB · Views: 0
  • ice.bldlog.220411-152003.txt
    154.1 KB · Views: 1
  • lnd.bldlog.220411-152003.txt
    651.8 KB · Views: 1
  • atm.bldlog.220411-152003.txt.gz
    33.4 KB · Views: 1

jedwards

CSEG and Liaisons
Staff member
I wonder if it has something to do with the ar command on Mac. At the end of each.bldlog I see:

ar: creating archive /Users/mark/projects/scratch/cam6_fv2deg_mar2022/bld/lib/libatm.a

I'm used to seeing more verbose output, listing each file added to the library. I don't know, I'm afraid you've
got me stumped - have you tried with gnu compilers on this system?
 
Well, if it's any help, here's the output from doing the nm command on the libclm.a that got created on my Mac. I've also attached a corresponding one that I got from compiling the same compset with the Intel compiler on Cheyenne.
I've haven't tried the gnu compilers on this Mac desktop. I actually figured Intel would be easy since it's the default compiler on Cheyenne. But I suppose I could download the gnu suite of compilers and give them a try.
 

Attachments

  • nm-libclm-tundra.txt.gz
    370.4 KB · Views: 0
  • nm-libclm-cys.txt.gz
    329.5 KB · Views: 0

jedwards

CSEG and Liaisons
Staff member
There is a generic mac machine called homebrew defined in config_machines.xml
I don't have any idea why intel19 isn't working - you could also try the latest intel compiler
since it no longer requires a license.
 
I was finally able to solve the problem. Turns out it's a Mac-specific issue having to do with modules that only declare variables and don't contain any subroutines or functions. You have to do a ranlib -c on all of the component libraries. So I was finally able to get it to compile successfully with the Intel compiler.

Here's a link to the useful article that I found:

--Mark
 
Top