The CLAW Compiler is the reference compiler for the CLAW Directive Language. The project can be found here: claw-compiler
The current specification can be found here: CLAW specification document
The specification is written using LaTeX. To generate the PDF document, you
can use pdflatex
with the following command:
cd documentation
pdflatex claw_language_specifications.tex
- Version 0.1:
- Define low-level block transformation.
- Loop transformations.
- Remove transformation.
- Define low-level block transformation.
- Version 0.2:
- Refine low-level transformation from 0.1 if needed.
- Add
collapse
clause to loop-fusion directive.
- Add
- Add missing low-level transformation from the requirements.
- Add loop transformation
loop-hoist
. - Add array notation transformation
array-transform
. - Add claw transformation
kcache
for column caching. - Add claw transformation
call
for on the fly computation (array access to function call).
- Add loop transformation
- Start to abstract low-level transformation.
- Introduction of the
parallelize
directive with thedefine dimension
andforward
clauses
- Introduction of the
- Refine low-level transformation from 0.1 if needed.
- Version 0.3:
- Refine previous iterations, especially
parallelize
directive.
- Refine previous iterations, especially
- Version 0.4:
- Refine previous iterations, especially
parallelize
directive. - Add conditional extraction
if-extract
- Refine previous iterations, especially
- Version 1.1:
- Clause
cleanup
added toloop-hoist
directive
- Clause
- Version 2.0
- Specify how
ELEMENTAL
function behave with SCA. - Introducing Model Configuration
- Introducing
model-data
directive for SCA parallelize
clause is renamed bysca
- New low-level directive
loop-fission
- Directive
array-transform
is renamedexpand
- New clause
blocked
andblock-fct
added tosca foward
- Specify how
The directives are either local or global.
- Local directive: those directives have a limited impact on a local block of code (for example, only in a subroutine)
- Global directive: those directives can have an impact on the whole application.
This language is separated in the followings sections:
- CLAW abstraction
(specific abstraction for climate system modeling build on the top of other
directives)
- k caching (column caching)
- on the fly computation (array access to function call)
- Single Column Abstraction (SCA)
- Loop transformation
- loop fusion
- loop interchange/reordering
- loop extraction
- loop hoisting
- loop fission
- conditional extraction
- OpenACC/OpenMP abstractions/helpers
- array notation to do statement
- conditional primitive directive
- Utilities
- remove
- ignore
- verbatim
CLAW directives can be defined on several line. The syntax is described in the listing below:
!$claw directive options &
!$claw options
The claw directives can be combined together. For example, loop-fusion and loop-interchange can be used together in a group of nested loops.
The interpretation order of the directives is the following:
- ignore
- remove
- primitive
- array-transform
- loop-extract
- loop-hoist
- loop-fusion
- loop-fission
- loop-interchange
- on-the-fly
- kcache
- if-extract
- sca
- formatting transformation (internal transformation only)
Users must be aware that directives transformation are applied sequentially and therefore, a transformation can be performed on already transformed code.
Logo by adrienbachmann.ch