-
Notifications
You must be signed in to change notification settings - Fork 67
Update docs with changes to Transmute #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
55f716f
4434108
db92a49
1d7a62b
19a9b3d
0c3df00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -47,8 +47,8 @@ filename. :: | |||||||||||||||||||||||||||||||||||||||||||||
| Storing a local transformation script, ``local.py`` | ||||||||||||||||||||||||||||||||||||||||||||||
| +++++++++++++++++++++++++++++++++++++++++++++++++++ | ||||||||||||||||||||||||||||||||||||||||||||||
| All files to be optimised by transmute (see ``psyclone_transmute_file_list.mk``) | ||||||||||||||||||||||||||||||||||||||||||||||
| in ``large_scale_precipitation`` will use this script unless overwritten with | ||||||||||||||||||||||||||||||||||||||||||||||
| a matching filename.:: | ||||||||||||||||||||||||||||||||||||||||||||||
| in the ``large_scale_precipitation`` directory will use this script unless overwritten | ||||||||||||||||||||||||||||||||||||||||||||||
| with a matching source filename.:: | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| optimisation/ | ||||||||||||||||||||||||||||||||||||||||||||||
| └── <platform>/ | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -71,7 +71,7 @@ For a script with matching source filename | |||||||||||||||||||||||||||||||||||||||||||||
| └── ls_ppn.F90 | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| * In the **built** ``lfric_atm`` application, ``ls_ppn.F90`` is found here - | ||||||||||||||||||||||||||||||||||||||||||||||
| * To understand the required path for storing a matching source filename, the build directory of a built application should be consulted. In the **built** ``lfric_atm`` application, ``ls_ppn.F90`` is found here - | ||||||||||||||||||||||||||||||||||||||||||||||
| **use this path**:: | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| <lfric_atm working directory>/ | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -102,25 +102,47 @@ apply module-specific PSyclone transformations. This can be found at:: | |||||||||||||||||||||||||||||||||||||||||||||
| └── build/ | ||||||||||||||||||||||||||||||||||||||||||||||
| └── psyclone_transmute_file_list.mk | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| Within this makefile there are environment variables that hold the names of | ||||||||||||||||||||||||||||||||||||||||||||||
| Fortran modules/transformation scripts that the science interface PSyclone | ||||||||||||||||||||||||||||||||||||||||||||||
| makefile should target. These are:: | ||||||||||||||||||||||||||||||||||||||||||||||
| Within this makefile there are several environment variables which control the | ||||||||||||||||||||||||||||||||||||||||||||||
| how files are passed to PSyclone Transmute. | ||||||||||||||||||||||||||||||||||||||||||||||
| These are: | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| PSYCLONE_PHSYICS_FILES_IMPORT | ||||||||||||||||||||||||||||||||||||||||||||||
| PSYCLONE_PHSYICS_FILES_FCM | ||||||||||||||||||||||||||||||||||||||||||||||
| * ``PSYCLONE_PHYSICS_FILES`` | ||||||||||||||||||||||||||||||||||||||||||||||
| * ``PSYCLONE_PASS_NO_SCRIPT`` | ||||||||||||||||||||||||||||||||||||||||||||||
| * ``TRANSMUTE_INCLUDE_METHOD`` | ||||||||||||||||||||||||||||||||||||||||||||||
| * ``PSYCLONE_DIRECTORIES`` | ||||||||||||||||||||||||||||||||||||||||||||||
| * ``PSYCLONE_PHYSICS_EXCEPTION`` | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| * If the module for which you are adding a transformation script lives in the | ||||||||||||||||||||||||||||||||||||||||||||||
| LFRic Apps directory, please use ``PSYCLONE_PHSYICS_FILES_IMPORT``. This | ||||||||||||||||||||||||||||||||||||||||||||||
| includes any non-LFRic source stored in the ``interfaces/`` directory. | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| * If the module is being imported from UKCA, JULES, CASIM, UM, SOCRATES, or any | ||||||||||||||||||||||||||||||||||||||||||||||
| other code base and does not have a copy in the LFRic Apps repository, please | ||||||||||||||||||||||||||||||||||||||||||||||
| use the ``PSYCLONE_PHSYICS_FILES_FCM`` variable. | ||||||||||||||||||||||||||||||||||||||||||||||
| ``PSYCLONE_PHYSICS_FILES`` is used with ``TRANSMUTE_INCLUDE_METHOD`` ``specify_include``. | ||||||||||||||||||||||||||||||||||||||||||||||
| File names (without the type), which are to be affected by PSyclone, are added to this list. | ||||||||||||||||||||||||||||||||||||||||||||||
MetBenjaminWent marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||
| A PSyclone transformation script is applied to each respective file. | ||||||||||||||||||||||||||||||||||||||||||||||
| The global.py script with be used as default, overwritten with alternatives as advised above. | ||||||||||||||||||||||||||||||||||||||||||||||
| This is also currently the default method as we slowly transformation additional science files | ||||||||||||||||||||||||||||||||||||||||||||||
| across to using PSyclone. | ||||||||||||||||||||||||||||||||||||||||||||||
MetBenjaminWent marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ``PSYCLONE_PASS_NO_SCRIPT`` has been implemented primarily for the ``TRANSMUTE_INCLUDE_METHOD`` | ||||||||||||||||||||||||||||||||||||||||||||||
| ``specify_include``, however can be expanded to either. | ||||||||||||||||||||||||||||||||||||||||||||||
| It controls whether files are to be passed to PSyclone, but not to have a script applied to them. | ||||||||||||||||||||||||||||||||||||||||||||||
| This can be useful to remove existing clauses from a file, but not add anything back. | ||||||||||||||||||||||||||||||||||||||||||||||
| files to be affected this way should only be added to this list, as they will be filtered out of | ||||||||||||||||||||||||||||||||||||||||||||||
| ``PSYCLONE_PHYSICS_FILES`` anyway. | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+125
to
+130
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently I'm not sure specify_exclude actually works for PSYCLONE_PASS_NO_SCRIPT. I've implemented a very minimum viable product currently, whilst FAB/BAF or simular is being developed. I think I wanted to highlight this here somewhat that the intended use is with specify_include at this time.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I wasn't aware of that. Can I suggest modifying the wording to reflect this? Currently, the phrase "can be expanded to either" suggests to me that users can use
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ``TRANSMUTE_INCLUDE_METHOD`` can be set to either ``specify_include`` or ``specify_exclude``. | ||||||||||||||||||||||||||||||||||||||||||||||
| With ``specify_include``, ``PSYCLONE_PHYSICS_FILES`` will be used to define the list of files | ||||||||||||||||||||||||||||||||||||||||||||||
| to be passed to the PSyclone Transmute command, and with ``specify_exclude``, | ||||||||||||||||||||||||||||||||||||||||||||||
| ``PSYCLONE_DIRECTORIES`` and ``PSYCLONE_PHYSICS_EXCEPTION`` will be used. | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ``PSYCLONE_DIRECTORIES`` is used with ``TRANSMUTE_INCLUDE_METHOD`` ``specify_exclude``. | ||||||||||||||||||||||||||||||||||||||||||||||
| It provides a list of directories instead, where the build system populates the list of files to | ||||||||||||||||||||||||||||||||||||||||||||||
| be passed to PSyclone with all of the files in the directory. | ||||||||||||||||||||||||||||||||||||||||||||||
| ``PSYCLONE_PHYSICS_EXCEPTION`` is used to filter the list of files found in each respective | ||||||||||||||||||||||||||||||||||||||||||||||
| ``PSYCLONE_DIRECTORIES`` and remove them. This can often be used with .h files currently. | ||||||||||||||||||||||||||||||||||||||||||||||
MetBenjaminWent marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| Module/transformation script names should be added in the following style (in | ||||||||||||||||||||||||||||||||||||||||||||||
| accordance with GNUMake):: | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| PSYCLONE_PHSYICS_FILES_IMPORT = \ | ||||||||||||||||||||||||||||||||||||||||||||||
| PSYCLONE_PHYSICS_FILES = \ | ||||||||||||||||||||||||||||||||||||||||||||||
| ls_ppn \ | ||||||||||||||||||||||||||||||||||||||||||||||
| lsp_taper_ndrop \ | ||||||||||||||||||||||||||||||||||||||||||||||
| mphys_air_density_mod | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.