Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
| ericaneininger | Erica Neininger | Met Office | 2026-03-02 |
| mo-lucy-gordon | Lucy Gordon | Met Office | 2026-03-18 |
| shreybh1 | Shrey Bhardwaj | Met Office | 2026-03-26 |
| sergisiso | Sergi Siso | UKRI-STFC | 2026-04-20 |


2 changes: 1 addition & 1 deletion applications/coupled/documentation/mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ operations which can be specified within an invoke call in the algorithm layer b
directly by the infrastructure.

For more up-to-date information about the <b>LFRic-specific Built-ins</b> functionality (e.g. names, argument order) please refer to the
<a href="https://github.com/stfc/PSyclone/blob/master/doc/dynamo0p3.rst#built-ins">dynamo 0.3 API Built-ins documentation</a>.
<a href="https://github.com/stfc/PSyclone/blob/master/doc/user_guide/lfric.rst#built-ins">dynamo 0.3 API Built-ins documentation</a>.


2 changes: 1 addition & 1 deletion applications/simple_diffusion/documentation/mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ operations which can be specified within an invoke call in the algorithm layer b
directly by the infrastructure.

For more up-to-date information about the <b>LFRic-specific Built-ins</b> functionality (e.g. names, argument order) please refer to the
<a href="https://github.com/stfc/PSyclone/blob/master/doc/dynamo0p3.rst#built-ins">dynamo 0.3 API Built-ins documentation</a>.
<a href="https://github.com/stfc/PSyclone/blob/master/doc/user_guide/lfric.rst#built-ins">dynamo 0.3 API Built-ins documentation</a>.


2 changes: 1 addition & 1 deletion applications/skeleton/documentation/mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ operations which can be specified within an invoke call in the algorithm layer b
directly by the infrastructure.

For more up-to-date information about the <b>LFRic-specific Built-ins</b> functionality (e.g. names, argument order) please refer to the
<a href="https://github.com/stfc/PSyclone/blob/master/doc/dynamo0p3.rst#built-ins">dynamo 0.3 API Built-ins documentation</a>.
<a href="https://github.com/stfc/PSyclone/blob/master/doc/user_guide/lfric.rst#built-ins">dynamo 0.3 API Built-ins documentation</a>.


