Skip to content

Commit

Permalink
Loki: Add pipeline configuration for C-transpilation
Browse files Browse the repository at this point in the history
  • Loading branch information
mlange05 committed Jan 9, 2025
1 parent d82a892 commit 5658cb3
Showing 1 changed file with 41 additions and 6 deletions.
47 changes: 41 additions & 6 deletions src/cloudsc_loki/cloudsc_loki.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ enable_imports = true # Chase dependencies incurred via imports
# do not attempt to look up the source files for these.
disable = ['timer_mod', 'abort', 'file_io_mod', 'foe*', 'fokoop']

# Prune these moduels from the treeto ensure they are not processed by
# transformations
ignore = ['parkind1', 'yomphyder', 'yoecldp', 'fc*_mod']


# Call tree entry points ("driver" subroutines)
# -------------------------------------------------------------------
Expand All @@ -41,6 +37,28 @@ ignore = ['parkind1', 'yomphyder', 'yoecldp', 'fc*_mod']
role = 'driver'
expand = true

# Explicitly marked "header" modules needed by the C transpilation
# -------------------------------------------------------------------
[routines.yoethf]
role = 'header'
expand = false

[routines.yomcst]
role = 'header'
expand = false

[routines.yoecldp]
role = 'header'
expand = false

[routines.yomphyder]
role = 'header'
expand = false

[routines.parkind1]
role = 'header'
expand = false


# Configuration of "Dimension" variables
# -------------------------------------------------------------------
Expand Down Expand Up @@ -125,10 +143,10 @@ preprocess = true
check_bounds = true


[transformations.InlineTransformation]
[transformations.Inline]
classname = 'InlineTransformation'
module = 'loki.transformations'
[transformations.InlineTransformation.options]
[transformations.Inline.options]
inline_internals = false
inline_marked = true
inline_stmt_funcs = true
Expand All @@ -137,6 +155,15 @@ preprocess = true
resolve_sequence_association = false


[transformations.FortranToC]
classname = 'FortranCTransformation'
module = 'loki.transformations.transpile'

[transformations.FortranISOCWrapper]
classname = 'FortranISOCWrapperTransformation'
module = 'loki.transformations.transpile'


# Loki-SCC family of transformations
# -------------------------------------------------------------------
# A set of transformation passes that transforms SIMD vectorisation
Expand Down Expand Up @@ -195,6 +222,11 @@ preprocess = true
module = 'loki.transformations.build_system'
options = { suffix = '_LOKI', module_suffix = '_MOD' }

[transformations.Dependency_CToF]
classname = 'DependencyTransformation'
module = 'loki.transformations.build_system'
options = { suffix = '_FC', module_suffix = '_MOD' }


# Full transformation pipelines
# -------------------------------------------------------------------
Expand Down Expand Up @@ -226,3 +258,6 @@ preprocess = true

[pipelines.scc-stack]
transformations = ['DataOffload', 'Sanitise', 'SCCStack', 'ModuleWrap', 'Dependency']

[pipelines.c]
transformations = ['Sanitise', 'Inline', 'FortranToC', 'FortranISOCWrapper', 'ModuleWrap', 'Dependency_CToF']

0 comments on commit 5658cb3

Please sign in to comment.