easyblock = 'MakeCp'

name = 'IMB'
version = '4.1'

homepage = 'https://software.intel.com/en-us/articles/intel-mpi-benchmarks'
description = """The Intel MPI Benchmarks perform a set of MPI performance measurements for point-to-point and
 global communication operations for a range of message sizes"""

toolchain = {'name': 'intel', 'version': '2017a'}
toolchainopts = {'usempi': True}

sources = ['%(name)s_%(version)s.tgz']
source_urls = ['https://software.intel.com/sites/default/files/managed/a3/b2/']

start_dir = 'src'
buildopts = 'all CC="$MPICC"'

parallel = 1

files_to_copy = [(['src/IMB-*'], 'bin'), (['doc/IMB_Users_Guide.pdf'], 'doc')]

sanity_check_paths = {
    'files': ['bin/IMB-EXT', 'bin/IMB-IO', 'bin/IMB-MPI1', 'bin/IMB-NBC', 'bin/IMB-RMA'],
    'dirs': ['bin', 'doc']
}

moduleclass = 'perf'