11 changes: 11 additions & 0 deletions components/driver/source/mesh/runtime_partition_lfric_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,35 @@ subroutine get_partition_parameters( partitioning_nml, &
panel_xproc = partitioning_nml%panel_xproc()
panel_yproc = partitioning_nml%panel_yproc()

! nvfortran does not properly support the polymorphic allocation, to fix it
! deallocate the polymorphic class and allocate each concrete type inside
! the select cases
if (allocated(decomposition)) deallocate(decomposition)

select case (panel_decomposition)

case ( panel_decomposition_auto )
allocate(auto_decomposition_type :: decomposition)
decomposition = auto_decomposition_type()

case ( panel_decomposition_row )
allocate(row_decomposition_type :: decomposition)
decomposition = row_decomposition_type()

case ( panel_decomposition_column )
allocate(column_decomposition_type :: decomposition)
decomposition = column_decomposition_type()

case ( panel_decomposition_custom )
allocate(custom_decomposition_type :: decomposition)
decomposition = custom_decomposition_type( panel_xproc, panel_yproc )

case ( panel_decomposition_auto_nonuniform )
allocate(auto_nonuniform_decomposition_type :: decomposition)
decomposition = auto_nonuniform_decomposition_type()

case ( panel_decomposition_guided_nonuniform )
allocate(guided_nonuniform_decomposition_type :: decomposition)
decomposition = guided_nonuniform_decomposition_type( panel_xproc )

case default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

module sci_map_inter_element_order_alg_mod

use constants_mod, only: i_def
use constants_mod, only: i_def, r_def
use field_mod, only: field_type
use integer_field_mod, only: integer_field_type
use fs_continuity_mod, only: W3, Wtheta, W2
Expand Down
4 changes: 2 additions & 2 deletions documentation/source/how_to_use_it/lfric_datamodel/field.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ rather than adopting the name of the original field.
take advantage of any shared memory parallelism. Therefore, use of
``copy_field_serial`` is not advised. If the data needs to be
copied, then use the ``setval_x`` `built-in
<https://psyclone.readthedocs.io/en/stable/dynamo0p3.html#setting-to-a-value>`_
<https://psyclone.readthedocs.io/en/stable/user_guide/lfric.html#setting-to-a-value>`_
after the field is initialised. Initialising new fields with
``setval_x`` allows PSyclone to optimise the copy.

Expand Down Expand Up @@ -270,7 +270,7 @@ The infrastructure supports 32-bit integer fields:
``integer_field_type``. Their creation and usage is essentially the
same as for real fields. One key difference is that real fields and
integer fields have their own set of `PSyclone built-in operations
<https://psyclone.readthedocs.io/en/stable/dynamo0p3.html#built-in-operations-on-integer-valued-fields>`_.
<https://psyclone.readthedocs.io/en/stable/user_guide/lfric.html#built-in-operations-on-integer-valued-fields>`_.

Currently, there is no known requirement for 64-bit integer fields, so
a 64-bit integer field is not supported.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ version, and finally the next entity / argument.

The ``fs_type`` refers to one of a number of available function space
types. A `high-level description
<https://psyclone.readthedocs.io/en/stable/dynamo0p3.html#supported-function-spaces>`_
<https://psyclone.readthedocs.io/en/stable/user_guide/lfric.html#supported-function-spaces>`_
of supported function spaces can be found in the PSyclone
documentation. Refer to GungHo documentation for a comprehensive
description of each function space.
Expand Down
10 changes: 10 additions & 0 deletions infrastructure/build/cxx/amdclang++.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
##############################################################################
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
##############################################################################

$(info ** Chosen AMD Clang C++ compiler)

CXX_RUNTIME_LIBRARY=stdc++
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the AMD compiler use the GNU C++ runtime?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it uses the Clang runtime, the message was a leftover from copy-pasting the GNU file.


35 changes: 35 additions & 0 deletions infrastructure/build/fortran/amdflang.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
##############################################################################
# (c) Crown copyright Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
##############################################################################
# Various things specific to the amdflang compiler.
##############################################################################

$(info ** Chosen AMD Flang)

F_MOD_DESTINATION_ARG = -J
F_MOD_SOURCE_ARG = -I

FFLAGS_OPENMP = -fopenmp
LDFLAGS_OPENMP = -fopenmp

FFLAGS_COMPILER =
FFLAGS_NO_OPTIMISATION = -O0
FFLAGS_SAFE_OPTIMISATION = -O2
FFLAGS_RISKY_OPTIMISATION = -Ofast
FFLAGS_DEBUG = -g
FFLAGS_WARNINGS =
FFLAGS_UNIT_WARNINGS =
FFLAGS_INIT =
FFLAGS_RUNTIME =
# fast-debug flags set separately as Intel compiler needs platform-specific control on them
FFLAGS_FASTD_INIT = $(FFLAGS_INIT)
FFLAGS_FASTD_RUNTIME = $(FFLAGS_RUNTIME)

# Option for checking code meets Fortran standard (flang only supports 2018)
FFLAGS_FORTRAN_STANDARD = -std=f2018

LDFLAGS_COMPILER =

FPPFLAGS = -P
21 changes: 13 additions & 8 deletions infrastructure/build/psyclone/psyclone_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@
from psyclone.domain.lfric import LFRicConstants
from psyclone.psyGen import InvokeSchedule
from psyclone.psyir.nodes import Loop, Routine, Directive
try:
from psyclone.psyir.transformations import OMPParallelTrans
except ImportError:
# Support for psyclone < 3.3
from psyclone.transformations import OMPParallelTrans

from psyclone.transformations import (
Dynamo0p3ColourTrans,
Dynamo0p3OMPLoopTrans,
Dynamo0p3RedundantComputationTrans,
OMPParallelTrans,
LFRicColourTrans,
LFRicOMPLoopTrans,
LFRicRedundantComputationTrans,
)

# List of allowed 'setval_*' built-ins for redundant computation transformation
Expand Down Expand Up @@ -50,7 +55,7 @@ def redundant_computation_setval(psyir):

"""
# Import redundant computation transformation
rtrans = Dynamo0p3RedundantComputationTrans()
rtrans = LFRicRedundantComputationTrans()

# Loop over all the InvokeSchedule in the PSyIR object
for subroutine in psyir.walk(InvokeSchedule):
Expand All @@ -72,14 +77,14 @@ def colour_loops(psyir, enable_tiling=False):
"""
Applies the colouring transformation to all applicable loops and optionally
enables tiling.
It creates the instance of `Dynamo0p3ColourTrans` only once.
It creates the instance of `LFRicColourTrans` only once.

:param psyir: the PSyIR of the PSy-layer.
:type psyir: :py:class:`psyclone.psyir.nodes.FileContainer`

"""
const = LFRicConstants()
ctrans = Dynamo0p3ColourTrans()
ctrans = LFRicColourTrans()

# Loop over all the subroutines in the PSyIR object
for subroutine in psyir.walk(Routine):
Expand All @@ -104,7 +109,7 @@ def openmp_parallelise_loops(psyir):
:type psyir: :py:class:`psyclone.psyir.nodes.FileContainer`

"""
otrans = Dynamo0p3OMPLoopTrans()
otrans = LFRicOMPLoopTrans()
oregtrans = OMPParallelTrans()

# Loop over all the InvokeSchedule in the PSyIR object
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/source/kernel_metadata/argument_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
!> @details In order to create the correct PSy code, PSyclone requires several
!! kernel argument properties. These properties are stored in kernels
!! as the kernel metadata descriptors (see PSyclone documentation:
!! https://psyclone.readthedocs.io/en/stable/dynamo0p3.html#metadata).
!! https://psyclone.readthedocs.io/en/stable/user_guide/lfric.html#metadata).
!! The elements of PSyclone LFRic API kernel metadata are:
!!
!! 1) `type(arg_type) :: meta_args(...)` that describes properties of
Expand Down
Loading