Skip to content

Commit

Permalink
Merge branch 'master' into 1664_acc_wait_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
arporter committed Jan 10, 2025
2 parents c099396 + b051810 commit 31f0c07
Show file tree
Hide file tree
Showing 1,754 changed files with 3,172 additions and 2,071 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2020-2024, Science and Technology Facilities Council.
# Copyright (c) 2020-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lfric_test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2023-2024, Science and Technology Facilities Council.
# Copyright (c) 2023-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nemo_tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2024, Science and Technology Facilities Council.
# Copyright (c) 2024-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nemo_v5_tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2024, Science and Technology Facilities Council.
# Copyright (c) 2024-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2023, Science and Technology Facilities Council.
# Copyright (c) 2023-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ src/*.egg-info
.venv
cov.xml
.coverage.*
*.psycache
__pycache__
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2017-2024, Science and Technology Facilities Council.
Copyright (c) 2017-2025, Science and Technology Facilities Council.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2017-2022, Science and Technology Facilities Council.
# Copyright (c) 2017-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion apt.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2019-2020, Science and Technology Facilities Council.
# Copyright (c) 2019-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion bin/psyad
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2021, Science and Technology Facilities Council
# Copyright (c) 2021-2025, Science and Technology Facilities Council
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion bin/psyclone
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2017, Science and Technology Facilities Council
# Copyright (c) 2017-2025, Science and Technology Facilities Council
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion bin/psyclone-kern
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2017-2022, Science and Technology Facilities Council
# Copyright (c) 2017-2025, Science and Technology Facilities Council
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
8 changes: 8 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
7) PR #2840 for #2839. Raise error in FortranReader if ignore_directives
is True but ignore_comments is True.

8) PR #2832 for #2831. Reorders the arguments to the parser to meet best
practices.

9) PR #2842 for #2841. Update all copyright date ranges for 2025.

10) PR #2810. Adds caching of the fparser2 parse tree to FileInfo. Is
disabled by default.

release 3.0.0 6th of December 2024

1) PR #2477 for #2463. Add support for Fortran Namelist statements.
Expand Down
2 changes: 1 addition & 1 deletion config/psyclone.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2017-2024, Science and Technology Facilities Council
# Copyright (c) 2017-2025, Science and Technology Facilities Council
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/_ext/apilinks.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2022-2024, Science and Technology Facilities Council.
# Copyright (c) 2022-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2023, Science and Technology Facilities Council.
# Copyright (c) 2023-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/APIs.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2019-2024, Science and Technology Facilities Council.
.. Copyright (c) 2019-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/code_snippets/newnode.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2020-2024, Science and Technology Facilities Council
# Copyright (c) 2020-2025, Science and Technology Facilities Council
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

# General information about the project.
project = "PSyclone Developer Guide"
project_copyright = '2017-2024, STFC Daresbury Laboratory'
project_copyright = '2017-2025, STFC Daresbury Laboratory'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/dependency.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
BSD 3-Clause License
Copyright (c) 2021-2024, Science and Technology Facilities Council.
Copyright (c) 2021-2025, Science and Technology Facilities Council.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.. -----------------------------------------------------------------------------
BSD 3-Clause License
Copyright (c) 2017-2024, Science and Technology Facilities Council.
Copyright (c) 2017-2025, Science and Technology Facilities Council.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down
66 changes: 65 additions & 1 deletion doc/developer_guide/module_manager.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2019-2024, Science and Technology Facilities Council.
.. Copyright (c) 2019-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -41,6 +41,8 @@

.. _module_manager:



Module Manager
##############

Expand Down Expand Up @@ -135,3 +137,65 @@ which prints the filenames of all modules used in ``tl_testkern_mod``:
Module: constants_mod constants_mod.f90
Module: fs_continuity_mod fs_continuity_mod.f90
Module: kernel_mod kernel_mod.f90



FileInfo
========

FileInfo is a class that is used to store information about Fortran files.

This information can include:

- The source code itself
- The fparser tree information
- The PSyIR tree information

All this information is gathered in this single class since this also
allows for caching of it, see next section



Caching
=======

The `ModuleManager` and `FileInfo` support a caching of the
fparser tree representation of a source code.
(Support for PSyIR is planned)

This caching has to be **explicitly enabled** in the constructor
of `ModuleManager`.


.. testcode ::
mod_manager = ModuleManager.get(use_caching=True)
Most of the time in the PSyIR generation is currently spent in the
fparser tree generation. Consequently, this leads to significant
speed-ups in the process of reading and parsing the source code
of modules.

The default cache file is named the same way as the source file,
but replaces the file extension with `.psycache`. E.g., a cache file
for the source file `foo.f90` will be called `foo.psycache`.

The caching algorithm to obtain the fparser tree OR PSyIR is briefly described as follows:

- If fparser tree / PSyIR was read before: RETURN fparser tree or PSyIR
- If source code is not yet read:

- Read the content of the file
- Create the source's checksum.
- Read cache file if it exists:

- If the checksum of the cache is the same as the one of the source:

- load the fparser tree / PSyIR from the cache file and RETURN fparser tree or PSyIR
- Create the fparser tree / PSyIR from the source code
- Save cache file IF it was not loaded before:

- Update cache information
- Store to cache file
- RETURN fparser tree or PSyIR
2 changes: 1 addition & 1 deletion doc/developer_guide/modules.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2019-2024, Science and Technology Facilities Council.
.. Copyright (c) 2019-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/pip_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2018-2023, Science and Technology Facilities Council.
# Copyright (c) 2018-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/psy_data.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2019-2024, Science and Technology Facilities Council.
.. Copyright (c) 2019-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/psyir.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2019-2024, Science and Technology Facilities Council.
.. Copyright (c) 2019-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/psyir_backends.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
BSD 3-Clause License
Copyright (c) 2017-2024, Science and Technology Facilities Council.
Copyright (c) 2017-2025, Science and Technology Facilities Council.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/psyir_symbols.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
BSD 3-Clause License
Copyright (c) 2020-2024, Science and Technology Facilities Council.
Copyright (c) 2020-2025, Science and Technology Facilities Council.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/psykal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2018-2024, Science and Technology Facilities Council.
.. Copyright (c) 2018-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/sympy.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2021-2024, Science and Technology Facilities Council.
.. Copyright (c) 2021-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/transformations.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2019-2024, Science and Technology Facilities Council.
.. Copyright (c) 2019-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/working_practises.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2019-2024, Science and Technology Facilities Council.
.. Copyright (c) 2019-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/psyad/user_guide/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# BSD 3-Clause License
#
# Copyright (c) 2023, Science and Technology Facilities Council.
# Copyright (c) 2023-2025, Science and Technology Facilities Council.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion doc/psyad/user_guide/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# -- Project information -----------------------------------------------------

project = 'PSyAD'
copyright = '2021-2023, Rupert Ford and Andrew Porter'
copyright = '2021-2025, Rupert Ford and Andrew Porter'
author = 'Rupert Ford and Andrew Porter'

# The full version, including alpha/beta/rc tags
Expand Down
2 changes: 1 addition & 1 deletion doc/psyad/user_guide/implementation.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. -----------------------------------------------------------------------------
.. BSD 3-Clause License
..
.. Copyright (c) 2021-2024, Science and Technology Facilities Council.
.. Copyright (c) 2021-2025, Science and Technology Facilities Council.
.. All rights reserved.
..
.. Redistribution and use in source and binary forms, with or without
Expand Down
Loading

0 comments on commit 31f0c07

Please sign in to comment.