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': 'foss', 'version': '2016a'}

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

start_dir = 'src'
prebuildopts = 'export MPI_HOME=$EBROOTOPENMPI && '
buildopts = "-f make_mpich MPI_HOME=$EBROOTOPENMPI"

parallel = 1

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

sanity_check_paths = {
    'files': ['bin/%s' % binfile for binfile in ['IMB-RMA', 'IMB-EXT', 'IMB-NBC', 'IMB-MPI1']],
    'dirs': ['bin','doc']
}

moduleclass = 'perf'
