Skip to content

Commit

Permalink
orca: add 6.0.0 avx2 version (spack#45824)
Browse files Browse the repository at this point in the history
The avx2 version can be downloaded from the ORCA [forum](https://orcaforum.kofo.mpg.de/app.php/dlext/?view=detail&df_id=214#).

The version is named `avx2-6.0.0` (as opposed to the more
natural-looking `6.0.0-avx2`) to avoid the avx2 version shadowing the
non-avx2 one. Definitely open for better suggestion.
  • Loading branch information
linsword13 authored Aug 21, 2024
1 parent c296525 commit dc3c96d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions var/spack/repos/builtin/packages/orca/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class Orca(Package):

license("LGPL-2.1-or-later")

version(
"avx2-6.0.0", sha256="02c21294efe7b1b721e26cb90f98ee15ad682d02807201b7d217dfe67905a2fd"
)
version("6.0.0", sha256="219bd1deb6d64a63cb72471926cb81665cbbcdec19f9c9549761be67d49a29c6")
version("5.0.4", sha256="c4ea5aea60da7bcb18a6b7042609206fbeb2a765c6fa958c5689d450b588b036")
version("5.0.3", sha256="b8b9076d1711150a6d6cb3eb30b18e2782fa847c5a86d8404b9339faef105043")
Expand All @@ -40,17 +43,22 @@ class Orca(Package):
"5.0.3": "4.1.2",
"5.0.4": "4.1.2",
"6.0.0": "4.1.6",
"avx2-6.0.0": "4.1.6",
}
for orca_version, openmpi_version in openmpi_versions.items():
depends_on(
"openmpi@{0}".format(openmpi_version), type="run", when="@{0}".format(orca_version)
)

def url_for_version(self, version):
openmpi_version = self.openmpi_versions[str(version.dotted)].replace(".", "")
openmpi_version = self.openmpi_versions[version.string].replace(".", "")
if openmpi_version == "412":
openmpi_version = "411"
return f"file://{os.getcwd()}/orca_{version.underscored}_linux_x86-64_shared_openmpi{openmpi_version}.tar.xz"
ver_parts = version.string.split("-")
ver_underscored = ver_parts[-1].replace(".", "_")
features = ver_parts[:-1] + ["shared"]
feature_text = "_".join(features)
return f"file://{os.getcwd()}/orca_{ver_underscored}_linux_x86-64_{feature_text}_openmpi{openmpi_version}.tar.xz"

def install(self, spec, prefix):
mkdirp(prefix.bin)
Expand Down

0 comments on commit dc3c96d

Please sign in to comment.