# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild
# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany
# Authors::   Bernd Mohr <b.mohr@fz-juelich.de>
# License::   New BSD
#
# This work is based from experiences from the UNITE project
# http://apps.fz-juelich.de/unite/
##
easyblock = 'EB_Score_minus_P'

name = "LWM2"
version = "1.1"

homepage = 'http://www.vi-hps.org/Tools/LWM2.html'
description = """The lightweight measurement module (LWM2) is a low overhead profiler developed
 during the course of the HOPSA project. It can profile applications without any modification by
 a user. The lightweight measurement module uses a hybrid approach to profile an application. It
 samples the profiled application at regular intervals to keep track of application activity. To
 keep the overhead low, LWM2 avoids stack unwinding at each application sample. Instead, it utilizes
 direct instrumentation to earmark regions of interest in an application. When an application is
 sampled, the earmarks are checked to identify the region of application execution. As a result,
 LWM2 is able to profile application with reasonable knowledge of application activity while
 maintaining low overhead. This hybrid approach also allows LWM2 to keep track of the time spent
 by an application in different regions of execution without directly measuring the time in these
 regions. The hybrid profiling approach is also used to collect additional dat a of interest for
 some specific application activities. This includes the MPI communication calls and the amount of
 data transfer, the POSIX file I/O calls and associated data transfers, etc."""

toolchain = {'name': 'gompi', 'version': '1.4.12-no-OFED'}
toolchainopts = {"usempi": True}

# http://www.vi-hps.org/upload/projects/hopsa/lwm2-1.1.tar.gz
sources = [SOURCELOWER_TAR_GZ]
source_urls = ['http://www.vi-hps.org/upload/projects/hopsa/']

# compiler toolchain depencies
dependencies = [
    ('PAPI', '5.2.0'),
]

sanity_check_paths = {
    'files': ["bin/l2freader", ("lib64/liblwm2.a", "lib/liblwm2.a")],
    'dirs': []
}

moduleclass = 'perf'
