-
Notifications
You must be signed in to change notification settings - Fork 99
Enable jedi_lfric to run lfric_atm forecast configurations #512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 24 commits
42c51b7
3f79afc
f6f1a06
0f9e2be
9bf79cb
5f68c17
70c1ce1
0efabc0
23a5abb
fa5e41d
eaaba2a
3d3e72e
bcad2f5
db5d9a2
ab70eb4
339b0b0
b9da623
6f79e5b
f0261b9
f3090de
80831af
f039571
d240f12
09d22e1
d5a18cd
89c3bba
c51c69c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,12 +20,17 @@ export PSYCLONE_TRANSFORMATION ?= minimum | |
|
|
||
| export PROJECT_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) | ||
|
|
||
| # Note - socrates_interface must come before jules_interface as there are dependencies on each other. | ||
| export INTERNAL_DEPENDENCIES = $(CORE_ROOT_DIR)/infrastructure \ | ||
| $(CORE_ROOT_DIR)/components/driver \ | ||
| $(CORE_ROOT_DIR)/components/science \ | ||
| $(CORE_ROOT_DIR)/components/inventory \ | ||
| $(APPS_ROOT_DIR)/interfaces/jedi_lfric_interface \ | ||
| $(CORE_ROOT_DIR)/components/lfric-xios \ | ||
| $(APPS_ROOT_DIR)/science/shared \ | ||
| $(APPS_ROOT_DIR)/interfaces/socrates_interface \ | ||
| $(APPS_ROOT_DIR)/interfaces/jules_interface \ | ||
| $(APPS_ROOT_DIR)/interfaces/physics_schemes_interface \ | ||
| $(APPS_ROOT_DIR)/science/gungho \ | ||
| $(APPS_ROOT_DIR)/science/linear \ | ||
| $(APPS_ROOT_DIR)/science/adjoint | ||
|
|
@@ -42,7 +47,7 @@ ifneq ("$(PSYCLONE_TRANSFORMATION)","none") | |
| endif | ||
|
|
||
| .PHONY: default | ||
| default: build integration-tests | ||
| default: build | ||
| $(Q)echo > /dev/null | ||
|
|
||
| .PHONY: documentation doc docs | ||
|
|
@@ -51,7 +56,12 @@ documentation doc docs: document-uml document-latex document-api | |
|
|
||
| include $(CORE_ROOT_DIR)/infrastructure/build/lfric.mk | ||
| include $(INTERNAL_DEPENDENCIES:=/build/import.mk) | ||
| -include $(PROJECT_DIR)/build/project.mk | ||
| include build/project.mk | ||
|
|
||
| # Include transmute list only if not using minimum or no transformations | ||
| ifeq ($(filter "$(PSYCLONE_TRANSFORMATION)", "none" "minimum"),) | ||
| include build/psyclone_transmute_file_list.mk | ||
| endif | ||
|
|
||
| ############################################################################## | ||
| # Documentation | ||
|
|
@@ -97,7 +107,7 @@ build: export BIN_DIR ?= $(PROJECT_DIR)/bin | |
| build: export LIB_DIR ?= $(PROJECT_DIR)/lib | ||
| build: export MOD_DIR ?= $(PROJECT_DIR)/mod | ||
| build: export CXX_LINK = TRUE | ||
| build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -print))) | ||
| build: export PROGRAMS := $(basename $(notdir $(shell find source -maxdepth 1 -name '*.[Ff]90' -exec egrep -l "^\s*program" {} \;))) | ||
| build: export PROJECT = $(PROJECT_NAME) | ||
| build: export WORKING_DIR := $(WORKING_DIR)/jedi_lfric_tests | ||
|
|
||
|
|
@@ -118,6 +128,20 @@ build: ALWAYS | |
| $(Q)for SUBPROJECT in $(INTERNAL_DEPENDENCIES) ; do \ | ||
| $(MAKE) $(QUIET_ARG) -f $$SUBPROJECT/build/import.mk ; done | ||
| $(call MESSAGE,========================================) | ||
| $(call MESSAGE,Extracting coupled_interface component) | ||
| $(call MESSAGE,========================================) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ | ||
| SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/coupled_interface/source | ||
| $(call MESSAGE,========================================) | ||
| $(call MESSAGE,Extracting Gungho dynamical core) | ||
| $(call MESSAGE,========================================) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ | ||
| SOURCE_DIR=$(APPS_ROOT_DIR)/science/gungho/source | ||
| $(call MESSAGE,========================================) | ||
| $(call MESSAGE,Extracting UM physics) | ||
| $(call MESSAGE,========================================) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(APPS_ROOT_DIR)/build/extract/extract_physics.mk | ||
| $(call MESSAGE,========================================) | ||
| $(call MESSAGE,Extracting $(PROJECT_NAME)) | ||
| $(call MESSAGE,========================================) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/extract.mk \ | ||
|
|
@@ -127,16 +151,54 @@ build: ALWAYS | |
| $(call MESSAGE,Generating $(PROJECT) namelist loaders) | ||
| $(call MESSAGE,=========================================================) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/configuration.mk \ | ||
| PROJECT=$(PROJECT) \ | ||
| SOURCE_DIR=source \ | ||
| WORKING_DIR=$(WORKING_DIR) \ | ||
| SOURCE_DIR=$(APPS_ROOT_DIR)/science/gungho/source \ | ||
| META_FILE_DIR=$(META_FILE_DIR) | ||
| $(call MESSAGE,========================================) | ||
| $(call MESSAGE,PSycloning interface components) | ||
| $(call MESSAGE,========================================) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \ | ||
| SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/coupled_interface/source \ | ||
| OPTIMISATION_PATH=$(OPTIMISATION_PATH) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \ | ||
| SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/jules_interface/source \ | ||
| OPTIMISATION_PATH=$(OPTIMISATION_PATH) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \ | ||
| SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/socrates_interface/source \ | ||
| OPTIMISATION_PATH=$(OPTIMISATION_PATH) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \ | ||
| SOURCE_DIR=$(APPS_ROOT_DIR)/interfaces/physics_schemes_interface/source \ | ||
| OPTIMISATION_PATH=$(OPTIMISATION_PATH) | ||
| $(call MESSAGE,========================================) | ||
| $(call MESSAGE,PSycloning Gungho dynamical core) | ||
| $(call MESSAGE,========================================) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \ | ||
| SOURCE_DIR=$(APPS_ROOT_DIR)/science/gungho/source \ | ||
| OPTIMISATION_PATH=$(OPTIMISATION_PATH) | ||
| $(call MESSAGE,========================================) | ||
|
Comment on lines
+157
to
+177
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As with previous comment - I can test with this section (157-177) removed if you think that should work? |
||
| $(call MESSAGE,PSycloning $(PROJECT_NAME)) | ||
| $(call MESSAGE,========================================) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(LFRIC_BUILD)/psyclone/psyclone_psykal.mk \ | ||
| SOURCE_DIR=source \ | ||
| OPTIMISATION_PATH=$(OPTIMISATION_PATH) | ||
| $(call MESSAGE,========================================) | ||
| $(call MESSAGE,Preprocess and PSyclone Transmute) | ||
| $(call MESSAGE,========================================) | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(APPS_ROOT_DIR)/interfaces/physics_schemes_interface/build/pre_process_phys.mk \ | ||
| SOURCE_DIR=$(WORKING_DIR) \ | ||
| PSYCLONE_PHYSICS_FILES="$(PSYCLONE_PHYSICS_FILES)" \ | ||
| PSYCLONE_DIRECTORIES="$(PSYCLONE_DIRECTORIES)" \ | ||
| PSYCLONE_PHYSICS_EXCEPTION="$(PSYCLONE_PHYSICS_EXCEPTION)" | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(APPS_ROOT_DIR)/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk \ | ||
| SOURCE_DIR=$(WORKING_DIR) \ | ||
| OPTIMISATION_PATH_PSY=$(APPS_ROOT_DIR)/applications/$(PROJECT)/$(OPTIMISATION_PATH) \ | ||
| PSYCLONE_PASS_NO_SCRIPT="$(PSYCLONE_PASS_NO_SCRIPT)" | ||
| $Q$(MAKE) $(QUIET_ARG) -f $(APPS_ROOT_DIR)/interfaces/physics_schemes_interface/build/psyclone_transmute.mk \ | ||
| SOURCE_DIR=$(WORKING_DIR) \ | ||
| OPTIMISATION_PATH_PSY=$(APPS_ROOT_DIR)/applications/$(PROJECT)/$(OPTIMISATION_PATH) \ | ||
| PSYCLONE_PHYSICS_FILES="$(PSYCLONE_PHYSICS_FILES)" \ | ||
| PSYCLONE_PASS_NO_SCRIPT="$(PSYCLONE_PASS_NO_SCRIPT)" \ | ||
| PSYCLONE_DIRECTORIES="$(PSYCLONE_DIRECTORIES)" \ | ||
| PSYCLONE_PHYSICS_EXCEPTION="$(PSYCLONE_PHYSICS_EXCEPTION)" | ||
| $(call MESSAGE,=========================================================) | ||
| $(call MESSAGE,Analysing $(PROJECT) build dependencies) | ||
| $(call MESSAGE,=========================================================) | ||
|
|
@@ -181,24 +243,8 @@ unit-tests: unit-tests/run | |
| ############################################################################## | ||
| # Integration tests | ||
| # | ||
| integration-tests/%: export BIN_DIR ?= $(PROJECT_DIR)/test | ||
| integration-tests/%: export FFLAGS += -DINT_TEST | ||
| integration-tests/%: export IMPORT_PARTS = $(CORE_ROOT_DIR)/infrastructure \ | ||
| $(CORE_ROOT_DIR)/components/science \ | ||
| $(CORE_ROOT_DIR)/components/driver \ | ||
| $(CORE_ROOT_DIR)/components/inventory \ | ||
| $(CORE_ROOT_DIR)/components/lfric-xios \ | ||
| $(APPS_ROOT_DIR)/interfaces/jedi_lfric_interface \ | ||
| $(APPS_ROOT_DIR)/science/gungho \ | ||
| $(APPS_ROOT_DIR)/science/linear \ | ||
| $(APPS_ROOT_DIR)/science/adjoint | ||
| integration-tests/%: export META_FILE_DIR = rose-meta/jedi_lfric_tests/HEAD | ||
| integration-tests/%: export PROJECT = $(PROJECT_NAME) | ||
| integration-tests/%: export SOURCE_DIR = source | ||
| integration-tests/%: export TEST_DIR = integration-test | ||
| integration-tests/%: export WORKING_DIR := $(WORKING_DIR)/integration-tests | ||
| integration-tests: integration-tests/run | ||
|
|
||
| integration-tests: | ||
| $(call MESSAGE,Testing,"There are no integration tests.") | ||
|
|
||
| ############################################################################## | ||
| # Clean | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| ############################################################################## | ||
| # (c) Crown copyright 2026 Met Office. All rights reserved. | ||
| # The file LICENCE, distributed with this code, contains details of the terms | ||
| # under which the code may be used. | ||
| ############################################################################## | ||
|
|
||
| # NOTE: Import of compile options from LFRic infrastructure is temporarily | ||
| # suspended here as a workaround for #2340 in which application of the | ||
| # -qoverride-limits option was preventing compilation of a UKCA module. | ||
| # include $(LFRIC_BUILD)/compile_options.mk | ||
|
|
||
| $(info UM physics specific compile options) | ||
|
|
||
| include $(PROJECT_DIR)/build/fortran/$(FORTRAN_COMPILER).mk | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this should be needed.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is in the equivalent
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tired removing that but it failed during build so it appears to be needed. The failure relates to code that is now being built. This File seems to include settings that are currently required by lfric-atm. See: |
||
|
|
||
| casim/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| ukca/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| jules/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| socrates/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| legacy/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| AC_assimilation/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| aerosols/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| atmosphere_service/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| boundary_layer/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| carbon/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| convection/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| diffusion_and_filtering/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| dynamics/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| dynamics_advection/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| electric/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| free_tracers/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| gravity_wave_drag/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| idealised/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| large_scale_cloud/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| large_scale_precipitation/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| physics_diagnostics/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| PWS_diagnostics/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| radiation_control/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| stochastic_physics/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| tracer_advection/%.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) | ||
| %/limited_area_constants_mod.o: private FFLAGS_EXTRA = $(FFLAGS_INTEL_FIX_ARG) | ||
|
|
||
| $(info Disable warnings-turned-error caused by undeclared external functions - see ifort.mk) | ||
| %mpi_mod.o: private FFLAGS_EXTRA = $(FFLAGS_INTEL_EXTERNALS) | ||
| socrates/src/radiance_core/%.o: private FFLAGS_EXTRA = $(FFLAGS_INTEL_EXTERNALS) | ||
| socrates/src/interface_core/%.o: private FFLAGS_EXTRA = $(FFLAGS_INTEL_EXTERNALS) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ############################################################################## | ||
| # (c) Crown copyright 2026 Met Office. All rights reserved. | ||
| # The file LICENCE, distributed with this code, contains details of the terms | ||
| # under which the code may be used. | ||
| ############################################################################## | ||
| # Various things specific to the Cray Fortran compiler. | ||
| ############################################################################## | ||
|
|
||
| $(info Project specials for Cray compiler) | ||
|
|
||
| export FFLAGS_UM_PHYSICS = -s real64 | ||
|
|
||
| include $(PROJECT_DIR)/build/fortran/crayftn/$(PROFILE).mk |
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want to override compiler arguments on a per-file bases the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not and Im not sure what I need to do to test that. Can you help with this? I've been following the structure of |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| ############################################################################## | ||
| # (c) Crown copyright 2026 Met Office. All rights reserved. | ||
| # The file LICENCE, distributed with this code, contains details of the terms | ||
| # under which the code may be used. | ||
| ############################################################################## | ||
| ############################################################################## | ||
| # Various things specific to fast-debug lfric_atm when using the | ||
| # Cray Fortran compiler. | ||
| # To override flags specified in LFRic Core, use | ||
| # FFLAGS_SAFE_OPTIMISATION, to add an additional flag to what is specified | ||
| # in Core, use FFLAGS_EXTRA. If you need to add debugging flags to a module, | ||
| # modify FFLAGS_DEBUG for the target module. | ||
| # All flag modification should be `private` so they are not inherited by | ||
| # submodules. | ||
| ############################################################################## | ||
|
|
||
| # ========================================================================== | ||
| # NON-DEBUG FLAGS | ||
| # ========================================================================== | ||
| # UKCA | ||
| %ukca_emiss_mode_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| %ukca_step_control_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
|
|
||
| # UM | ||
| %parcel_ascent_5a.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) -hvector0 | ||
|
|
||
| # LFRic Apps | ||
| %aerosol_ukca_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| %bl_exp_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| %bl_imp_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| %conv_comorph_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| %conv_comorph_kernel_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| %conv_gr_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| %gungho_model_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| %init_aerosol_fields_alg_mod_psy.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| %jules_extra_kernel_mod.o: private FFLAGS_SAFE_OPTIMISATION = -O0 | ||
| large_scale_precipitation/%.o: private FFLAGS_SAFE_OPTIMISATION = -O2 -hfp0 -hflex_mp=strict | ||
|
|
||
| # ========================================================================== | ||
| # DEBUG FLAGS | ||
| # ========================================================================== | ||
| # UKCA | ||
| %ukca_emiss_mode_mod.o: private FFLAGS_DEBUG = -G0 | ||
| %ukca_step_control_mod.o: private FFLAGS_DEBUG = -G0 | ||
|
|
||
| # LFRic Apps | ||
| %aerosol_ukca_alg_mod_psy.o: private FFLAGS_DEBUG = -G0 | ||
| %bl_exp_alg_mod_psy.o: private FFLAGS_DEBUG = -G0 | ||
| %bl_imp_alg_mod_psy.o: private FFLAGS_DEBUG = -G0 | ||
| %conv_comorph_alg_mod_psy.o: private FFLAGS_DEBUG = -G0 | ||
| %conv_comorph_kernel_mod.o: private FFLAGS_DEBUG = -G0 | ||
| %conv_gr_alg_mod_psy.o: private FFLAGS_DEBUG = -G0 | ||
| %gungho_model_mod.o: private FFLAGS_DEBUG = -G0 | ||
| %init_aerosol_fields_alg_mod_psy.o: private FFLAGS_DEBUG = -G0 | ||
| %jules_extra_kernel_mod.o: private FFLAGS_DEBUG = -G0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| ############################################################################## | ||
| # (c) Crown copyright 2026 Met Office. All rights reserved. | ||
| # The file LICENCE, distributed with this code, contains details of the terms | ||
| # under which the code may be used. | ||
| ############################################################################## | ||
| ############################################################################## | ||
| # Various things specific to full-debug lfric_atm when using the | ||
| # Cray Fortran compiler. | ||
| ############################################################################## | ||
|
|
||
| # ========================================================================== | ||
| # NON-DEBUG FLAGS | ||
| # ========================================================================== | ||
|
|
||
| # ========================================================================== | ||
| # DEBUG FLAGS | ||
| # ========================================================================== |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| ############################################################################## | ||
| # (c) Crown copyright 2026 Met Office. All rights reserved. | ||
| # The file LICENCE, distributed with this code, contains details of the terms | ||
| # under which the code may be used. | ||
| ############################################################################## | ||
| ############################################################################## | ||
| # Various things specific to production lfric_atm when using the | ||
| # Cray Fortran compiler. | ||
| ############################################################################## | ||
|
|
||
| # ========================================================================== | ||
| # DIRECTORIES | ||
| # ========================================================================== | ||
| gravity_wave_drag/%.o: private FFLAGS_RISKY_OPTIMISATION = -O2 -hflex_mp=strict | ||
|
|
||
| # ========================================================================== | ||
| # MODULES | ||
| # ========================================================================== | ||
| # UKCA | ||
| %ukca_emiss_mode_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| %ukca_step_control_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
|
|
||
| # UM | ||
| %parcel_ascent_5a.o: private FFLAGS_EXTRA = $(FFLAGS_UM_PHYSICS) -hvector0 | ||
|
|
||
| # LFRic Apps | ||
| %aerosol_ukca_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| %bl_exp_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| %bl_imp_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| %conv_comorph_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| %conv_comorph_kernel_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| %conv_gr_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| %gungho_model_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| %init_aerosol_fields_alg_mod_psy.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| %jules_extra_kernel_mod.o: private FFLAGS_RISKY_OPTIMISATION = -O0 | ||
| large_scale_precipitation/%.o: private FFLAGS_SAFE_OPTIMISATION = -O3 -hipa3 -hflex_mp=conservative |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| ############################################################################## | ||
| # (c) Crown copyright 2026 Met Office. All rights reserved. | ||
| # The file LICENCE, distributed with this code, contains details of the terms | ||
| # under which the code may be used. | ||
| ############################################################################## | ||
| # Various things specific to the GNU Fortran compiler. | ||
| ############################################################################## | ||
|
|
||
| $(info Project specials for GNU compiler) | ||
|
|
||
| export FFLAGS_UM_PHYSICS = -fdefault-real-8 -fdefault-double-8 | ||
| # Most lfric_atm dependencies contain code with implicit lossy conversions and | ||
| # unused variables. | ||
| # We reset the FFLAGS_WARNINGS variable here in order to prevent | ||
| # -Werror induced build failures. | ||
| FFLAGS_WARNINGS = -Wall -Werror=character-truncation -Werror=unused-value \ | ||
| -Werror=tabs | ||
| # But, we can apply some more lfric infrastructure checking to socrates | ||
| FFLAGS_SOCRATES_WARNINGS = -Werror=unused-variable | ||
|
|
||
| science/src/socrates/%.o science/src/socrates/%.mod: private FFLAGS_EXTRA = $(FFLAGS_SOCRATES_WARNINGS) | ||
|
|
||
| # We remove bounds checking (applied by -fcheck=all) and underflow checking. The | ||
| # latter is due to regular permitting of exponents going to zero for small numbers | ||
| # to imply total extinction of radiation passing through a medium | ||
| FFLAGS_RUNTIME = -fcheck=all,no-bounds -ffpe-trap=invalid,zero,overflow | ||
|
|
||
| # The lfric_atm app defines an extra set of debug flags for | ||
| # fast-debug which are the same as the full-debug settings | ||
| # except for some platforms | ||
| ifdef CRAY_ENVIRONMENT | ||
| # On the EXZ these options are switched off for fast-debug | ||
| # due to an unexpected FPE in the NetCDF library | ||
| FFLAGS_FASTD_INIT = | ||
| FFLAGS_FASTD_RUNTIME = | ||
| else | ||
| # Otherwise, use the same as the default full-debug settings | ||
| FFLAGS_FASTD_INIT = $(FFLAGS_INIT) | ||
| FFLAGS_FASTD_RUNTIME = $(FFLAGS_RUNTIME) | ||
| endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
INTERNAL_DEPENDENCIESlist is provided for doing exactly this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted I've been following
lfric_atmin the minimal way possible. I'm not sure what I tried that didn't work but I think I did try to minimize what is included here. Can I clarify on your comment: do you think it should be possible to remove all of the highlighted text (131-144)? I can try that if so.