Skip to content

Conversation

@nmnobre
Copy link
Member

@nmnobre nmnobre commented Oct 14, 2025

pytest seems to be twice as fast?! O.o
I've left python 3.9 and updated the docs to reflect that, though it'll be EOL in two weeks (as agreed in #3043).

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.90%. Comparing base (2f6bd75) to head (bee308f).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3190   +/-   ##
=======================================
  Coverage   99.90%   99.90%           
=======================================
  Files         376      376           
  Lines       53157    53158    +1     
=======================================
+ Hits        53105    53106    +1     
  Misses         52       52           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nmnobre nmnobre marked this pull request as ready for review October 14, 2025 17:28
@sergisiso
Copy link
Collaborator

Impressive results, but the LFRic extraction fails while using fab? So maybe one for @hiker to look at. The log shows:

fab workspace is /archive/psyclone-tests/latest-run/extraction_test/lfric_apps/applications/gungho_model/fab_workspace
Error getting compiler version: Error asking for version of compiler 'ifort'
Error getting compiler version: Unexpected version output format for compiler 'mpif90-ifort': GNU Fortran (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)

(which we already had before)

But also:

run_command: rsync --times --links --stats -ru /archive/psyclone-tests/latest-run/extraction_test/lfric_core/infrastructure/source/ /archive/psyclone-tests/latest-run/extraction_test/lfric_apps/applications/gungho_model/fab_workspace/gungho_model_extract-fast-debug-mpif90-gfortran/source
Process Process-1:
Traceback (most recent call last):
  File "/apps/packages/python/3.14.0/lib/python3.14/multiprocessing/process.py", line 320, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/apps/packages/python/3.14.0/lib/python3.14/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/archive/psyclone-tests/action-runner-software/actions-runner/_work/PSyclone-mirror/PSyclone-mirror/.runner_venv/lib/python3.14/site-packages/fab/metrics.py", line 98, in _read_metric
    _metric_send_conn.close()  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'close'
grab_folder took 0.064s

The process still continues and finally fails with:

Building 'gungho_model_extract-fast-debug-mpif90-gfortran' took 0:00:12.983063
matplotlib not installed, no metrics summary charts produced
Traceback (most recent call last):
  File "/archive/psyclone-tests/latest-run/extraction_test/lfric_apps/applications/gungho_model/./fab_gungho_model_extract.py", line 35, in <module>
    fab_gungo.build()
    ~~~~~~~~~~~~~~~^^
  File "/archive/psyclone-tests/latest-run/extraction_test/lfric_core/infrastructure/build/fab/baf_base.py", line 689, in build
    self.analyse_step()
    ~~~~~~~~~~~~~~~~~^^
  File "/archive/psyclone-tests/latest-run/extraction_test/lfric_core/infrastructure/build/fab/lfric_base.py", line 367, in analyse_step
    self.psyclone_step()
    ~~~~~~~~~~~~~~~~~~^^
  File "/archive/psyclone-tests/latest-run/extraction_test/lfric_core/infrastructure/build/fab/extract_mixin.py", line 102, in psyclone_step
    super().psyclone_step()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/archive/psyclone-tests/latest-run/extraction_test/lfric_core/infrastructure/build/fab/lfric_base.py", line 395, in psyclone_step
    psyclone(self.config, kernel_roots=[self.config.build_output],
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             transformation_script=self.get_transformation_script,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             api="dynamo0.3",
             ^^^^^^^^^^^^^^^^
             cli_args=psyclone_cli_args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/archive/psyclone-tests/action-runner-software/actions-runner/_work/PSyclone-mirror/PSyclone-mirror/.runner_venv/lib/python3.14/site-packages/fab/steps/__init__.py", line 26, in wrapper
    func(*args, **kwargs)
    ~~~~^^^^^^^^^^^^^^^^^
  File "/archive/psyclone-tests/action-runner-software/actions-runner/_work/PSyclone-mirror/PSyclone-mirror/.runner_venv/lib/python3.14/site-packages/fab/steps/psyclone.py", line 128, in psyclone
    analysed_x90 = _analyse_x90s(config, x90s)
  File "/archive/psyclone-tests/action-runner-software/actions-runner/_work/PSyclone-mirror/PSyclone-mirror/.runner_venv/lib/python3.14/site-packages/fab/steps/psyclone.py", line 199, in _analyse_x90s
    check_for_errors(results=x90_analyses)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/archive/psyclone-tests/action-runner-software/actions-runner/_work/PSyclone-mirror/PSyclone-mirror/.runner_venv/lib/python3.14/site-packages/fab/steps/__init__.py", line 100, in check_for_errors
    raise RuntimeError(
        f"{formatted_errors}\n\n{len(exceptions)} error(s) found {caller_label}"
    )
RuntimeError: error parsing file '/archive/psyclone-tests/latest-run/extraction_test/lfric_apps/applications/gungho_model/fab_workspace/gungho_model_extract-fast-debug-mpif90-gfortran/source/algorithm/diagnostics/checks_and_balances_alg_mod.parsable_x90':
unhandled error '<class 'KeyError'>' in /archive/psyclone-tests/latest-run/extraction_test/lfric_apps/applications/gungho_model/fab_workspace/gungho_model_extract-fast-debug-mpif90-gfortran/source/algorithm/diagnostics/checks_and_balances_alg_mod.parsable_x90

@nmnobre
Copy link
Member Author

nmnobre commented Oct 15, 2025

I tried reproducing the error by executing what's in here for one of the given files and... it worked :/

from fparser.two.utils import FortranSyntaxError
from fparser.two.parser import ParserFactory
from fparser.common.readfortran import FortranFileReader

fpath="/archive/psyclone-tests/latest-run/extraction_test/lfric_apps/applications/gungho_model/fab_workspace/gungho_model_extract-fast-debug-mpif90-gfortran/source/algorithm/diagnostics/checks_and_balances_alg_mod.parsable_x90"

f2008_parser = ParserFactory().create(std=None or "f2008")

reader = FortranFileReader(str(fpath), ignore_comments=False, include_omp_conditional_lines=True)

tree = f2008_parser(reader)

In any case, the good news is it's fparser throwing the exception... Unfortunately, I noticed that running the last command on that snippet more than once crashes - I'm not sure if that's related - but I'm also inclined to say that's not intended behaviour?

@sergisiso
Copy link
Collaborator

This is probably intended (we pass a reader stream that has already been consumed), but regardless it also fails with older python interpreters. So it is not the issue here I believe.

@nmnobre
Copy link
Member Author

nmnobre commented Oct 15, 2025

This is probably intended (we pass a reader stream that has already been consumed), but regardless it also fails with older python interpreters. So it is not the issue here I believe.

Ah, I see, it makes good sense if it behaves like a stream: maybe the name should reflect that :P
And, yes, I can confirm this happens with older versions too.

I'm tempted to run the tests serially, that's the only thing I can think of...

@nmnobre
Copy link
Member Author

nmnobre commented Oct 16, 2025

So, just to leave in writing what we discussed verbally earlier. This is ready to go, it bumps the python version to 3.14 for all tests except for the LFRic extraction tests that use fab, that's now the subject of #3192.

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

@nmnobre This has passed the CI and all integration tests, I will bring it up to date and merge.

@sergisiso sergisiso merged commit c9c20b1 into master Oct 16, 2025
15 checks passed
@sergisiso sergisiso deleted the pi branch October 16, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants