-
Notifications
You must be signed in to change notification settings - Fork 33
1623 add training #3145
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
Merged
Merged
1623 add training #3145
Changes from all commits
Commits
Show all changes
432 commits
Select commit
Hold shift + click to select a range
887f763
#1623 Added second omp example.
hiker 2c2ef99
#1623 Removed unnecessary code.
hiker 7597f95
#1623 Updated example 3.2
hiker 2a223d7
#1623 Fix bug that caused the backend disable validation flag to fail…
hiker 3b2c6ef
#1623 Add inlining & move example [skip ci]
hiker 00276a3
#1623 Updated template for 3.4.
hiker b0d4e46
#1623 Clean all by default.
hiker bd679ce
#1623 Add sympy/varinfo example [skip ci]
hiker 3820bf7
#1623 Added first LFRic example.
hiker ef30b89
#1623 Added full solution for 3.4.
hiker 952bbba
#1623 Added openmp transformation.
hiker 97014dd
#1623 Updated (c) [skip ci]
hiker 8d38774
#1623 Added missing -api parameter in README for the user training.
hiker 11430e3
#1623 Fixed examples (loop fuse was incorrect).
hiker f6e2fba
#1623 Added readme and graphics to LFRic example 4.2.
hiker 46517f6
#1623 Added transform to phony.
hiker 1e55e44
Fixed makefile for 2.18
hiker 965fd81
Added missing file.
hiker 64927b1
Added dependency on script for psyclone transformation.
hiker fea06cf
Added missing TODO comments.
hiker a099e04
#1623 Fixed error in script [skip-ci]
hiker dfb299e
#1623 Add colouring example.
hiker 79667ff
#1623 Fixed missing makefile dependencies.
hiker 2cbf3d0
#1623 Minor updates done during training.
hiker 3661959
Merge branch '1623_add_training' of github.com:stfc/PSyclone into 162…
hiker 6b93d3c
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 42eafc2
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker e88d9c8
#1623 Fixed script that moved the output step and therefore produced …
hiker 8c8a21f
#1623 Improved functionality of parent makefiles.
hiker 6cb191a
#1623 Update to new command line syntax.
hiker 5f5d0b6
#1623 Trigger all tests from higher-level makefiles.
hiker 7415ff7
#1623 New psyclone command line options.
hiker 1390792
#1623 Convert example 2.6 to use new trans parameters.
hiker b65df65
#1623 Fix minor issues.
hiker a86daeb
#1623 Fix minor documentation error.
hiker 3c5f148
#1623 Fixed doxygen docs.
hiker 1c5532d
#1623 Minor updates.
hiker 2369852
#1623 Updated user training to psyclone 3.0
hiker 3723e9c
#1623 Added missing psykal-dsl option.
hiker f93bbbd
#1623 Provide --config option so that training works in editable envi…
hiker bbbc73b
#1623 Minor updates to example.
hiker 1ac47d5
#1623 Updated examples 2.8 to new trans arguments.
hiker a6f3fa3
#1623 Updated more scripts to new parameter.
hiker 7801f27
#1623 Updated example 2.12.
hiker 2e0c905
#1623 Updated example 2.18 to new trans parameter.
hiker cbe37b4
#1623 Clean psydata libraries as well in allclean.
hiker ec96efd
#1623 Updated psyclone scripts.
hiker faa7f4f
#1623 Trigger psyclone on script change, minor script updates.
hiker 57e938b
#1623 Add documentation of the kernel parameters.
hiker 856dab3
#1623 Use common.mk, tests both scripts.
hiker f0fdcc6
#1623 Added a temporary example that does full GOCean kernel inlining…
hiker 8d38d28
#1623 Updated example trans to dynamically try to detect fields that …
hiker 9bd91d3
Merge remote-tracking branch 'origin/1623_add_training' into 1623_add…
hiker 64ec77a
#1623 Updated various READMEs.
hiker 5797ec3
#1623 Updated sympy example.
hiker 0ae2c15
#1623 More minor fixes.
hiker 3337eb7
#1623 Added dataflow graph to README.
hiker cf4cc5c
#1623 Fixed testing of trainings material.
hiker 5c7d954
#1623 Updated Makefiles and readme.
hiker f27f72a
Merge branch '1623_add_training' of github.com:stfc/PSyclone into 162…
hiker c318e68
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 5e93fc8
#1623 Added missing cleaning of gol-lib.
hiker d6b61fc
#1623 Added missing import or InvokeSchedule.
hiker 7ac6f35
#1623 Finished openacc example.
hiker ec6ac18
#1623 Remove schedule view from loop fuse script.
hiker ced3c01
#1623 Added temporary fix for #2732.
hiker 1543b65
#1623 Started to add openp offload example.
hiker 492a52b
#1623 Updated flags for nvidia omp offloading.
hiker c1b4df6
#1623 Add README, create a template for hands-on, and update solution.
hiker 2ed85a0
#1623 Fix minor styling errors.
hiker d550cc2
#1623 Replace iargc with command_argument_count to the code works wit…
hiker 0bc7c87
Merge branch '1623_add_training' of github.com:stfc/PSyclone into 162…
hiker 7c1e5e8
#1623 Fix user training to work with new element order.
hiker 0f0242f
#1623 Fixed lfric part of the advanced training.
hiker 8398cbd
#1623 Added pure to kernels to fix some OpenACC issues.
hiker d997b23
#1623 Removed incorrect 'return' statement.
hiker c67b6dc
#1623 Use env instead of hardcoded python3 path
hiker ab64c77
#1623 Fixed incorrect field names.
hiker a77a8d0
#1623 Fixed layout.
hiker f087de0
#1623 Fixed incorrect field names.
hiker 1cbc56f
#1623 Removed debug output.
hiker 4a5a44d
t fsckMerge branch '1623_add_training' of github.com:stfc/PSyclone in…
hiker 919cca7
Merge remote-tracking branch 'origin/master' into 1623_add_training […
hiker 3c8aafa
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker 769583e
#1623 Fixed warnings in LFRic examples.
hiker b8d42ae
#1623 Updated lfric user training to use new infrastructure and lates…
hiker 215d727
#1623 Updated LFRic examples to work with new infrastructure and PSyc…
hiker e87166c
#1623 Updated var access and dataflow graph to use latest PSyclone.
hiker 19b0760
#1623 Removed unnecessary use statement.
hiker 5713f4f
#1623 Fix transformation examples.
hiker ceab559
#1623 Test all scripts.
hiker c00d659
#1623 Fixed flake8 issues and other outdated code structures for goce…
hiker 2e063c7
#1623 Fix typo in directory name (which means this example was not te…
hiker 1c8493d
#1623 Renamed examples to be consistent and triggered when testing.
hiker b66524c
#1623 Fixed lfric examples.
hiker 3b68646
#1623 Moved to 'new' psyir parameters in transformations.
hiker 38ab9a6
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 1b43159
#1623 More conversion of legacy psy parameter to psyir.
hiker 914aef0
#1623 Updated (c) to 2025
hiker 467e186
#1623 Fixed flake8.
hiker 4ac3d10
#1623 Try to disable commented out link that the link checker complai…
hiker 9bf0251
#1623 By default disable MPI compilation.
hiker 4f3f708
#1623 Fixed incorrect link.
hiker ca6d55e
#1623 Try if renaming the image stops the link checker from complaining.
hiker c340bc6
#1623 Fix link checker again, this time I might have found the right …
hiker 32ca776
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker b84fc62
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker 7595775
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker 4a3df08
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker 4cbddc1
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker de1816b
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 63033e2
#1623 Fix flake8.
hiker b8f9bf1
#1623 Try to make inlining tutorial work again.
hiker 10e99c6
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 4ce0812
Merge branch '3189_sympy_handling_equal' into 1623_add_training
hiker 89494d3
Merge branch '3189_sympy_handling_equal' into 1623_add_training
hiker 3535d22
#1623 Updated and explained full inlining example.
hiker 541331e
#1623 Added separate target for testing full_inlinig, and compile and…
hiker 9374e5d
Merge branch 'master' into 1623_add_training
hiker a464dcb
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 7a3e983
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker fe20bd3
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker bc09da2
#1623 Added better directory names.
hiker b0d06a9
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker bcfb23e
Merge branch '2705_gocean_inlining' into 1623_add_training
hiker eb4d602
#1623 Updated gocean fuse examples with working full inlining.
hiker 275f88a
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 77e1270
#1623 Renamed users to psyclone_for_lfric_users.
hiker 1fe86b8
#1623 Removed unnecessary lfric directory level.
hiker da34626
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 8b02b68
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker d0c18fa
#1623 Added top-level README.
hiker 934feb6
#1623 Use consistent targets test/compile/run in user training.
hiker 6f86771
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 94bfbdd
#1623 Fixed typos in Makefile.
hiker 509f2ca
#1623 Re-implement tests without usage of dl_esm_info to get inlining…
hiker 430d7d7
#1623 Removed dependencies on dl_esm_inf.
hiker 1daa212
#1623 Changed hands-on session to be consistent with solution (i.e. n…
hiker eeb5bb9
#1623 Update more makefile to support new standard targets.
hiker 5583a9e
#1623 nvfortran fixes.
hiker 985a34b
#1623 Improvements to compilation tests.
hiker c73051d
#1623 Fixed typos in Makefiles.
hiker 723f8bb
#1623 Run allclean before compiling tutorials with nvfortran.
hiker 842e7c2
#1623 Fix error in allclean.
hiker 1b23c6b
#1623 Fix missing allclean target.
hiker adf9fff
#1623 Update to use psyir in trans.
hiker 1df8385
#1623 Fix cleanup.
hiker 104bba2
#1623 Code cleanup.
hiker 24fd645
#1623 Removed dummy file.
hiker 5be2e7f
#1623 Removed inlining from 2.6 (it's now in 2.5).
hiker fa703b3
#1623 Updated instructions.
hiker 45dffd6
#1623 Enable MPI by default.
hiker f807698
#1623 Disable MPI tests on gitlab CI.
hiker 4009c96
#1623 Use new VariablesAccessMap
hiker 82d17cd
#1623 Reverted unnecessary change.
hiker bdfe506
#1623 Fix incorrect field names.
hiker 37cbcee
#1623 Print warning message that the mpi example does not run as MPI …
hiker fa17cac
#1623 Better behaviour for CI, including documentation in the README.
hiker 2806ad8
#1623 Updated Makefile documentation.
hiker 7cc2b02
#1623 Fix typo in makefiles.
hiker 1fcbba3
#1623 Fix incorrect transformation name.
hiker 2702b73
#1623 Enable openmp in the default flags to make sure threading is ac…
hiker 628dc20
#1623 Split psydata sections into three different directories.
hiker 82a47fd
#1623 Updates README, fixed makefiles after splitting the example.
hiker c8fc75d
#1623 Support selecting the output format of the driver.
hiker 86a3d90
#1623 Fixed typo in print statement.
hiker fadab8a
#1623 Introduce test and test_run targets, improve common.mk to do mo…
hiker 1baa2c3
#1623 Fix flake8 error.
hiker 53cd484
#1623 Updated tests to use the new test/test_run targets.
hiker 8812657
#1623 Convert more files to improved common.mk, and improve testing w…
hiker 30afe01
#1623 Fix and improve extraction example.
hiker 93dd233
#1623 Fix and improve testing of profiling.
hiker 53df228
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 89c6c17
#1623 Partially fixed value_range_check example.
hiker 425f1cb
#1623 Removed printing of schedule, and use both fuse scripts.
hiker 72b2f90
#1623 Properly test openmp.
hiker 1d5ef2c
#1623 Updated openmp transformation example.
hiker ff22408
#1623 Updated tiling example.
hiker 31fb257
#1623 More work on tiling example.
hiker 3111881
#1623 Update example 3.6
hiker a57bb5a
#1623 Added example to create code.
hiker d863dd5
#1623 Fix test_run for value range check.
hiker 467bfae
#1623 Minor updates to transformationm script.
hiker 3c53bfb
#1623 Fix openacc example.
hiker 6b61637
#1623 Fix crash, not sure why the original code stopped working :(
hiker 740dc5c
#1623 Update .gitignore.
hiker 165b6e3
#1623 Enable OpenMP compilation with gfortran.
hiker ab01223
#1623 Fixed various makefile issues.
hiker ea505fc
#1623 Fixed lfric makefile.
hiker 3b8ffcc
#1623 Try to fix makefile again.
hiker 0470854
#1623 Try to fix more test, esp. running with different compilers.
hiker e59a6de
#1623 Use mpif90 for compilation tests in the tutorial, so the MPI ex…
hiker 6091df5
#1623 Added syntax highlighting, which helps to convert md to pdf usi…
hiker c4da21d
#1623 Added high-level READMEs.
hiker 31a96dd
#1623 Removed debug output.
hiker 861a713
#1623 Added missing newline.
hiker 11752c4
#1623 Addressed issues raised in review.
hiker b380760
#1623 Removed two unnecessary files, and replaced the remaining one w…
hiker 108fb9a
#1623 Started to address reviewers comments.
hiker 6b4ce26
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 8c43ef2
#1623 Fix flake8.
hiker c809814
#1623 Addressed more issues raised in review.
hiker 4c7c825
#1623 Added missing docstrings.
hiker 724f873
#1623 More updated based on code review.
hiker 3f0438d
#1623 Added more doc strings to Fortran files.
hiker f6a10fe
#1623 Removed unused compile target from top level Makefiles.
hiker d4735c8
#1623 Updated README with additional information.
hiker fa501df
#1623 Renamed psyclone_for_lfric_users to lfric_users.
hiker baaed9e
#1623 Add USE_GPU variable to avoid execution of GPU code (e.g. gfort…
hiker 0f6ec90
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker ecbe772
#1623 Start to address reviewers comments.
hiker 7632b22
#1623 Address issues raised in review.
hiker 95095ba
#1623 Start to move images to shared directory.
hiker 23577b9
#1623 Try to use image to avoid scaling of images.
hiker 0cfcc34
#1623 Try different size specification.
hiker df0cb7d
#1623 Give up on using svg files (which do not scale), keep on using …
hiker 1311fec
#1623 Added missing newline.
hiker f71c323
#1623 Addressed reviewers commend in 3.2.
hiker 67180fd
#1623 Renamed .x90 files to .f90, updated Makefiles to also do better…
hiker d4b28cf
#1623 Fixes after renaming.
hiker 339e5c7
#1623 Updated comments in 3.2
hiker 380270f
#1623 Address comments in review.
hiker 8e7316c
#1623 More small updates.
hiker 6913ba6
#1623 Minor updates.
hiker 7eb02ef
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker bc8aa43
#1623 Updated (c) to 2026.
hiker 4052926
#1623 Flake8 fix.
hiker 584051a
#1623 Fix test failures.
hiker d9c3f45
#1623 Renamed .x90 file to .f90.
hiker 11d65f2
#1623 Updated README to describe new makefile.
hiker 7f15f0d
#1623 Rename x90 to f90, add comments.
hiker 5775c45
#1623 Added README for new exercise, and setup a proper template for …
hiker 3d36578
#1623 Fix flake8.
hiker f004a52
#1623 Remove comment indicating the error, since the user is supposed…
hiker 046e084
#1623 Fix failing integration tests.
hiker f6fbe80
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker f62df0e
#1623 Removed OpenMP-specific debug print from kernels, instead add t…
hiker f9e258f
#1623 Fixed typing information.
hiker 6458d10
#1623 Fixed example by properly providing two W0 fields (instead of a…
hiker 2f2a38b
#1623 Removed example7, which has been added as lfric/4.4...
hiker fb1d58f
#1623 Renamed lfric_user example 8 to 7.
hiker debe442
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker e61d2db
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 289e051
#1623 Remove unused, commented out docs.
hiker 42012bd
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker 9ce76e9
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker ef2659d
#1623 Addressed issues raised in review.
hiker cc25877
#1623 Fixed location of OMPParallelTrans.
hiker a6843b0
#1623 Fixed more tests with incorrect import location.
hiker d29c988
#3145 update changelog
arporter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| _build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # PSyclone Tutorials | ||
|
|
||
| This directory contains tutorials and trainings material for PSyclone. | ||
|
|
||
| ## Notebooks (directory `notebooks`) | ||
| This directory contains three notebooks, that can be executed in | ||
| a web browser. Instructions are included in the `notebooks` directory. | ||
|
|
||
| ## Practicals (directory `practicals`) | ||
| This is a selection of hands-on trainings material covering some | ||
| parts of LFRic, and PSyclone's generic code transformation abilities. | ||
|
|
||
| ## Advanced PSyclone Training (directory `training`) | ||
| This directory contains the hands-on parts of a two-day PSyclone | ||
| training course for HPC experts. It is intended for HPC experts, | ||
| i.e. specialist who will be writing optimisations scripts. | ||
| It covers both PSyclone's GOcean and LFRic domains, including an | ||
| introduction to writing code using PSyclone's DSL capabilities, | ||
| and transforming the code. It also contains a section about generic | ||
| code transformations, and advanced topics such as data dependencies | ||
| and using symbolic maths. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # ----------------------------------------------------------------------------- | ||
| # BSD 3-Clause License | ||
| # | ||
| # Copyright (c) 2023-2026, Science and Technology Facilities Council. | ||
| # All rights reserved. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions are met: | ||
| # | ||
| # * Redistributions of source code must retain the above copyright notice, this | ||
| # list of conditions and the following disclaimer. | ||
| # | ||
| # * Redistributions in binary form must reproduce the above copyright notice, | ||
| # this list of conditions and the following disclaimer in the documentation | ||
| # and/or other materials provided with the distribution. | ||
| # | ||
| # * Neither the name of the copyright holder nor the names of its | ||
| # contributors may be used to endorse or promote products derived from | ||
| # this software without specific prior written permission. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
| # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| # POSSIBILITY OF SUCH DAMAGE. | ||
| # ------------------------------------------------------------------------------ | ||
| # Author: J. Henrichs, Bureau of Meteorology | ||
|
|
||
| # The Makefile target `test` runs tests on the gitlab CI (i.e. without | ||
| # compilation), `test_run` will compile all binaries (as far as possible | ||
|
arporter marked this conversation as resolved.
|
||
| # since some examples cannot be compiled), and execute the binary (and | ||
| # if tests are available for checking the binary they will be triggered | ||
| # as well). In case that an example cannot be compiled, `test_run` will | ||
| # still execute all `test` targets. So, `test_run` is the most complete | ||
| # set of tests (and is executed as part of PSyclone's integration tests). | ||
| # The `clean` target removes all temporary files (e.g. transformed code, | ||
| # object # and mod files). Using `allclean` will additionally clean all | ||
| # libraries (e.g. infrastructure, psydata). | ||
|
|
||
| .PHONY: allclean clean test test_run | ||
|
|
||
| allclean clean test test_run: | ||
| $(MAKE) -C lfric_users $@ | ||
| $(MAKE) -C gocean $@ | ||
| $(MAKE) -C transformation $@ | ||
| $(MAKE) -C lfric $@ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| PSyclone Training | ||
|
arporter marked this conversation as resolved.
|
||
| ================= | ||
|
|
||
| This is the training material for the usage of PSyclone, a code | ||
| transformation and generator tool. PSyclone was originally developed | ||
| for the UK Met Office’s new LFRic numerical weather prediction system, | ||
| but its features of modifying large codes based on scripts have found | ||
| other use cases, for example NOAA’s Tsunami model MOST (Method of | ||
| Splitting Tsunamis) and Nemo (Nucleus for European Modelling of the | ||
| Ocean) are both using it. | ||
|
|
||
| There are three different user groups that | ||
| will be using PSyclone. Firstly, research who will be using any model | ||
| that uses PSyclone for code transformation will see PSyclone being used | ||
| during the build process, and in case of errors might need to be able | ||
| to have a very high-level understanding to diagnose the reason for the | ||
| error. Secondly, natural scientists who want to write code using the | ||
| code generation capabilities will need to be aware of PSyclone’s rules. | ||
| Lastly, HPC experts who are writing recipes (or scripts) to optimise | ||
| code need to have a much deeper understanding of PSyclone’s internal | ||
| data structure, behaviour and features. | ||
|
|
||
| The 2-day training course is a sequence of presentations, followed | ||
| by a hands-on session to allow the trainees to try the concepts | ||
| introduced in a simple test case. Some of the hands-on sessions are | ||
| more open ended, and trainees are encouraged to go back to these | ||
| examples and implement better solutions later. | ||
|
|
||
| The training material is split into four parts, and the files | ||
| and documentation here are only the hands-on section. The full | ||
| training is accompanied by presentations | ||
| (a slightly outdated version of the slides are available on the `wiki | ||
|
arporter marked this conversation as resolved.
|
||
| <https://github.com/stfc/PSyclone/wiki/Presentations>`_, | ||
| we are working on updating these, see ticket #3270). It | ||
| contains the following sessions (in the order in which they are presented): | ||
|
|
||
|
|
||
| PSyclone for LFRic Users | ||
| ------------------------ | ||
| This introductory session is “PSyclone for LFRic Users”, which | ||
| is part of the official LFRic training. It can be used | ||
| stand-alone to introduce anyone working with LFRic to what PSyclone | ||
| is and what it does. But it is also a valuable | ||
| introduction for HPC experts, and as such is included here. | ||
| The hands-on session is in the directory | ||
| ``tutorial/training/psyclone_for_lfric_users``. | ||
|
|
||
| PSyclone GOcean DSL | ||
| ------------------- | ||
| The material in ``tutorial/training/gocean`` contains an | ||
| introduction to PSyclone domain-specific-language features (DSL). | ||
| It uses the easier ``gocean`` API to introduce the user to | ||
| writing kernels, applying transformations, and writing | ||
| transformation scripts. It is the longest session in this training | ||
| material and will take one full day. | ||
|
|
||
| Transforming existing Fortran code with PSyclone | ||
| ------------------------------------------------ | ||
| PSyclone can also be used as a transformation tool for generic | ||
| Fortran code, i.e. not using its DSL code-creation features. | ||
| The material in ``tutorial/training/transformation`` contains | ||
| material related to transforming existing Fortran code. | ||
|
|
||
| PSyclone LFRic DSL | ||
| ------------------ | ||
| This section introduces the LFRic DSL. This DSL is a lot more | ||
| complex than the GOcean API used previously. Many of the concepts | ||
| from the previous sections will apply without modifications, but | ||
| due to the more complex data structures this DSL uses, it's | ||
| harder to understand. | ||
|
|
||
| Testing the Training Material | ||
| ============================= | ||
| The different training sections provide makefiles for the users | ||
| which contain convenient shortcuts to avoid that a user has | ||
| to type long command line options and file paths. However, these targets | ||
| are expected to fail in some cases, e.g. the "PSyclone | ||
| for LFRic Users" section contains examples that show how PSyclone | ||
| will detect errors. In order to facilitate consistent testing | ||
| across the whole training material, the makefiles contain two special | ||
| targets: | ||
|
|
||
| - `test` This will run any tests that will only use transformations. | ||
| E.g. no compilation will be done here (nor running any compiled | ||
| binaries). If a hands-on session is supposed to show a failure, | ||
| the `test` target will test that the expected error message | ||
| is indeed shown. | ||
| - `test_run` This target will compile binaries if possible, and run | ||
| the binary to validate the output. This will always include any | ||
| tests done by the `test` target (i.e. even if an example cannot | ||
| be compiled or run, the transformation process will be tested, | ||
| including checking for expected error messages). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| gol | ||
| 2*/time_step_alg_mod.f90 | ||
| 2*/time_step_alg_mod_psy.f90 | ||
| 2*/solution/time_step_alg_mod.f90 | ||
| 2*/solution/time_step_alg_mod_psy.f90 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| EXE = gol | ||
| API = gocean | ||
|
|
||
| # The MPI flag is used to indicate if a MPI enabled compiler is used. | ||
| # If not, the transformations will still use distributed memory, but | ||
| # compilation will be disabled. | ||
| MPI ?= yes | ||
| F90 ?= mpif90 | ||
|
|
||
| # Trigger the flag -dm, and linking of MPI library in common.mk: | ||
| USE_MPI = yes | ||
| SCRIPT ?= openmp.py | ||
| include ../common.mk | ||
|
|
||
| run: $(EXE) | ||
| mpirun -np 4 ./$(EXE) ../gol-lib/config.glider | ||
|
|
||
| # Call the default test (which checks the output file), but do a second test to make | ||
| # sure we get a 2x2 domain decomposition, otherwise the job was not running properly | ||
| # with MPI | ||
| test: test-default | ||
| @bash -c "if [[ $$(make run | grep -c 'go_decompose: using grid of 2x 2') != 1 ]]; then \ | ||
|
arporter marked this conversation as resolved.
|
||
| echo 'Job is not running properly with MPI'; \ | ||
| fi" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.