Skip to content
Snippets Groups Projects
Commit b753d9f2 authored by Sebastian Achilles's avatar Sebastian Achilles
Browse files

{tools}[system] ARMForge v21.1.2

parent 60227d35
Branches
No related tags found
No related merge requests found
......@@ -2,6 +2,13 @@
Overview of the custom EasyBlocks.
## allinea
- __*added by*__ s.achilles
- __*needed because*__ we need to allow multipled license files
- __*difference compared to upstream*__ the aforementioned parameter
- __*can not be removed*__ at least until that option is merged upstream
## MPICH
- __*added by*__ d.alvarez
......
##
# Copyright 2013-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# https://github.com/easybuilders/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
##
"""
EasyBuild support for building and installing Allinea tools, implemented as an easyblock
@author: Kenneth Hoste (Ghent University)
@author: Sebastian Achilles (Forschungszentrum Juelich GmbH)
"""
import os
import shutil
import stat
from easybuild.easyblocks.generic.binary import Binary
from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.filetools import adjust_permissions, copy_file
from easybuild.tools.py2vs3 import string_type
class EB_Allinea(Binary):
"""Support for building/installing Allinea."""
@staticmethod
def extra_options(extra_vars=None):
"""Define extra easyconfig parameters specific to Allinea."""
extra = Binary.extra_options(extra_vars)
extra.update({
'templates': [[], "List of templates.", CUSTOM],
'sysconfig': [None, "system.config file to install.", CUSTOM],
})
return extra
def extract_step(self):
"""Extract Allinea installation files."""
EasyBlock.extract_step(self)
def configure_step(self):
"""No configuration for Allinea."""
# ensure a license file is specified
if self.cfg['license_file'] is None:
raise EasyBuildError("No license file specified.")
def build_step(self):
"""No build step for Allinea."""
pass
def install_step(self):
"""Install Allinea using install script."""
if self.cfg['install_cmd'] is None:
self.cfg['install_cmd'] = "./textinstall.sh --accept-licence %s" % self.installdir
super(EB_Allinea, self).install_step()
# copy license file
# allow to copy multiple licenses
lic_path = os.path.join(self.installdir, 'licences')
licenses = self.cfg['license_file']
if isinstance(licenses, string_type):
licenses = [licenses]
try:
for license in licenses:
shutil.copy2(license, lic_path)
except OSError as err:
raise EasyBuildError(
"Failed to copy license file to %s: %s", lic_path, err)
# copy templates
templ_path = os.path.join(self.installdir, 'templates')
for templ in self.cfg['templates']:
path = self.obtain_file(templ, extension='qtf')
if path:
self.log.debug('Template file %s found' % path)
else:
raise EasyBuildError('No template file named %s found', templ)
try:
# use shutil.copy (not copy2) so that permissions of copied file match with rest of installation
shutil.copy(path, templ_path)
except OSError as err:
raise EasyBuildError(
"Failed to copy template %s to %s: %s", templ, templ_path, err)
# copy system.config if requested
sysconf_path = os.path.join(self.installdir, 'system.config')
if self.cfg['sysconfig'] is not None:
path = self.obtain_file(self.cfg['sysconfig'], extension=False)
if path:
self.log.debug('system.config file %s found' % path)
else:
raise EasyBuildError(
'No system.config file named %s found', sysconf_path)
copy_file(path, sysconf_path)
adjust_permissions(sysconf_path, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH,
recursive=False, relative=False)
def sanity_check_step(self):
"""Custom sanity check for Allinea."""
custom_paths = {
'files': ['bin/ddt', 'bin/map'],
'dirs': [],
}
super(EB_Allinea, self).sanity_check_step(custom_paths=custom_paths)
# For using $SYSTEMNAME to determine license path. The local prefix is to appease the checker
import os as local_os
easyblock = 'EB_Allinea'
name = 'ARMForge'
version = '21.1.2'
homepage = 'https://developer.arm.com/tools-and-software/server-and-hpc/debug-and-profile/arm-forge'
description = """
Arm Forge is the leading server and HPC development tool suite in research, industry, and academia for C, C++, Fortran,
and Python high performance code on Linux.
Arm Forge includes Arm DDT, the best debugger for time-saving high performance application debugging, Arm MAP, the
trusted performance profiler for invaluable optimization advice, and Arm Performance Reports to help you analyze your
HPC application runs.
"""
usage = """For more information, type "ddt -h" or "map -h"
For the ARM DDT and MAP User Guide, please see: "$EBROOTARMFORGE/doc/userguide.pdf"
"""
site_contacts = 'Michael Knobloch <m.knobloch@fz-juelich.de>, Sebastian Achilles <s.achilles@fz-juelich.de>'
toolchain = SYSTEM
sources = ['arm-forge-%(version)s-linux-x86_64.tar']
source_urls = ['https://content.allinea.com/downloads/']
checksums = ['2d4b366a3f23f3c9efba96bd6f8cce1f']
start_dir = '%(builddir)s/arm-forge-%(version)s-linux-x86_64/'
install_cmd = "./textinstall.sh --accept-licence %(installdir)s"
local_licdir = '/p/software/%s/licenses/armforge' % local_os.environ['SYSTEMNAME']
license_file = [
'%s/LicenseForge.lic' % local_licdir,
'%s/LicensePR.lic' % local_licdir
]
sanity_check_paths = {
'files': ['bin/ddt'],
'dirs': [],
}
moduleclass = 'tools'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment