Skip to content

Commit

Permalink
Merge pull request #61 from ecmwf-ifs/naml-loki-config-update
Browse files Browse the repository at this point in the history
Loki config update
  • Loading branch information
reuterbal authored Dec 19, 2023
2 parents 22fc989 + cbef64e commit 3d1a5f4
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 45 deletions.
91 changes: 67 additions & 24 deletions src/cloudsc_loki/cloudsc_cuf_loki.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
derived_types = ['TECLDP']

[dic2p]
NLEV = 137

[default]
# Specifies the behaviour of auto-expanded routines
role = 'kernel'
Expand All @@ -18,25 +13,73 @@ disable = ['timer%start', 'timer%end', 'timer%thread_start', 'timer%thread_end',
'performance_timer%thread_log', 'performance_timer%print_performance']

# Define entry point for call-tree transformation
[[routine]]
name = 'cuf_cloudsc_driver'
[routines]

[routines.cuf_cloudsc_driver]
role = 'driver'
expand = true

[[dimension]]
name = 'horizontal'
size = 'KLON'
index = 'JL'
bounds = ['KIDIA', 'KFDIA']
aliases = ['NPROMA', 'KDIM%KLON']

[[dimension]]
name = 'vertical'
size = 'KLEV'
index = 'JK'

[[dimension]]
name = 'block_dim'
size = 'NGPBLKS'
index = 'IBL'
aliases = ['JKGLO']

# Define indices and bounds for array dimensions
[dimensions]

[dimensions.horizontal]
size = 'KLON'
index = 'JL'
bounds = ['KIDIA', 'KFDIA']
aliases = ['NPROMA', 'KDIM%KLON']

[dimensions.vertical]
size = 'KLEV'
index = 'JK'

[dimensions.block_dim]
size = 'NGPBLKS'
index = 'IBL'
aliases = ['JKGLO']


# Define specific transformation settings
[transformations]

# Loki-SCC-CUF family
# -----------------------------------------
# For these, we need to explicitly define the "transformation_type"
# and provide the names of derived types for extracting device code.
#
# Please note that these are intended for eventual refactoring!
[transformations.cuf-hoist]
classname = 'SccCufTransformation'
module = 'transformations.scc_cuf'
[transformations.cuf-hoist.options]
transformation_type = 'hoist'
horizontal = '%dimensions.horizontal%'
vertical = '%dimensions.vertical%'
block_dim = '%dimensions.block_dim%'
derived_types = ['TECLDP']

[transformations.cuf-dynamic]
classname = 'SccCufTransformation'
module = 'transformations.scc_cuf'
[transformations.cuf-dynamic.options]
transformation_type = 'dynamic'
horizontal = '%dimensions.horizontal%'
vertical = '%dimensions.vertical%'
block_dim = '%dimensions.block_dim%'
derived_types = ['TECLDP']

[transformations.cuf-parametrise]
classname = 'SccCufTransformation'
module = 'transformations.scc_cuf'
[transformations.cuf-parametrise.options]
transformation_type = 'parametrise'
horizontal = '%dimensions.horizontal%'
vertical = '%dimensions.vertical%'
block_dim = '%dimensions.block_dim%'
derived_types = ['TECLDP']

# For SCC-CUF-parametrise we need to define the
# in-source replacement via "dic2p".
[transformations.ParametriseTransformation]
module = 'loki.transform'
options = { dic2p = {NLEV = 137} }
44 changes: 23 additions & 21 deletions src/cloudsc_loki/cloudsc_loki.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,26 @@ disable = ['performance_timer%start', 'performance_timer%end', 'performance_time
'performance_timer%thread_log', 'performance_timer%print_performance']

# Define entry point for call-tree transformation
[[routine]]
name = 'cloudsc_driver'
role = 'driver'
expand = true

[[dimension]]
name = 'horizontal'
size = 'KLON'
index = 'JL'
bounds = ['KIDIA', 'KFDIA']
aliases = ['NPROMA', 'KDIM%KLON']

[[dimension]]
name = 'vertical'
size = 'KLEV'
index = 'JK'

[[dimension]]
name = 'block_dim'
size = 'NGPBLKS'
index = 'IBL'
[routines]

[routines.cloudsc_driver]
role = 'driver'
expand = true


# Define indices and bounds for array dimensions
[dimensions]

[dimensions.horizontal]
size = 'KLON'
index = 'JL'
bounds = ['KIDIA', 'KFDIA']
aliases = ['NPROMA', 'KDIM%KLON']

[dimensions.vertical]
size = 'KLEV'
index = 'JK'

[dimensions.block_dim]
size = 'NGPBLKS'
index = 'IBL'

0 comments on commit 3d1a5f4

Please sign in to comment.