# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild

name = 'impi'
version = '5.1.2.150'

homepage = 'http://software.intel.com/en-us/intel-mpi-library/'
description = """The Intel(R) MPI Library for Linux* OS is a multi-fabric message
 passing library based on ANL MPICH2 and OSU MVAPICH2. The Intel MPI Library for
 Linux OS implements the Message Passing Interface, version 2 (MPI-2) specification."""

toolchain = {'name': 'iccifort', 'version': '2016.1.150-GCC-4.9.3-2.25'}

sources = ['l_mpi_p_%(version)s.tgz']

checksums = ['ec4db8f718c34f09fccf9d1c89454f0a']

dontcreateinstalldir = 'True'

import os
license_file = os.path.join(os.getenv('HOME'), "licenses", "intel", "license.lic")

# set up all the mpi commands to default to intel compilers
# set_mpi_wrappers_all = 'True'

moduleclass = 'mpi'

postinstallcmds = [
    'ln -s %(installdir)s/lib64/libmpi.so  %(installdir)s/lib64/libmpich.so',
    'ln -s %(installdir)s/lib64/libmpigc4.so  %(installdir)s/lib64/libmpichcxx.so',
    'ln -s %(installdir)s/lib64/libmpigf.so %(installdir)s/lib64/libfmpich.so',
    'ln -s %(installdir)s/lib64/libmpigf.so %(installdir)s/lib64/libmpichf90.so',
    'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libmpl.so',
    'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libopa.so'
]

# Salomon specific optimalization
modextravars = {
     'I_MPI_CC':                    'icc',
     'I_MPI_CXX':                   'icpc',
     'I_MPI_FC':                    'ifort',
     'I_MPI_F77':                   'ifort',
     'I_MPI_F90':                   'ifort',
     'I_MPI_HYDRA_BOOTSTRAP':       'ssh',
     'I_MPI_EXTRA_FILESYSTEM':      'enable',
     'I_MPI_EXTRA_FILESYSTEM_LIST': 'lustre'
}

