Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psyclone 3 support #388

Open
wants to merge 430 commits into
base: main
Choose a base branch
from
Open

Psyclone 3 support #388

wants to merge 430 commits into from

Conversation

hiker
Copy link
Collaborator

@hiker hiker commented Feb 14, 2025

Supports the new 3.0 release, but also older PSyclone versions.

hiker and others added 30 commits June 7, 2024 10:29
… only one artefact set is involved when running PSyclone.
…les to the default build artefact collections.
hiker added 27 commits November 20, 2024 09:54
…ive compiler names are longer (crayftn-cray, craycc-cray).
…ms with compiler wrapper which do not support this).
@hiker hiker requested a review from MatthewHambley February 14, 2025 13:42
@hiker hiker changed the title Psyclone 3 support clean Psyclone 3 support Feb 14, 2025
Copy link
Collaborator

@MatthewHambley MatthewHambley left a comment

Choose a reason for hiding this comment

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

I think there may be a better way of handling the change of behaviour between versions.

Comment on lines +70 to +79
# The behaviour of PSyclone changes from 2.5.0 to the next
# release. But since head-of-trunk still reports 2.5.0, we
# need to run additional tests to see if we have the official
# 2.5.0 release, or current trunk (which already has the new
# command line options). PSyclone needs an existing file
# in order to work, so use __file__ to present this file.
# PSyclone will obviously abort since this is not a Fortran
# file, but we only need to check the error message to
# see if the domain name is incorrect (--> current trunk)
# or not (2.5.0 release)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not only has PSyclone 2.5.0 been released but so has 3.0.0. So any special cases can be removed and this section can be streamlined.

self._api = api
self._version = None

def check_available(self) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this whole complication, or a good section of it, be replaced by making use of shutil.which(...)?

Comment on lines +127 to +128
if api and api.lower() == "nemo":
api = ""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than trying to make on class support quite different versions of the tool would it make sense to have an old PSyclone and a new PSyclone class with some sort of factory process to choose between them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants