Skip to content
Merged
Show file tree
Hide file tree
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 Sep 11, 2024
2c2ef99
#1623 Removed unnecessary code.
hiker Sep 12, 2024
7597f95
#1623 Updated example 3.2
hiker Sep 12, 2024
2a223d7
#1623 Fix bug that caused the backend disable validation flag to fail…
hiker Sep 12, 2024
3b2c6ef
#1623 Add inlining & move example [skip ci]
hiker Sep 12, 2024
00276a3
#1623 Updated template for 3.4.
hiker Sep 14, 2024
b0d4e46
#1623 Clean all by default.
hiker Sep 14, 2024
bd679ce
#1623 Add sympy/varinfo example [skip ci]
hiker Sep 14, 2024
3820bf7
#1623 Added first LFRic example.
hiker Sep 16, 2024
ef30b89
#1623 Added full solution for 3.4.
hiker Sep 16, 2024
952bbba
#1623 Added openmp transformation.
hiker Sep 16, 2024
97014dd
#1623 Updated (c) [skip ci]
hiker Sep 16, 2024
8d38774
#1623 Added missing -api parameter in README for the user training.
hiker Sep 17, 2024
11430e3
#1623 Fixed examples (loop fuse was incorrect).
hiker Sep 17, 2024
f6e2fba
#1623 Added readme and graphics to LFRic example 4.2.
hiker Sep 17, 2024
46517f6
#1623 Added transform to phony.
hiker Sep 19, 2024
1e55e44
Fixed makefile for 2.18
hiker Sep 20, 2024
965fd81
Added missing file.
hiker Sep 20, 2024
64927b1
Added dependency on script for psyclone transformation.
hiker Sep 20, 2024
fea06cf
Added missing TODO comments.
hiker Sep 20, 2024
a099e04
#1623 Fixed error in script [skip-ci]
hiker Sep 20, 2024
dfb299e
#1623 Add colouring example.
hiker Oct 16, 2024
79667ff
#1623 Fixed missing makefile dependencies.
hiker Oct 17, 2024
2cbf3d0
#1623 Minor updates done during training.
hiker Oct 18, 2024
3661959
Merge branch '1623_add_training' of github.com:stfc/PSyclone into 162…
hiker Dec 9, 2024
6b93d3c
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 6, 2025
42eafc2
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 10, 2025
e88d9c8
#1623 Fixed script that moved the output step and therefore produced …
hiker Jan 10, 2025
8c8a21f
#1623 Improved functionality of parent makefiles.
hiker Jan 10, 2025
6cb191a
#1623 Update to new command line syntax.
hiker Jan 10, 2025
5f5d0b6
#1623 Trigger all tests from higher-level makefiles.
hiker Jan 10, 2025
7415ff7
#1623 New psyclone command line options.
hiker Jan 10, 2025
1390792
#1623 Convert example 2.6 to use new trans parameters.
hiker Jan 10, 2025
b65df65
#1623 Fix minor issues.
hiker Jan 10, 2025
a86daeb
#1623 Fix minor documentation error.
hiker Jan 10, 2025
3c5f148
#1623 Fixed doxygen docs.
hiker Jan 10, 2025
1c5532d
#1623 Minor updates.
hiker Jan 12, 2025
2369852
#1623 Updated user training to psyclone 3.0
hiker Jan 12, 2025
3723e9c
#1623 Added missing psykal-dsl option.
hiker Jan 13, 2025
f93bbbd
#1623 Provide --config option so that training works in editable envi…
hiker Jan 13, 2025
bbbc73b
#1623 Minor updates to example.
hiker Jan 13, 2025
1ac47d5
#1623 Updated examples 2.8 to new trans arguments.
hiker Jan 13, 2025
a6f3fa3
#1623 Updated more scripts to new parameter.
hiker Jan 13, 2025
7801f27
#1623 Updated example 2.12.
hiker Jan 14, 2025
2e0c905
#1623 Updated example 2.18 to new trans parameter.
hiker Jan 14, 2025
cbe37b4
#1623 Clean psydata libraries as well in allclean.
hiker Jan 15, 2025
ec96efd
#1623 Updated psyclone scripts.
hiker Jan 16, 2025
faa7f4f
#1623 Trigger psyclone on script change, minor script updates.
hiker Jan 17, 2025
57e938b
#1623 Add documentation of the kernel parameters.
hiker Jan 17, 2025
856dab3
#1623 Use common.mk, tests both scripts.
hiker Jan 17, 2025
f0fdcc6
#1623 Added a temporary example that does full GOCean kernel inlining…
hiker Jan 20, 2025
8d38d28
#1623 Updated example trans to dynamically try to detect fields that …
hiker Jan 23, 2025
9bd91d3
Merge remote-tracking branch 'origin/1623_add_training' into 1623_add…
hiker Feb 1, 2025
64ec77a
#1623 Updated various READMEs.
hiker Mar 10, 2025
5797ec3
#1623 Updated sympy example.
hiker Mar 11, 2025
0ae2c15
#1623 More minor fixes.
hiker Mar 11, 2025
3337eb7
#1623 Added dataflow graph to README.
hiker Mar 12, 2025
cf4cc5c
#1623 Fixed testing of trainings material.
hiker Mar 12, 2025
5c7d954
#1623 Updated Makefiles and readme.
hiker Mar 12, 2025
f27f72a
Merge branch '1623_add_training' of github.com:stfc/PSyclone into 162…
hiker Mar 13, 2025
c318e68
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Mar 13, 2025
5e93fc8
#1623 Added missing cleaning of gol-lib.
hiker Mar 13, 2025
d6b61fc
#1623 Added missing import or InvokeSchedule.
hiker Apr 21, 2025
7ac6f35
#1623 Finished openacc example.
hiker Apr 21, 2025
ec6ac18
#1623 Remove schedule view from loop fuse script.
hiker Apr 21, 2025
ced3c01
#1623 Added temporary fix for #2732.
hiker Apr 21, 2025
1543b65
#1623 Started to add openp offload example.
hiker Apr 22, 2025
492a52b
#1623 Updated flags for nvidia omp offloading.
hiker Apr 22, 2025
c1b4df6
#1623 Add README, create a template for hands-on, and update solution.
hiker Apr 22, 2025
2ed85a0
#1623 Fix minor styling errors.
hiker Apr 22, 2025
d550cc2
#1623 Replace iargc with command_argument_count to the code works wit…
hiker Apr 22, 2025
0bc7c87
Merge branch '1623_add_training' of github.com:stfc/PSyclone into 162…
hiker Apr 22, 2025
7c1e5e8
#1623 Fix user training to work with new element order.
hiker Apr 23, 2025
0f0242f
#1623 Fixed lfric part of the advanced training.
hiker Apr 23, 2025
8398cbd
#1623 Added pure to kernels to fix some OpenACC issues.
hiker Apr 23, 2025
d997b23
#1623 Removed incorrect 'return' statement.
hiker Apr 24, 2025
c67b6dc
#1623 Use env instead of hardcoded python3 path
hiker Apr 24, 2025
ab64c77
#1623 Fixed incorrect field names.
hiker Apr 24, 2025
a77a8d0
#1623 Fixed layout.
hiker Apr 24, 2025
f087de0
#1623 Fixed incorrect field names.
hiker Apr 24, 2025
1cbc56f
#1623 Removed debug output.
hiker Apr 29, 2025
4a5a44d
t fsckMerge branch '1623_add_training' of github.com:stfc/PSyclone in…
hiker Jun 26, 2025
919cca7
Merge remote-tracking branch 'origin/master' into 1623_add_training […
hiker Sep 10, 2025
3c8aafa
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker Sep 18, 2025
769583e
#1623 Fixed warnings in LFRic examples.
hiker Sep 18, 2025
b8d42ae
#1623 Updated lfric user training to use new infrastructure and lates…
hiker Sep 18, 2025
215d727
#1623 Updated LFRic examples to work with new infrastructure and PSyc…
hiker Sep 19, 2025
e87166c
#1623 Updated var access and dataflow graph to use latest PSyclone.
hiker Sep 21, 2025
19b0760
#1623 Removed unnecessary use statement.
hiker Sep 21, 2025
5713f4f
#1623 Fix transformation examples.
hiker Sep 21, 2025
ceab559
#1623 Test all scripts.
hiker Sep 21, 2025
c00d659
#1623 Fixed flake8 issues and other outdated code structures for goce…
hiker Sep 22, 2025
2e063c7
#1623 Fix typo in directory name (which means this example was not te…
hiker Sep 22, 2025
1c8493d
#1623 Renamed examples to be consistent and triggered when testing.
hiker Sep 22, 2025
b66524c
#1623 Fixed lfric examples.
hiker Sep 22, 2025
3b68646
#1623 Moved to 'new' psyir parameters in transformations.
hiker Sep 22, 2025
38ab9a6
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Sep 22, 2025
1b43159
#1623 More conversion of legacy psy parameter to psyir.
hiker Sep 22, 2025
914aef0
#1623 Updated (c) to 2025
hiker Sep 22, 2025
467e186
#1623 Fixed flake8.
hiker Sep 22, 2025
4ac3d10
#1623 Try to disable commented out link that the link checker complai…
hiker Sep 22, 2025
9bf0251
#1623 By default disable MPI compilation.
hiker Sep 22, 2025
4f3f708
#1623 Fixed incorrect link.
hiker Sep 22, 2025
ca6d55e
#1623 Try if renaming the image stops the link checker from complaining.
hiker Sep 22, 2025
c340bc6
#1623 Fix link checker again, this time I might have found the right …
hiker Sep 22, 2025
32ca776
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker Sep 23, 2025
b84fc62
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker Sep 29, 2025
7595775
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker Sep 29, 2025
4a3df08
Merge branch '2049_improved_driver_base_class' into 1623_add_training
hiker Oct 3, 2025
4cbddc1
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Oct 5, 2025
de1816b
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Oct 14, 2025
63033e2
#1623 Fix flake8.
hiker Oct 14, 2025
b8f9bf1
#1623 Try to make inlining tutorial work again.
hiker Oct 16, 2025
10e99c6
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Oct 17, 2025
4ce0812
Merge branch '3189_sympy_handling_equal' into 1623_add_training
hiker Oct 17, 2025
89494d3
Merge branch '3189_sympy_handling_equal' into 1623_add_training
hiker Oct 28, 2025
3535d22
#1623 Updated and explained full inlining example.
hiker Oct 28, 2025
541331e
#1623 Added separate target for testing full_inlinig, and compile and…
hiker Oct 28, 2025
9374e5d
Merge branch 'master' into 1623_add_training
hiker Nov 5, 2025
a464dcb
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Nov 5, 2025
7a3e983
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Nov 5, 2025
fe20bd3
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Nov 12, 2025
bc09da2
#1623 Added better directory names.
hiker Nov 12, 2025
b0d06a9
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Nov 13, 2025
bcfb23e
Merge branch '2705_gocean_inlining' into 1623_add_training
hiker Nov 13, 2025
eb4d602
#1623 Updated gocean fuse examples with working full inlining.
hiker Nov 13, 2025
275f88a
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Nov 13, 2025
77e1270
#1623 Renamed users to psyclone_for_lfric_users.
hiker Nov 14, 2025
1fe86b8
#1623 Removed unnecessary lfric directory level.
hiker Nov 14, 2025
da34626
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Nov 17, 2025
8b02b68
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Dec 1, 2025
d0c18fa
#1623 Added top-level README.
hiker Dec 1, 2025
934feb6
#1623 Use consistent targets test/compile/run in user training.
hiker Dec 2, 2025
6f86771
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Dec 2, 2025
94bfbdd
#1623 Fixed typos in Makefile.
hiker Dec 2, 2025
509f2ca
#1623 Re-implement tests without usage of dl_esm_info to get inlining…
hiker Dec 2, 2025
430d7d7
#1623 Removed dependencies on dl_esm_inf.
hiker Dec 2, 2025
1daa212
#1623 Changed hands-on session to be consistent with solution (i.e. n…
hiker Dec 2, 2025
eeb5bb9
#1623 Update more makefile to support new standard targets.
hiker Dec 2, 2025
5583a9e
#1623 nvfortran fixes.
hiker Dec 2, 2025
985a34b
#1623 Improvements to compilation tests.
hiker Dec 2, 2025
c73051d
#1623 Fixed typos in Makefiles.
hiker Dec 3, 2025
723f8bb
#1623 Run allclean before compiling tutorials with nvfortran.
hiker Dec 3, 2025
842e7c2
#1623 Fix error in allclean.
hiker Dec 3, 2025
1b23c6b
#1623 Fix missing allclean target.
hiker Dec 3, 2025
adf9fff
#1623 Update to use psyir in trans.
hiker Dec 3, 2025
1df8385
#1623 Fix cleanup.
hiker Dec 3, 2025
104bba2
#1623 Code cleanup.
hiker Dec 3, 2025
24fd645
#1623 Removed dummy file.
hiker Dec 3, 2025
5be2e7f
#1623 Removed inlining from 2.6 (it's now in 2.5).
hiker Dec 3, 2025
fa703b3
#1623 Updated instructions.
hiker Dec 3, 2025
45dffd6
#1623 Enable MPI by default.
hiker Dec 4, 2025
f807698
#1623 Disable MPI tests on gitlab CI.
hiker Dec 5, 2025
4009c96
#1623 Use new VariablesAccessMap
hiker Dec 5, 2025
82d17cd
#1623 Reverted unnecessary change.
hiker Dec 6, 2025
bdfe506
#1623 Fix incorrect field names.
hiker Dec 8, 2025
37cbcee
#1623 Print warning message that the mpi example does not run as MPI …
hiker Dec 8, 2025
fa17cac
#1623 Better behaviour for CI, including documentation in the README.
hiker Dec 8, 2025
2806ad8
#1623 Updated Makefile documentation.
hiker Dec 8, 2025
7cc2b02
#1623 Fix typo in makefiles.
hiker Dec 8, 2025
1fcbba3
#1623 Fix incorrect transformation name.
hiker Dec 9, 2025
2702b73
#1623 Enable openmp in the default flags to make sure threading is ac…
hiker Dec 9, 2025
628dc20
#1623 Split psydata sections into three different directories.
hiker Dec 9, 2025
82a47fd
#1623 Updates README, fixed makefiles after splitting the example.
hiker Dec 10, 2025
c8fc75d
#1623 Support selecting the output format of the driver.
hiker Dec 10, 2025
86a3d90
#1623 Fixed typo in print statement.
hiker Dec 12, 2025
fadab8a
#1623 Introduce test and test_run targets, improve common.mk to do mo…
hiker Dec 15, 2025
1baa2c3
#1623 Fix flake8 error.
hiker Dec 15, 2025
53cd484
#1623 Updated tests to use the new test/test_run targets.
hiker Dec 16, 2025
8812657
#1623 Convert more files to improved common.mk, and improve testing w…
hiker Dec 16, 2025
30afe01
#1623 Fix and improve extraction example.
hiker Dec 16, 2025
93dd233
#1623 Fix and improve testing of profiling.
hiker Dec 16, 2025
53df228
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Dec 16, 2025
89c6c17
#1623 Partially fixed value_range_check example.
hiker Dec 16, 2025
425f1cb
#1623 Removed printing of schedule, and use both fuse scripts.
hiker Dec 17, 2025
72b2f90
#1623 Properly test openmp.
hiker Dec 17, 2025
1d5ef2c
#1623 Updated openmp transformation example.
hiker Dec 17, 2025
ff22408
#1623 Updated tiling example.
hiker Dec 17, 2025
31fb257
#1623 More work on tiling example.
hiker Dec 17, 2025
3111881
#1623 Update example 3.6
hiker Dec 17, 2025
a57bb5a
#1623 Added example to create code.
hiker Dec 18, 2025
d863dd5
#1623 Fix test_run for value range check.
hiker Dec 18, 2025
467bfae
#1623 Minor updates to transformationm script.
hiker Dec 19, 2025
3c53bfb
#1623 Fix openacc example.
hiker Jan 5, 2026
6b61637
#1623 Fix crash, not sure why the original code stopped working :(
hiker Jan 5, 2026
740dc5c
#1623 Update .gitignore.
hiker Jan 5, 2026
165b6e3
#1623 Enable OpenMP compilation with gfortran.
hiker Jan 5, 2026
ab01223
#1623 Fixed various makefile issues.
hiker Jan 5, 2026
ea505fc
#1623 Fixed lfric makefile.
hiker Jan 5, 2026
3b8ffcc
#1623 Try to fix makefile again.
hiker Jan 5, 2026
0470854
#1623 Try to fix more test, esp. running with different compilers.
hiker Jan 5, 2026
e59a6de
#1623 Use mpif90 for compilation tests in the tutorial, so the MPI ex…
hiker Jan 5, 2026
6091df5
#1623 Added syntax highlighting, which helps to convert md to pdf usi…
hiker Jan 6, 2026
c4da21d
#1623 Added high-level READMEs.
hiker Jan 6, 2026
31a96dd
#1623 Removed debug output.
hiker Jan 6, 2026
861a713
#1623 Added missing newline.
hiker Jan 6, 2026
11752c4
#1623 Addressed issues raised in review.
hiker Jan 6, 2026
b380760
#1623 Removed two unnecessary files, and replaced the remaining one w…
hiker Jan 7, 2026
108fb9a
#1623 Started to address reviewers comments.
hiker Jan 7, 2026
6b4ce26
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 7, 2026
8c43ef2
#1623 Fix flake8.
hiker Jan 8, 2026
c809814
#1623 Addressed more issues raised in review.
hiker Jan 8, 2026
4c7c825
#1623 Added missing docstrings.
hiker Jan 8, 2026
724f873
#1623 More updated based on code review.
hiker Jan 8, 2026
3f0438d
#1623 Added more doc strings to Fortran files.
hiker Jan 8, 2026
f6a10fe
#1623 Removed unused compile target from top level Makefiles.
hiker Jan 8, 2026
d4735c8
#1623 Updated README with additional information.
hiker Jan 8, 2026
fa501df
#1623 Renamed psyclone_for_lfric_users to lfric_users.
hiker Jan 8, 2026
baaed9e
#1623 Add USE_GPU variable to avoid execution of GPU code (e.g. gfort…
hiker Jan 9, 2026
0f6ec90
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 9, 2026
ecbe772
#1623 Start to address reviewers comments.
hiker Jan 16, 2026
7632b22
#1623 Address issues raised in review.
hiker Jan 19, 2026
95095ba
#1623 Start to move images to shared directory.
hiker Jan 19, 2026
23577b9
#1623 Try to use image to avoid scaling of images.
hiker Jan 19, 2026
0cfcc34
#1623 Try different size specification.
hiker Jan 19, 2026
df0cb7d
#1623 Give up on using svg files (which do not scale), keep on using …
hiker Jan 19, 2026
1311fec
#1623 Added missing newline.
hiker Jan 19, 2026
f71c323
#1623 Addressed reviewers commend in 3.2.
hiker Jan 19, 2026
67180fd
#1623 Renamed .x90 files to .f90, updated Makefiles to also do better…
hiker Jan 19, 2026
d4b28cf
#1623 Fixes after renaming.
hiker Jan 19, 2026
339e5c7
#1623 Updated comments in 3.2
hiker Jan 19, 2026
380270f
#1623 Address comments in review.
hiker Jan 19, 2026
8e7316c
#1623 More small updates.
hiker Jan 19, 2026
6913ba6
#1623 Minor updates.
hiker Jan 19, 2026
7eb02ef
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 19, 2026
bc8aa43
#1623 Updated (c) to 2026.
hiker Jan 19, 2026
4052926
#1623 Flake8 fix.
hiker Jan 19, 2026
584051a
#1623 Fix test failures.
hiker Jan 19, 2026
d9c3f45
#1623 Renamed .x90 file to .f90.
hiker Jan 19, 2026
11d65f2
#1623 Updated README to describe new makefile.
hiker Jan 19, 2026
7f15f0d
#1623 Rename x90 to f90, add comments.
hiker Jan 20, 2026
5775c45
#1623 Added README for new exercise, and setup a proper template for …
hiker Jan 20, 2026
3d36578
#1623 Fix flake8.
hiker Jan 20, 2026
f004a52
#1623 Remove comment indicating the error, since the user is supposed…
hiker Jan 20, 2026
046e084
#1623 Fix failing integration tests.
hiker Jan 20, 2026
f6fbe80
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 20, 2026
f62df0e
#1623 Removed OpenMP-specific debug print from kernels, instead add t…
hiker Jan 20, 2026
f9e258f
#1623 Fixed typing information.
hiker Jan 20, 2026
6458d10
#1623 Fixed example by properly providing two W0 fields (instead of a…
hiker Jan 20, 2026
2f2a38b
#1623 Removed example7, which has been added as lfric/4.4...
hiker Jan 20, 2026
fb1d58f
#1623 Renamed lfric_user example 8 to 7.
hiker Jan 20, 2026
debe442
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 20, 2026
e61d2db
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 20, 2026
289e051
#1623 Remove unused, commented out docs.
hiker Jan 21, 2026
42012bd
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 23, 2026
9ce76e9
Merge remote-tracking branch 'origin/master' into 1623_add_training
hiker Jan 27, 2026
ef2659d
#1623 Addressed issues raised in review.
hiker Jan 27, 2026
cc25877
#1623 Fixed location of OMPParallelTrans.
hiker Jan 27, 2026
a6843b0
#1623 Fixed more tests with incorrect import location.
hiker Jan 27, 2026
d29c988
#3145 update changelog
arporter Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ jobs:
module load gcc/${GFORTRAN_VERSION} openmpi/${OPENMPI_VERSION}
module load hdf5/${HDF5_VERSION} netcdf-c/${NETCDF_C_VERSION} netcdf-fortran/${NETCDF_FORTRAN_VERSION}
make -C tutorial/practicals compile
# Set F90 to mpif90 so the MPI example works, and it also avoids
# that the openacc example defaults to nvfoetran. Also, the implicitly
# defined F90FLAGS (in a module?) does not include -fopenmp, which
# then causes some examples to fail, so explicitly define this
USE_GPU=no F90=mpif90 F90FLAGS="-g -Wall -O0 -fopenmp" make -C tutorial/training/ test_run
- name: Examples with compilation - nvfortran
run: |
. .runner_venv/bin/activate
Expand All @@ -150,10 +155,18 @@ jobs:
run: |
. .runner_venv/bin/activate
make -C tutorial/practicals allclean
make -C tutorial/training allclean
module load nvidia-hpcsdk/${NVFORTRAN_VERSION}
module load hdf5/${HDF5_VERSION} netcdf-c/${NETCDF_C_VERSION} netcdf-fortran/${NETCDF_FORTRAN_VERSION}
F90=nvfortran F90FLAGS="-acc -Minfo=all" make -C tutorial/practicals/LFRic compile
F90=nvfortran F90FLAGS="-acc -Minfo=all -Mnofma -O2" make -C tutorial/practicals/generic run
# We cannot run non-GPU examples with the openacc flag, since output_field
# needs a openacc directive, which fails if the rest of the code is not on GPU
# Enable OpenMP on CPU (for some run tests)
USE_GPU=no F90=mpif90 F90FLAGS="-mp -Minfo=all" make -C tutorial/training test_run
# Delete any previous files, and compile the openacc example with openacc:
F90=nvfortran F90FLAGS="-acc -Minfo=all" make -C tutorial/training/gocean/2.14-GameOfLife-openacc/solution allclean
USE_GPU=yes F90=nvfortran F90FLAGS="-acc -Minfo=all" make -C tutorial/training/gocean/2.14-GameOfLife-openacc/solution test_run
make -C tutorial/practicals/generic/4_openacc acc_test
- name: Test logfile creation.
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ jobs:
( make -C tutorial/practicals transform > /dev/null )
# Jupyter notebooks are out-of-date
# ( make -C tutorial/notebooks notebook )
( make -C tutorial/training test )
- name: Test with pytest
if: ${{ !(matrix.python-version == '3.9') }}
run: |
Expand Down
3 changes: 3 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
33) PR #3145 for #1623. Adds extensive training material using both the
GOcean and LFRic APIs.

