angus-g / mom6-ninja-nci

Painless shell scripts to set up a ninja build of MOM6 on NCI HPC
MIT License
5 stars 8 forks source link

Using scripts to build on non-NCI machines: failure building SIS2-ocean coupled model #7

Open croachutas opened 4 months ago

croachutas commented 4 months ago

Okay, I've tried using these scripts to build MOM6 on a non-NCI machine (workstation ~196GB of RAM) mostly for the hell of it (also as part of revisting ideas for pracs for OUC and maybe the reworked IMAS ocean & ice major). Usual array of messing round with compiler flags (using gcc instead of intel compilers) which seems to have worked out since I can build the ocean only version of MOM6 and it runs with some of the examples.

But building the coupled version with ninja fails with the following error:

[71/350] mpif90 -fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check -Duse_libMPI -Duse_netCDF -DSPMD -D...IS2/src -I/home/croach/MOM6/setup-mom6-nci/src/SIS2/config_src/dynamic_symmetric  -c /home/croach/MOM6/setup-mom6-nci/src/FMS/coupler/ensemble_manager.F90
FAILED: ensemble_manager.o ensemble_manager_mod.mod 
mpif90 -fcray-pointer -fdefault-double-8 -fdefault-real-8 -Waliasing -ffree-line-length-none -fno-range-check -Duse_libMPI -Duse_netCDF -DSPMD -Duse_AM3_physics -D_USE_LEGACY_LAND_ -Duse_deprecated_io  -I../shared -I/usr/include -I/home/croach/MOM6/setup-mom6-nci/src/MOM6/config_src/memory/dynamic_symmetric -I/home/croach/MOM6/setup-mom6-nci/src/MOM6/src/framework -I/home/croach/MOM6/setup-mom6-nci/src/FMS/include -I/home/croach/MOM6/setup-mom6-nci/src/FMS/coupler/include -I/home/croach/MOM6/setup-mom6-nci/src/SIS2/src -I/home/croach/MOM6/setup-mom6-nci/src/SIS2/config_src/dynamic_symmetric  -c /home/croach/MOM6/setup-mom6-nci/src/FMS/coupler/ensemble_manager.F90
/home/croach/MOM6/setup-mom6-nci/src/FMS/coupler/ensemble_manager.F90:34:25:

   34 |   use fms_io_mod, only  : fms_io_set_filename_appendix=>set_filename_appendix
      |                         1
Error: Symbol ‘set_filename_appendix’ referenced at (1) not found in module ‘fms_io_mod’

This compile error seems to suggest it can't find major functions built into FMS.

I'm fairly certain FMS built correctly and I'm pointing ninja to the right place to find it, so any ideas why I'm getting this error?

Edit: Sorry! Just realized I used Ash Barnes's branch (https://github.com/ashjbarnes/setup-mom6-nci) not this version.

angus-g commented 4 months ago

Welcome to the joys of MOM6/FMS compatibility issues. It looks to me like you've possibly built FMS without -Duse_deprecated_io and not FMS2, and you're using a version of MOM6 that still requires that? Although I do see it in the cppdefs for the compile error.

croachutas commented 4 months ago

Thanks! Looks like that was it... Built successfully now but still need to test it. Will let you know if I encounter any further problems.