Skip to content
Merged
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
15 changes: 12 additions & 3 deletions easybuild/toolchains/nvhpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@
* Andreas Herten (Forschungszentrum Juelich)
* Alex Domingo (Vrije Universiteit Brussel)
"""
import inspect

from easybuild.toolchains.gcccore import GCCcore
from easybuild.toolchains.linalg.nvblas import NVBLAS
from easybuild.toolchains.linalg.nvscalapack import NVScaLAPACK
from easybuild.toolchains.mpi.nvhpcx import NVHPCX
from easybuild.toolchains.nvidia_compilers import NvidiaCompilersToolchain
from easybuild.tools.build_log import print_warning
from easybuild.tools.toolchain.toolchain import SYSTEM_TOOLCHAIN_NAME


Expand All @@ -51,8 +54,8 @@ def __new__(cls, *args, **kwargs):
# legacy NVHPC toolchains are compiler-only toolchains
# on top of GCCcore, switch to corresponding class
return NVHPCToolchain(*args, **kwargs)
else:
return super().__new__(cls)

return super().__new__(cls)


class NVHPCToolchain(NvidiaCompilersToolchain):
Expand All @@ -65,4 +68,10 @@ class NVHPCToolchain(NvidiaCompilersToolchain):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

self.log.deprecated("NVHPCToolchain was replaced by NvidiaCompilersToolchain in EasyBuild 5.2.0", '6.0')
# print deprecation warning (stick to warning level in CI tests)
warn_msg = "NVHPCToolchain was replaced by NvidiaCompilersToolchain in EasyBuild 5.2.0"
in_test_env = any('unittest' in frame.filename for frame in inspect.stack())
if in_test_env:
print_warning(warn_msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this require adapting the easyconfig tests such that this printed message does not cause GHA CI failure?

else:
self.log.deprecated(warn_msg, '6.0')