32) PR #3299 for #3297. Fix intermittent test failures by more consistent
use of str and Path in the ModuleManager.

Expand Down
1 change: 1 addition & 0 deletions doc/psyad/user_guide/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build
7 changes: 0 additions & 7 deletions examples/lfric/eg17/full_example/main.x90
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,11 @@ program main
use global_mesh_mod, only: global_mesh_type
use mesh_mod, only: mesh_type, PLANE
use local_mesh_mod, only: local_mesh_type
use local_mesh_collection_mod, only: local_mesh_collection, local_mesh_collection_type
use mesh_collection_mod, only: mesh_collection, mesh_collection_type
use halo_routing_collection_mod, only: halo_routing_collection_type, &
halo_routing_collection
use function_space_collection_mod, only: function_space_collection_type, &
function_space_collection
use driver_collections_mod, only: init_collections

use partition_mod, only: partition_type, partitioner_planar, partitioner_interface
use extrusion_mod, only: extrusion_type, uniform_extrusion_type
use function_space_mod, only: function_space_type
use function_space_collection_mod, only: function_space_collection
use fs_continuity_mod, only: W0, W1, W2, W2V, W2H
use field_mod, only: field_type, field_proxy_type
use field_real64_mod, only : field_real64_type
Expand Down
14 changes: 5 additions & 9 deletions examples/lfric/eg17/full_example_extract/main.X90
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,11 @@ program main
use global_mesh_mod, only: global_mesh_type
use mesh_mod, only: mesh_type, PLANE
use local_mesh_mod, only: local_mesh_type
use local_mesh_collection_mod, only: local_mesh_collection, local_mesh_collection_type
use mesh_collection_mod, only: mesh_collection, mesh_collection_type
use halo_routing_collection_mod, only: halo_routing_collection_type, &
halo_routing_collection
use function_space_collection_mod, only: function_space_collection_type, &
function_space_collection
use mesh_collection_mod, only: mesh_collection
use driver_collections_mod, only: init_collections

