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
9 changes: 7 additions & 2 deletions easybuild/easyblocks/n/nvhpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import re
import stat
import sys
import platform

from easybuild.easyblocks.generic.packedbinary import PackedBinary
from easybuild.framework.easyconfig import CUSTOM
Expand Down Expand Up @@ -90,8 +91,12 @@ def __init__(self, *args, **kwargs):
"""Easyblock constructor, define custom class variables specific to NVHPC."""
super(EB_NVHPC, self).__init__(*args, **kwargs)

# Potential improvement: get "Linux_x86_64" from easybuild.tools.systemtools' get_cpu_architecture()
self.nvhpc_install_subdir = os.path.join('Linux_x86_64', self.version)
# Ideally we should be using something like `easybuild.tools.systemtools.get_cpu_architecture` here, however,
# on `ppc64le` systems this function returns `POWER` instead of `ppc64le`. Since this path needs to reflect
# `arch` (https://easybuild.readthedocs.io/en/latest/version-specific/easyconfig_templates.html) the same
# procedure from `templates.py` was reused here:
architecture = 'Linux_%s' % platform.uname()[4]
self.nvhpc_install_subdir = os.path.join(architecture, self.version)

def install_step(self):
"""Install by running install command."""
Expand Down