Skip to content

Commit 120708e

Browse files
Lift adjustable psyclone command options into adjustable flag Transmute (#246)
Co-authored-by: Harry Shepherd <[email protected]>
1 parent 5574a8d commit 120708e

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

interfaces/physics_schemes_interface/build/psyclone_transmute.mk

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include
1313
# Set the DSL Method in use to collect the correct transformation files.
1414
DSL := transmute
1515

16+
# Set default PSyclone transmute command additional options
17+
PSYCLONE_TRANSMUTE_EXTRAS ?= -l all
18+
#
19+
1620
# Find the specific files we wish to pre-processed and PSyclone from physics source
1721
# Set our target dependency to the version of the file we are to generate after
1822
# the psycloning step.
@@ -54,9 +58,9 @@ psyclone: $(SOURCE_F_FILES)
5458
$(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/%.py
5559
echo PSyclone with file override script $(OPTIMISATION_PATH_PSY)/$(DSL)/$*.py on $<
5660
PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \
57-
-l all \
5861
-s $(OPTIMISATION_PATH_PSY)/$(DSL)/$*.py \
5962
-o $(SOURCE_DIR)/$*.f90 \
63+
$(PSYCLONE_TRANSMUTE_EXTRAS) \
6064
$<
6165

6266
# Where a local optimisation script exists, use it.
@@ -65,17 +69,17 @@ $(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/%.py
6569
$(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $$(dir $$(OPTIMISATION_PATH_PSY)/$$(DSL)/$$*)local.py
6670
echo PSyclone with local script $(dir $(OPTIMISATION_PATH_PSY)/$(DSL)/$*)local.py on $<
6771
PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \
68-
-l all \
6972
-s $(dir $(OPTIMISATION_PATH_PSY)/$(DSL)/$*)local.py \
7073
-o $(SOURCE_DIR)/$*.f90 \
74+
$(PSYCLONE_TRANSMUTE_EXTRAS) \
7175
$<
7276

7377
# Where a global optimisation script exists, use it.
7478
#
7579
$(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90 $(OPTIMISATION_PATH)/$(DSL)/global.py
7680
echo PSyclone with global script $(OPTIMISATION_PATH_PSY)/$(DSL)/global.py on $<
7781
PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath $(OPTIMISATION_PATH)/$(DSL)):$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \
78-
-l all \
7982
-s $(OPTIMISATION_PATH_PSY)/$(DSL)/global.py \
8083
-o $(SOURCE_DIR)/$*.f90 \
84+
$(PSYCLONE_TRANSMUTE_EXTRAS) \
8185
$<

interfaces/physics_schemes_interface/build/psyclone_transmute_pass.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ TRANSMUTE_INCLUDE_METHOD ?= specify_include
1313
# Set the DSL Method in use to collect the correct transformation files.
1414
DSL := transmute
1515

16+
# Set default PSyclone transmute command additional options
17+
PSYCLONE_TRANSMUTE_EXTRAS ?= -l all
18+
#
19+
1620
# Find the specific files we wish to pre-processed and PSyclone from physics source
1721
# Set our target dependency to the version of the file we are to generate after
1822
# the psycloning step.
@@ -35,6 +39,6 @@ psyclone_pass: $(SOURCE_F_FILES_PASS)
3539
$(SOURCE_DIR)/%.f90: $(SOURCE_DIR)/%.xu90
3640
echo PSyclone pass with no optimisation applied, OMP and Clauses removed on $<
3741
PYTHONPATH=$(LFRIC_BUILD)/psyclone:$(abspath ../../interfaces/physics_schemes_interface/build):$$PYTHONPATH psyclone \
38-
-l all \
3942
-o $(SOURCE_DIR)/$*.f90 \
43+
$(PSYCLONE_TRANSMUTE_EXTRAS) \
4044
$<

0 commit comments

Comments
 (0)