Avoiding recompilation

Hi,
I am planning to run a bunch of short atmospheric model simulations which only differ in some namelist parameters. For a short atmospheric model simulation, running fcm_make_um2 takes a large fraction of the total run time. Is there a way of speeding this up? For example, using an existing binary?
ta
Simon

Hi Simon,

You can use prebuilds.
In the suite.rc file set the PREBUILD environment variable to point to the fcm_make_um directory on PUMA2 of the first suite.

E.g. to use the build from a suite called u-aa123 add the 2 lines indicated by <== Add line

    .....
    {% if SITE in DBLE_FCMUM %}
    [[fcm_make_um]]
        inherit = RUN_MAIN, EXTRACT_RESOURCE, UMBUILD
        [[[environment]]]                                                     <== Add line
            PREBUILD = /home/n02/n02/tetts/cylc-run/u-aa123/share/fcm_make_um      <== Add line
    [[fcm_make2_um]]
        inherit = RUN_MAIN, UMBUILD_RESOURCE, UMBUILD
    {% else %}
    ......

Cheers,
Ros.

1 Like

Hi Ros,
thanks for that. Just to check fcm_make2_um is what appears to take the time. Is adding PREBUILD to fcm_make_um telling it to install the prebuild stuff and then use that.
Simon

Hi Simon,

Yes, FCM knows where to find the corresponding fcm_make2_um directory.

Cheers,
Ros.

I must be doing something wrong…
test_case001_191477 (~tetts/rose_optclim/test_case001_191477 on puma) which has some other changes (scripts added to the graph and some parameter changes) but does have the following added:
## allow use of pre-build code,
[[[environment]]]
PREBUILD = /home/n02/n02/tetts/cylc-run/u-db898/share/fcm_make_um

But it seems to be compiling…as it is generating a bunch of .o files in /work/n02/n02/tetts/cylc-run/test_case001_191477/share/fcm_make_um/build-atmos/o/

Simon

Can you give me read access to your NVMe directory: /mnt/lustre/a2fs-nvme/work/n02/n02/tetts please?

Hi Simon,

Actually the suite is set up slightly differently. Remove the PREBUILD you added from the suite.rc file and you can just put the path in the panel ‘fcm_make_um → env → Basic compilation → prebuild’

Cheers,
Ros.

Great. I think I will go back to an earlier suite (which then gets programmatically modified) and do that. My suite dates from late 2023. Should I use that or grab the current AMIP UKESM suite and start with that? My suite is u-da865 and from the info comes from u-cj514/trunk@264964 – fixed problems.

Simon

Going to continue working with u-db898
And can I add itself ( /home/n02/n02/tetts/cylc-run/u-db898/share/fcm_make_um) to the prebuild and run that? If the prebuild doesn’t exist, will it make it or just fail…
Simon

A suite cannot point a prebuild to itself. If you try it, you’ll find it errors.

Cheers,
Ros.