From c38fc45f2b8b2adff6e6902ff72bd67cc8faa11c Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Wed, 11 Feb 2026 14:37:07 +0000 Subject: [PATCH 1/2] Lift adjustable settings into flag which can be adjusted --- .../build/psyclone_transmute.mk | 10 +++++++--- .../build/psyclone_transmute_pass.mk | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/interfaces/physics_schemes_interface/build/psyclone_transmute.mk b/interfaces/physics_schemes_interface/build/psyclone_transmute.mk index aa704fa70..ff8c14c1a 100644 --- a/interfaces/physics_schemes_interface/build/psyclone_transmute.mk +++ b/interfaces/physics_schemes_interface/build/psyclone_transmute.mk @@ -13,6 +13,10 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include # Set the DSL Method in use to collect the correct transformation files. DSL := transmute +# Set default psyclone transmute command additional options +PSYCLONE_TRANSMUTE_EXTRAS ?= -l all +# + # Find the specific files we wish to pre-processed and PSyclone from physics source # Set our target dependency to the version of the file we are to generate after # the psycloning step. @@ -54,9 +58,9 @@ psyclone: $(SOURCE_F_FILES) $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/%.py echo PSyclone with file override script $(OPTIMISATION_PATH_PSY)/$(DSL)/$*.py on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ - -l all \ -s $(OPTIMISATION_PATH_PSY)/$(DSL)/$*.py \ -o $(SOURCE_DIR)/$*.f90 \ + $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< # Where a local optimisation script exists, use it. @@ -65,9 +69,9 @@ $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/%.py $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $$(dir $$(OPTIMISATION_PATH_PSY)/$$(DSL)/$$*)local.py echo PSyclone with local script $(dir $(OPTIMISATION_PATH_PSY)/$(DSL)/$*)local.py on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ - -l all \ -s $(dir $(OPTIMISATION_PATH_PSY)/$(DSL)/$*)local.py \ -o $(SOURCE_DIR)/$*.f90 \ + $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< # Where a global optimisation script exists, use it. @@ -75,7 +79,7 @@ $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $$(dir $$(OPTIMISATION_PATH_PSY)/$$(DS $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/global.py echo PSyclone with global script $(OPTIMISATION_PATH_PSY)/$(DSL)/global.py on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ - -l all \ -s $(OPTIMISATION_PATH_PSY)/$(DSL)/global.py \ -o $(SOURCE_DIR)/$*.f90 \ + $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< diff --git a/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk b/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk index ad9e4908e..5b1882421 100644 --- a/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk +++ b/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk @@ -13,6 +13,10 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include # Set the DSL Method in use to collect the correct transformation files. DSL := transmute +# Set default psyclone transmute command additional options +PSYCLONE_TRANSMUTE_EXTRAS ?= -l all +# + # Find the specific files we wish to pre-processed and PSyclone from physics source # Set our target dependency to the version of the file we are to generate after # the psycloning step. @@ -35,6 +39,6 @@ psyclone_pass: $(SOURCE_F_FILES_PASS) $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 echo PSyclone pass with no optimisation applied, OMP and Clauses removed on $< PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \ - -l all \ -o $(SOURCE_DIR)/$*.f90 \ + $(PSYCLONE_TRANSMUTE_EXTRAS) \ $< From 22f669c261749e51a5afcf292e29c75c11b2bd13 Mon Sep 17 00:00:00 2001 From: MetBenjaminWent Date: Thu, 12 Feb 2026 13:27:48 +0000 Subject: [PATCH 2/2] Update comment --- .../physics_schemes_interface/build/psyclone_transmute.mk | 2 +- .../physics_schemes_interface/build/psyclone_transmute_pass.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/physics_schemes_interface/build/psyclone_transmute.mk b/interfaces/physics_schemes_interface/build/psyclone_transmute.mk index ff8c14c1a..55dab07a2 100644 --- a/interfaces/physics_schemes_interface/build/psyclone_transmute.mk +++ b/interfaces/physics_schemes_interface/build/psyclone_transmute.mk @@ -13,7 +13,7 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include # Set the DSL Method in use to collect the correct transformation files. DSL := transmute -# Set default psyclone transmute command additional options +# Set default PSyclone transmute command additional options PSYCLONE_TRANSMUTE_EXTRAS ?= -l all # diff --git a/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk b/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk index 5b1882421..29ca28d04 100644 --- a/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk +++ b/interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk @@ -13,7 +13,7 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include # Set the DSL Method in use to collect the correct transformation files. DSL := transmute -# Set default psyclone transmute command additional options +# Set default PSyclone transmute command additional options PSYCLONE_TRANSMUTE_EXTRAS ?= -l all #