Releases: stfc/PSyclone
3.2.2
This is a bug-fix release to address issues found with the LFRic API in 3.2.1.
What's Changed
- Bug fix to ensure correct to/from space of operator used when obtaining
undf - Bug fix for obtaining loop upper bounds for kernels writing to field vectors
Full Changelog: v3.2.1...3.2.2
3.2.2 release candidate 2
As 3.2.2-rc1 but updates version number in PSyclone and doxygen.
3.2.2 release candidate 1
This is a bug-fix release to address issues found with the LFRic API in 3.2.1.
What's Changed
- Bug fix to ensure correct to/from space of operator used when obtaining
undf - Bug fix for obtaining loop upper bounds for kernels writing to field vectors
Full Changelog: v3.2.1...v3.2.2-rc1
3.2.1
This release primarily includes bug-fixes and enhancements for working with existing Fortran.
In the LFRic DSL, there is support for new Kernel metadata to describe kernels that cannot perform redundant computation.
What's Changed
General
- Support for fixed-format Fortran input — psyclone now recognises common Fortran file extensions.
- Refactoring and enhancements for the kernel-extraction driver functionality.
- InlineTrans now supports calls to routines with optional (keyword) arguments.
- New MinimiseSyncTrans removes unnecessary barriers at the end of parallel regions.
- Improved dependence-analysis performance - added faster symbol tracking.
- Improved Symbol resolution when requested by name: indirect imports will now be followed.
- Enhanced logging: clearer messages when chasing imports.
- Bug fixes for dependence-analysis checks in the presence of
CodeBlocks. - Bug fix for whole-array accesses within StructureReferences.
- Improved validation for automatic array privatisation.
- Fixed Boolean handling within the SymbolicMaths module.
- Bug fix for comparison of precision symbols.
LFRic DSL
- New OPERATES_ON kernel-metadata values of
OWNED_DOFandOWNED_CELL_COLUMNfor kernels that cannot perform redundant computation.
Full Changelog: v3.2.0 → v3.2.1
3.2.0
This release extends PSyclone’s transformation and code-generation capabilities, with new transformations (scalarisation, checksum, loop tiling, reductions) and improved support for OpenMP/OpenACC constructs (e.g. reduction, nowait, barriers, atomic types). PSy-layer code generation has been migrated to use the PSyIR backend. LFRic support has been enhanced with colour-tiling and refined halo-depth logic, and metadata handling has been extended (e.g. read-only arrays). The release also introduces keyword-based arguments for transformations, initial logging infrastructure, and updated documentation (user-, developer and reference guides have been merged) using the PyData theme. In addition, it includes numerous bug fixes, dependency cleanups, and test/CI improvements.
What's Changed
🌟 PSyclone Release Highlights
Transformations & Parallelisation
- New transformations: scalarisation, checksum, loop tiling (generalised with examples), array-rank increase and reductions.
- Extended OpenMP/OpenACC support:
reduction,nowait, barriers, atomic types, and improved async/wait handling. - Support for hoisting of allocatable arrays, and improvements to inlining.
Code Generation & Backend
- PSy-layer code is now generated using PSyIR lowering (replacing
gen_code/f2pygen). - Enhanced extraction transformations, including ASCII extraction.
- Configurable device intrinsics available.
- Improved handling of pure subroutines, polymorphic kernels, and array privatisation.
LFRic Support
- Added colour-tiling.
- Refined halo-depth logic for halo kernels.
- Extended metadata support (e.g. read-only arrays).
- Infrastructure updates and bug fixes.
Usability & Documentation
- Transformations can now use keyword arguments instead of
optionsdict. - Initial logging infrastructure.
- Documentation updated to PyData theme with reorganised sections (e.g. instrumentation).
Bug Fixes & Maintenance
- Numerous fixes for frontend parsing, array bounds, type resolution, and OpenMP lowering.
- Deprecated old Dynamo0p3 transformation names (in favour of LFRic...).
- Expanded test coverage and CI updates (support for new Python versions, streamlined checks).
- Dependency cleanup (removed
jsonschema).
New Contributors
- @hbrunie made their first contribution in #2828
- @mn416 made their first contribution in #3021
- @victoria-atkinson made their first contribution in #2972
Full Changelog: v3.1.0...v3.2.0
Version 3.1.0
What's Changed
LFRic
- Allow user-defined DoF kernels to act on field vectors in #2897
- Enable split element orders and anisotropic quadrature points in #2865 and #2799
- Config command-line option added to PSyAD in #2829
Profiling and Kernel Extraction
- Support added for the Vernier timing library (#2820)
- Kernel extraction (and driver creation): support added for character and logical datatypes, for partially-written fields and for non-allocatable arrays (#2509, #2890, #2899)
General
- Added support for instructing the PSyIR frontend to import external modules named in the
RESOLVE_IMPORTSvariable in the transformation script (#2807) - Added (experimental) support for retaining comments (and directives) in the frontend (#2821)
- Parse-tree caching added to frontend (disabled by default) in #2810
- Improvements to dependence analysis including new support for finding backward accesses in #2814 and #2825
- Add some support for dependency analysis involving array ranges in #2880
- Frontend/backend correction to ensure that explicit parentheses on binary operations are reproduced in #2862
- Allow setting of the Fortran standard in the config file in #2855
- Exclude character assignments from ACC KERNELS regions in #2857
- Support for elemental functions in WHEREs in #2883
- NEMOv5 GPU runs added to the integration tests with full reproducibility in #2859
New Contributors
- @mo-alistairp made their first contribution in #2832
- @mo-jdendy made their first contribution in #2799
Full Changelog: v3.0.0...v3.1.0
Release 3.0
What's Changed
IMPORTANT: graphviz and termcolor are now mandatory dependencies (rather than optional). You will need these python packages installed in order to run psyclone.
The functionality for handling existing Fortran code which we used to term the "NEMO API" is now named "Generic Code Transformation". All NEMO-specific naming has been removed from the codebase. This change has been made to emphasise
that this functionality is intended to be general purpose. As part of this, the concept of a 'default' API has been removed since
the default is now to process generic code. If a user has code that conforms to an API then they must specify which one using
the -api/--psykal-dsl flag to PSyclone.
LFRic and PSyAD
- More moving and renaming of classes out of
dynamo0p3.py; - Use of the PSyIR Fortran backend for LFRic loops and anything inside them;
- Comments generated for Builtins in the PSy Layer;
- Support for user-defined kernels that operate on DoFs;
- GungHo on GPU now part of integration tests;
- LFRic PSy-layer now looks up nlevels for each kernel individually;
- Update the PSyKAl transformation script signature to accept PSyIR nodes;
- Add support for kernels that operate on halos (for FFSL in LFRic);
- Derive module and subroutine names of adjoint tests from supplied filename for LFRic API;
- Improvements to kernel-extraction and driver-generation (PSyKE) functionality (including MPI support);
- NaN-checking support generalised so that kernel inputs can be checked for validity against user-provided ranges;
- Updates to support new operator index ordering in LFRic;
NEMO
- Passthrough of BENCH for NEMOv4 now requires only one file to be omitted;
- Passthrough of BENCH for NEMOv5 works for all source files;
- OpenACC and OpenMP offload to GPU for both versions now part of integration testing;
- Several bug fixes for issues around incorrect parallelisation of loops;
Generic Code Transformation
-
New support for Fortran features:
- NAMELIST
- SELECT TYPE
- Procedure interfaces
- Calls to type-bound procedures
- INTRINSIC modules and USE association
- ELEMENTAL and IMPURE routines
- Pointer assignments
- WHERE without explicit array notation
- OPTIONAL arguments - partial type information now retained
- Calls to polymorphic routines
-
Improved support for inlining and "module inlining".
-
The reason for a CodeBlock is now included as a comment in the output Fortran code;
-
Improved lifetime analysis (used to improve robustness of loop parallelisation);
-
Many bug fixes and improvements;
-
Improvements to various intrinsic-to-code transformations;
-
Initial support for array-privatisation in parallel-loop transformations;
Other
- Experimental backend for xDSL Python-Native Compiler Toolkit
- PSyclone performance improvements
- Updated to use release 0.2.0 of fparser (https://github.com/stfc/fparser)
Full Changelog: 2.5.0...v3.0
New Contributors
- @JulienRemy made their first contribution in #2567
- @mcjamieson made their first contribution in #2653
- @DrTVockerodtMO made their first contribution in #2743
- @schreiberx made their first contribution in #2775
Full Changelog: 2.5.0...v3.0
Release 2.5.0
What's Changed
LFRic and PSyAD
- Much renaming and moving of LFRic-related classes from 'dyn' to 'LFRic';
- PSy-layer generation now creates array pointers for use as kernel arguments (required for GPU compilation);
- Bug fix for missing maps in
enter datadirective; - Bug fixes for LFRic dependency analysis;
- PSyKE: use proper NetCDF variable names for array of fields;
- Metadata support for multi-precision kernels;
- Bug fix for PSy-layer generation involving CMA operators;
- All LFRic built-ins are now generated using PSyIR and lowering;
- Precision-map values moved to configuration file;
- New real-to-real conversion built-in;
- Generated PSyAD test harness now uses LFRic logging API;
- Bug fix for
setop_randomkernel.
NEMO
- Support for OpenMP tasking transformation and directive;
- Supported added for OMP/ACC Atomics and OMP Simd directives;
- Bug fix for
VERIFYintrinsic; - Fix
Ref2ArrayRangeTransbug withALLOCATEstatements; - Addition of NEMO OpenACC loops transformation script;
NemoKernnode removed;maxval2loopand atomics used to parallelise NEMOstpctl.f90;- Bug fix for
NemoOuterArrayRange2LoopTrans; - Bug fix for
process_nemo.pyscript: ensure-Iflags are aggregated.
PSyIR Improvements
- Add
Node.siblingsproperty; - Add
depthkwarg toNode.walk; - Add
Node.get_sibling_listsmethod; Node.origin_stringmethod to retrieve original filename and line number information;- Improvements to
ACCRoutineTrans.validate(); - Improvements to
maxval-,minval- andsum-to-code transformations; - Allow PSyIR backend consistency checks to be disabled;
- Improvements to
InlineTransandLoopFusionTrans; - Support for querying the datatype of a unary/binary operation;
UnknownTyperenamed toUnsupportedTypeandDeferredTypetoUnresolvedType;same_rangefunctionality moved toArrayMixinplus other improvements.
Fortran PSyIR Frontend
- Add support for
SAVEstatement andDO CONCURRENT; - Put WHEREs containing reductions into
CodeBlocksand fix non-unity lower-bound bug; - Bug fixes for handling of Fortran types;
- Catch unsupported statements in
implicit-partof parse tree.
Full Changelog: 2.4.0...2.5.0
2.4.0
What's Changed
LFRic
- Significant progress towards fully-automatic driver generation for extracted kernels (using PSyIR);
- Support for standalone and NetCDF kernel extraction;
- Significant progress towards generating PSyIR for the Algorithm layer;
- Many classes have been moved out of the (extremely large) dynamo0p3.py file and renamed (replacing "Dyn" with "LFRic");
- New setval_random built-in;
- Bug fixes to KernelModuleInlineTrans;
- New kernel metadata handling;
- Support for new field/operator precisions (e.g. r_solver, r_trans etc.)
- Invoke names now constrained to be valid Fortran names;
- Add compilation support to lfric/eg14 (OpenACC example);
- Allow for GH_WRITE access to arguments to inter-grid kernels;
PSyAD
- Assorted bug fixes (including kind parameter declarations, routine naming, unary minus operators);
- Application to Functions now forbidden;
- LFRic-specific support added;
- New ReferenceToArrayTrans transformation;
- Support for test-harness generation (both generic and LFRic-specific);
- Support for LFRic kernel arguments containing geometry information;
- Selection of LFRic tangent-linear kernels added under examples;
PSyIR
- Improvements to dependence analysis (induction variables, variables with names matching Sympy reserved names)
- New HoistLoopBoundExprTrans transformation;
- New routine-inlining transformation (including support for routines in a different Container);
- Support for new OpenMP tasking transformations;
- Improvements to support of OpenMP Target directives;
- Improvements to identification of private, firstprivate etc. attributes on OpenMP directives;
- SIR backend - support for intrinsics;
- Bug fix to DotproductTrans;
- New Sum2CodeTrans and {Min,Max}Val2Code transformations;
- Support for OpenMP 'teams distribute parallel do' directive;
- Improvements to SymbolTable functionality;
- Add support for static/save Symbol attribute;
- Support for Symbols that are renamed upon import;
- New HoistLocalArraysTrans;
- Addition of 'force' option to ParallelLoopTrans;
- New 'is_independent' method added to Loop to encapsulate dependence analysis;
- Support for ACC ENTER DATA and ACC UPDATE directives (data movement);
- Support for GANG and VECTOR clauses on ACC LOOP directive;
- New ACCClause nodes for specifying data movement;
- New automatic tree-update mechanism to allow ancestor nodes to update if their descendants change;
- New 'IntrinsicCall' node type used for all intrinsics (previously, some were Operations);
- All Fortran2018 intrinsics now supported;
- Fortran 'INCLUDE' statements are now forbidden (must be handled by fparser);
- Support for Fortran parameter statements;
- Support for Fortran declarations containing initialisation expressions;
- Support for Fortran 'DO WHILE' loops;
- Generic "kernel" extraction support;
- Support for assumed-shape arrays;
- Bug fix to handling of USE statements in Fortran backend;
- Improved support for Fortran INTERFACEs;
- Support for Fortran Common blocks;
- Support for 'elemental' and 'pure' Routines;
- Bug fixes for Routines CONTAINed within other Routines in Fortran;
- Added support for Fortran EQV operator;
- Bug fix for SELECT CASE involving a logical variable;
- UnknownFortranType extended to allow capture of known type information;
- Support for the use of array expressions and derived types in Sympy;
- Improvements to Node.ancestor() and new Node.path_from() method;
GOcean
- New kernel metadata handling;
- Support for OpenMP tasking;
General
- Fix to locations searched for PSyclone config file;
- Improve CLI --version interface;
- Remove constraint that supplied Fortran is free-form;
- Update to fparser 0.1.3;
- Improvements to NEMO training/tutorial material;
- Fixes to the handling of compiler flags for the libraries, examples and tutorials;
- Bug fixes to the line-length limiting module to avoid generation of lines containing only whitespace and a line-continuation character;
- Support for logical data in PSyData;
- Support for the Tau profiler using the PSyData interface;
- PSyclone integration testing implemented - correctness and performance tested for both LFRic and NEMO.
New Contributors
- @matthewrmshin made their first contribution in #1997
- @svalat made their first contribution in #2014
- @mo-lottieturner made their first contribution in #2098
- @BHFock made their first contribution in #2123
- @jwallwork23 made their first contribution in #2259
- @oakleybrunt made their first contribution in #2260
Full Changelog: 2.3.1...2.4.0
Release 2.3.1 (bug fix to 2.3.0)
This is essentially a bug-fix release. The primary change is to adopt fparser 0.0.16 in which the symbol-table consistency checks
are now disabled by default (pending further development work).
What's Changed
- Update to use fparser 0.0.16 (with symbol-table validation disabled)
- psyad ifs [closes 1720] by @rupertford in #1747
- (Closes #450) remove set_dirty/clean from ACC regions. by @arporter in #1669
- (towards #1731) Split PSyLoop node from Loop by @sergisiso in #1745
Full Changelog: 2.3.0...2.3.1