##
# This is an easyconfig file for EasyBuild, see https://github.com/easybuilders/easybuild
# Copyright:: Copyright 2013-2023 Juelich Supercomputing Centre, Germany
# Authors::   Bernd Mohr <b.mohr@fz-juelich.de>
#             Markus Geimer <m.geimer@fz-juelich.de>
#             Christian Feld <c.feld@fz-juelich.de>
# License::   3-clause BSD
#
# This work is based on experiences from the UNITE project
# http://apps.fz-juelich.de/unite/
##

easyblock = 'EB_Score_minus_P'

name = 'Scalasca'
version = 'deepsea-v1'

homepage = 'https://www.scalasca.org/'
description = """
Scalasca is a software tool that supports the performance optimization of
parallel programs by measuring and analyzing their runtime behavior. The
analysis identifies potential performance bottlenecks -- in particular
those concerning communication and synchronization -- and offers guidance
in exploring their causes.
"""

toolchain = {'name': 'gpsmpi', 'version': '2022a-pmix'}

source_urls = ['https://apps.fz-juelich.de/scalasca/project/deep-sea']
sources = ['scalasca-deepsea-v1.tar.gz']
checksums = [
    '2c7ff194ee5c59b2213f0a7fe6e5f005eb15f4e16e9abad63a6cc648d8c3394c',  # scalasca-deepsea-v1.tar.gz
]
builddependencies = [
    ('CubeWriter', '4.8.2'),
]

dependencies = [
    ('CubeGUI', '4.8.2'),
    ('CubeLib', '4.8.2'),
    ('OTF2', '3.0.3'),
    ('Score-P', 'deepsea-v1'),
]

sanity_check_paths = {
    'files': ['bin/scalasca', ('lib/libpearl.replay.a', 'lib64/libpearl.replay.a')],
    'dirs': [],
}

# note that modextrapaths can be used for relative paths only
modextrapaths = {
    # Ensure that local metric documentation is found by CubeGUI
    'CUBE_DOCPATH': 'share/doc/scalasca/patterns'
}

modextravars = {
    # Specifies an optional list of colon separated paths identifying
    # suitable file systems for tracing. If set, the file system of
    # trace measurements has to match at least one of the specified
    # file systems.
    'SCAN_TRACE_FILESYS': '/p/project:/p/scratch:/p/cscratch:/p/fastdata:/p/largedata:/p/largedata2'
}

moduleclass = 'perf'