fab.steps.psyclone#
A preprocessor and code generation step for PSyclone. stfc/PSyclone
Functions
|
|
|
Take out the leading name keyword in calls to invoke(), making temporary, parsable fortran from x90s. |
|
|
|
Psyclone runner step. |
Classes
|
Runtime data for child processes to read. |
- class fab.steps.psyclone.MpCommonArgs(config, analysed_x90, kernel_roots, transformation_script, cli_args, all_kernel_hashes, overrides_folder, override_files)#
Runtime data for child processes to read.
Contains data used to calculate the prebuild hash.
- fab.steps.psyclone.psyclone(config, kernel_roots=None, transformation_script=None, cli_args=None, source_getter=None, overrides_folder=None)#
Psyclone runner step.
Note
This step produces Fortran, so it must be run before the
Analyse
step.This step stores prebuilt results to speed up subsequent builds. To generate the prebuild hashes, it analyses the X90 and kernel files, storing prebuilt results for these also.
Kernel files are just normal Fortran, and the standard Fortran analyser is used to analyse them
- Parameters:
config – The
fab.build_config.BuildConfig
object where we can read settings such as the project workspace folder or the multiprocessing flag.kernel_roots (
Optional
[List
[Path
]]) – Folders containing kernel files. Must be part of the analysed source code. (default:None
)transformation_script (
Optional
[Callable
[[Path
,BuildConfig
],Path
]]) – The function to get Python transformation script. It takes in a file path and the config object, and returns the path of the transformation script or None. If no function is given or the function returns None, no script will be applied and PSyclone still runs. (default:None
)cli_args (
Optional
[List
[str
]]) – Passed through to the psyclone cli tool. (default:None
)source_getter (
Optional
[ArtefactsGetter
]) – Optional override for getting input files from the artefact store. (default:None
)overrides_folder (
Optional
[Path
]) – Optional folder containing hand-crafted override files. Must be part of the subsequently analysed source code. Any file produced by psyclone will be deleted if there is a corresponding file in this folder. (default:None
)
- fab.steps.psyclone.make_parsable_x90(x90_path)#
Take out the leading name keyword in calls to invoke(), making temporary, parsable fortran from x90s.
If present it looks like this:
call invoke( name = "compute_dry_mass", ...
Returns the path of the parsable file.
This function is not slow so we’re not creating prebuilds for this work.
- Return type: