diff --git a/src/cloudsc_loki/cloudsc_cuf_loki.config b/src/cloudsc_loki/cloudsc_cuf_loki.config index e3addcad..8150ed9e 100644 --- a/src/cloudsc_loki/cloudsc_cuf_loki.config +++ b/src/cloudsc_loki/cloudsc_cuf_loki.config @@ -1,8 +1,3 @@ -derived_types = ['TECLDP'] - -[dic2p] -NLEV = 137 - [default] # Specifies the behaviour of auto-expanded routines role = 'kernel' @@ -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} } diff --git a/src/cloudsc_loki/cloudsc_loki.config b/src/cloudsc_loki/cloudsc_loki.config index d6fda309..6eab8577 100644 --- a/src/cloudsc_loki/cloudsc_loki.config +++ b/src/cloudsc_loki/cloudsc_loki.config @@ -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'