Hi all.
TLDR; Trying to build the UM using fcm_make with a NUOPCY cap fails due to a linker error.
FAIL] /bin/ld: cannot find -lesmf
I’m trying to build a version of the UM executable used in rAM3 using fcm with the NUOPCY cap installed.
I have copied the following files to the ~/cylc-run/<suite-id>/share/fcm_make_um/extract/um/src/control/top_level/
um_esmf_grids.F90
um_esmf.F90
um_cap_import_export.F90
model.F90
Using the fcm-make-on-success.cfg file from the CM3 suite access-cm3-configs as a guide, I’ve added entries for these files to fcm-make2.cfg
build-atmos.prop{fc.flags}[um/src/control/top_level/model.F90] = -i8 -r8 -mcmodel=medium -std08 -g -traceback -assume nosource_include -O2 -fp-model precise -qopenmp
build-atmos.prop{fc.flags}[um/src/control/top_level/um_cap_import_export.F90] = -i8 -r8 -mcmodel=medium -std08 -g -traceback -assume nosource_include -O2 -fp-model precise -qopenmp
build-atmos.prop{fc.flags}[um/src/control/top_level/um_esmf_grids.F90] = -i8 -r8 -mcmodel=medium -std08 -g -traceback -assume nosource_include -O2 -fp-model precise -qopenmp
build-atmos.prop{fc.flags}[um/src/control/top_level/um_esmf.F90] = -i8 -r8 -mcmodel=medium -std08 -g -traceback -assume nosource_include -O2 -fp-model precise -qopenmp
and added -lemsf to the fc flags section
build-atmos.prop{fc.flags-ld} = -lgcom -qopenmp -lnetcdff -lnetcdf -leccodes_f90 -leccodes -qopenmp -mcmodel=medium -shared-intel -lesmf
Using the suggestion from this Hive Post: Model Tools
I added the following to the job script:
module use /g/data/vk83/modules
module load esmf/v8.7.0
The full error message in fcm-make2.log is
[info] shell(256 2.6) mpif90 -obin/um-atmos.exe o/um_main.o -L/home/548/pag548/cylc-run/rCM3-test-UM-NUOPC/work/20220226T0000Z/fcm_make2_um/ywlLGL3Xr2 -lum-atmos -lgcom -qopenmp -lnetcdff -lnetcdf -leccodes_f90 -leccodes -qopenmp -mcmodel=medium -shared-intel -lesmf
[FAIL] mpif90 -obin/um-atmos.exe o/um_main.o -L/home/548/pag548/cylc-run/rCM3-test-UM-NUOPC/work/20220226T0000Z/fcm_make2_um/ywlLGL3Xr2 -lum-atmos -lgcom -qopenmp -lnetcdff -lnetcdf -leccodes_f90 -leccodes -qopenmp -mcmodel=medium -shared-intel -lesmf # rc=1
[FAIL] /bin/ld: cannot find -lesmf
[FAIL] link 12.7 ! um-atmos.exe <- um/src/control/top_level/um_main.F90
Evidently my knowledge of configuring fcm config files isn’t up to scratch.
Thanks in advance.