easyblock = 'ConfigureMake'

name = 'MPICH2'
version = '1.1'

homepage = 'http://www.mpich.org/'
description = """MPICH v3.x is an open source high-performance MPI 3.0 implementation.
It does not support InfiniBand (use MVAPICH2 with InfiniBand devices)."""

toolchain = {'name': 'GCC', 'version': '4.8.1'}

sources = ['mpich2-%(version)s.tar.gz']
source_urls = ['http://www.mpich.org/static/tarballs/%(version)s']

# MPICH configure wants F90/F90FLAGS to be renamed to FC/FCFLAGS.
preconfigopts = 'export FC="$F90"; export FCFLAGS="$F90FLAGS"; unset F90; unset F90FLAGS; '

sanity_check_paths = {
    'files': ['bin/mpicc', 'bin/mpicxx', 'bin/mpif77', 'bin/mpiexec', 'bin/mpirun',
              'include/mpi.h', 'include/mpif.h', 'lib/libmpich.a'],
    'dirs': [],
}

# parallel build may fail
parallel = 1

moduleclass = 'mpi'