use partition_mod, only: partition_type, partitioner_planar, partitioner_interface
use extrusion_mod, only: extrusion_type, uniform_extrusion_type
use function_space_mod, only: function_space_type
use function_space_collection_mod, only: function_space_collection
use fs_continuity_mod, only: W0, W1, W2, W2V, W2H
use field_mod, only: field_type, field_proxy_type
use field_real64_mod, only : field_real64_type
Expand Down Expand Up @@ -93,7 +86,10 @@ program main
type(field_type) :: chi(3)
real(kind=r_def) :: one
logical(kind=l_def) :: some_logical
integer :: i, ierr
integer :: i
#ifdef _MPI
integer :: ierr
#endif



Expand Down
15 changes: 15 additions & 0 deletions src/psyclone/tests/domain/common/driver_creator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@
from psyclone.tests.utilities import Compile, get_invoke


# ----------------------------------------------------------------------------
def test_lfric_driver_valid_unit_name():
'''Tests that we create valid unit names, i.e. less than 64 characters,
and no ":" in name.'''

long_name = "A"*100
new_name = DriverCreator._make_valid_unit_name(long_name)
assert new_name == "A"*63

special_characters = "aaa-bbb"
new_name = DriverCreator._make_valid_unit_name(special_characters)
assert new_name == "aaabbb"


# ----------------------------------------------------------------------------
def test_basic_driver_add_call(fortran_writer):
'''Tests that adding a call detects errors and adds calls
with and without parameters as expected.
Expand Down
21 changes: 21 additions & 0 deletions tutorial/README.md
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.
53 changes: 53 additions & 0 deletions tutorial/training/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -----------------------------------------------------------------------------
Comment thread
arporter marked this conversation as resolved.
# 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
Comment thread
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 $@
92 changes: 92 additions & 0 deletions tutorial/training/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
PSyclone Training
Comment thread
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
Comment thread
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).
5 changes: 5 additions & 0 deletions tutorial/training/gocean/.gitignore
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
24 changes: 24 additions & 0 deletions tutorial/training/gocean/2.10-GameOfLife-mpi/Makefile
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 \
Comment thread
arporter marked this conversation as resolved.
echo 'Job is not running properly with MPI'; \
fi"
Loading
Loading