summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/msmpi/package.py
blob: 0e5584cf298d6f3bb1c1d9afd3db260aa53655f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class Msmpi(Package):
    """A Windows-specced build of MPICH provided directly by
    Microsoft Support Team
    """

    homepage = "https://www.microsoft.com/en-us/download/default.aspx"
    maintainers = ["jpopelar"]

    executable = ["mpiexec.exe"]

    version(
        "10.0",
        sha256="7dae13797627726f67fab9c1d251aec2df9ecd25939984645ec05748bdffd396",
        extension="exe",
        expand=False,
    )

    provides("mpi")

    conflicts("platform=linux")
    conflicts("platform=darwin")
    conflicts("platform=cray")

    def url_for_version(self, version):
        return "https://download.microsoft.com/download/A/E/0/AE002626-9D9D-448D-8197-1EA510E297CE/msmpisetup.exe"

    def determine_version(self, exe):
        output = Executable("mpiexec.exe")
        ver_str = re.search("[Version ([0-9.]+)]", output)
        return Version(ver_str.group(0)) if ver_str else None

    def install(self, spec, prefix):
        installer = Executable("msmpisetup.exe")
        installer("-unattend")