Skip to content

Commit

Permalink
rebuild with spack 0.19.0
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Jul 15, 2023
1 parent 651dd80 commit f373b2f
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 8 deletions.
12 changes: 7 additions & 5 deletions spack/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ RUN mkdir /opt/spack-environment \
&& echo " view: /opt/view") > /opt/spack-environment/spack.yaml

# Install the software, remove unnecessary deps
# Note that spack 0.20.0 comes with libfabric 1.18.0, so not too far off
RUN cd /opt/spack-environment \
&& git clone --single-branch --branch v0.20.0 https://github.com/spack/spack.git \
&& rm ./spack/var/spack/repos/builtin/packages/libfabric/package.py \
&& wget -O ./spack/var/spack/repos/builtin/packages/libfabric/package.py https://raw.githubusercontent.com/spack/spack/11bc27d984a1008f254abf6690c2d96c418b0c42/var/spack/repos/builtin/packages/libfabric/package.py \
&& . spack/share/spack/setup-env.sh \
&& git clone --single-branch --branch v0.19.0 https://github.com/spack/spack.git \
&& rm ./spack/var/spack/repos/builtin/packages/libfabric/package.py

# We have to edit this to remove maintainers - not supported in older spack
COPY ./package.py /opt/spack-environment/spack/var/spack/repos/builtin/packages/libfabric/package.py
RUN cd /opt/spack-environment \
&& . spack/share/spack/setup-env.sh \
&& spack env activate . \
&& spack external find openssh \
&& spack external find cmake \
Expand Down
11 changes: 8 additions & 3 deletions spack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Clone the repository:

```bash
sudo yum install -y git
git clone -b add/spack https://github.com/rse-ops/flux-arm
git clone https://github.com/rse-ops/flux-arm
cd flux-arm/spack
```

Expand All @@ -76,7 +76,7 @@ $ docker buildx build --platform linux/arm64 --tag ghcr.io/rse-ops/flux-arm-spac
At this point you can tag for the date too, and push both (you'll need to add credentials to the instance)

```bash
docker tag ghcr.io/rse-ops/flux-arm-spack:arm64 ghcr.io/rse-ops/flux-arm-spack:spack-0.20.0
docker tag ghcr.io/rse-ops/flux-arm-spack:arm64 ghcr.io/rse-ops/flux-arm-spack:spack-0.19.0
docker push ghcr.io/rse-ops/flux-arm-spack --all-tags
```

Expand All @@ -90,8 +90,13 @@ $ docker buildx build -f Dockerfile.lammps --platform linux/arm64 --tag ghcr.io/
Also tag and push!

```bash
docker tag ghcr.io/rse-ops/flux-arm-lammps:arm64 ghcr.io/rse-ops/flux-arm-lammps:spack-0.20.0
docker tag ghcr.io/rse-ops/flux-arm-lammps:arm64 ghcr.io/rse-ops/flux-arm-lammps:spack-0.19.0
docker push ghcr.io/rse-ops/flux-arm-lammps --all-tags
```

And that's it! You can exit and delete the instance. That was SO FAST.

Notes about the following tags:

- flux-arm-spack:spack-0.20.0 / July 14th build did not work (an MPI PMIX error)
- July 15th build reverted to spack 0.19 and tried to add new libfabrics.
152 changes: 152 additions & 0 deletions spack/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# 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)

# This is a franken package file! I made it starting with the version 0.19.0 file:
# https://raw.githubusercontent.com/spack/spack/releases/v0.19/var/spack/repos/builtin/packages/libfabric/package.py
# And copying over the new versions of libfabric from develop:
# https://raw.githubusercontent.com/spack/spack/11bc27d984a1008f254abf6690c2d96c418b0c42/var/spack/repos/builtin/packages/libfabric/package.py
# The reason is because when I used that file verbatim, I got:
# Error: module 'spack.platforms.cray' has no attribute 'slingshot_network'

from spack.package import *


class Libfabric(AutotoolsPackage):
"""The Open Fabrics Interfaces (OFI) is a framework focused on exporting
fabric communication services to applications."""

homepage = "https://libfabric.org/"
url = "https://github.com/ofiwg/libfabric/releases/download/v1.8.0/libfabric-1.8.0.tar.bz2"
git = "https://github.com/ofiwg/libfabric.git"

maintainers = ["rajachan"]
executables = ["^fi_info$"]

version("main", branch="main")
version("1.18.1", sha256="4615ae1e22009e59c72ae03c20adbdbd4a3dce95aeefbc86cc2bf1acc81c9e38")
version("1.18.0", sha256="912fb7c7b3cf2a91140520962b004a1c5d2f39184adbbd98ae5919b0178afd43")
version("1.17.1", sha256="8b372ddb3f46784c53fdad50a701a6eb0e661239aee45a42169afbedf3644035")
version("1.17.0", sha256="579c0f5ef636c0c72f4d3d6bd4da91a5aed9ac3ac4ea387404c45dbbdee4745d")
version("1.16.1", sha256="53f992d33f9afe94b8a4ea3d105504887f4311cf4b68cea99a24a85fcc39193f")
version("1.16.0", sha256="ac104b9d6e3ce8bda6116329e3f440b621d85602257b3015116ca590f65267d2")
version("1.15.1", sha256="cafa3005a9dc86064de179b0af4798ad30b46b2f862fe0268db03d13943e10cd")
version("1.15.0", sha256="70982c58eadeeb5b1ddb28413fd645e40b206618b56fbb2b18ab1e7f607c9bea")
version("1.14.1", sha256="6cfabb94bca8e419d9015212506f5a367d077c5b11e94b9f57997ec6ca3d8aed")
version("1.14.0", sha256="fc261388848f3cff555bd653f5cb901f6b9485ad285e5c53328b13f0e69f749a")
version("1.13.2", sha256="25d783b0722a8df8fe61c1de75fafca684c5fe520303180f26f0ad6409cfc0b9")
version("1.13.1", sha256="8e6eed38c4a39aa4cbf7d5d3734f0eecbfc030182f1f9b3be470702f2586d30e")
version("1.12.1", sha256="db3c8e0a495e6e9da6a7436adab905468aedfbd4579ee3da5232a5c111ba642c")
version("1.12.0", sha256="ca98785fe25e68a26c61e272be64a1efeea37e61b0dcebd34ccfd381bda7d9cc")
version("1.11.2", sha256="ff2ba821b55a54855d327e6f6fb8a14312c9c9ca7c873525b6a246d8f974d7da")
version("1.11.1", sha256="a72a7dac6322bed09ef1af33bcade3024ca5847a1e9c8fa369da6ab879111fe7")
version("1.11.0", sha256="9938abf628e7ea8dcf60a94a4b62d499fbc0dbc6733478b6db2e6a373c80d58f")
version("1.10.1", sha256="889fa8c99eed1ff2a5fd6faf6d5222f2cf38476b24f3b764f2cbb5900fee8284")
version("1.10.0", sha256="c1ef6e9cd6dafec3f003d2f78f0f3a25f055a7a791e98b5a0db1e4c5036e40f6")
version("1.9.1", sha256="c305c6035c992523e08c7591a6a3707225ba3e72de40443eaed837a10df6771a")
version("1.9.0", sha256="559bfb7376c38253c936d0b104591c3394880376d676894895706c4f5f88597c")
version("1.8.1", sha256="3c560b997f9eafd89f961dd8e8a29a81aad3e39aee888e3f3822da419047dc88")
version("1.8.0", sha256="c4763383a96af4af52cd81b3b094227f5cf8e91662f861670965994539b7ee37")
version("1.7.1", sha256="f4e9cc48319763cff4943de96bf527b737c9f1d6ac3088b8b5c75d07bd719569")
version("1.7.0", sha256="b3dd9cc0fa36fe8c3b9997ba279ec831a905704816c25fe3c4c09fc7eeceaac4")
version("1.6.2", sha256="ec63f61f5e529964ef65fd101627d8782c0efc2b88b3d5fc7f0bfd2c1e95ab2c")
version("1.6.1", sha256="33215a91450e2234ebdc7c467f041b6757f76f5ba926425e89d80c27b3fd7da2")
version("1.6.0", sha256="b3ce7bd655052ea4da7bf01a3177d96d94e5f41b3fd6011ac43f50fcb2dc7581")
version("1.5.3", sha256="f62a40da06f8951db267a59a4ee7363b6ee60a7abbc55cd5db6c8b067d93fa0c")
version("1.5.0", sha256="88a8ad6772f11d83e5b6f7152a908ffcb237af273a74a1bd1cb4202f577f1f23")
version("1.4.2", sha256="5d027d7e4e34cb62508803e51d6bd2f477932ad68948996429df2bfff37ca2a5")

fabrics = (
"efa",
"gni",
"mlx",
"mrail",
"opx",
"psm",
"psm2",
"psm3",
"rxm",
"rxd",
"shm",
"sockets",
"tcp",
"udp",
"usnic",
"verbs",
"xpmem",
)

variant(
"fabrics",
default="sockets,tcp,udp",
description="A list of enabled fabrics",
values=fabrics,
multi=True,
)

# NOTE: the 'kdreg' variant enables use of the special /dev/kdreg file to
# assist in memory registration caching in the GNI provider. This
# device file can only be opened once per process, however, and thus it
# frequently conflicts with MPI.
variant("kdreg", default=False, description="Enable kdreg on supported Cray platforms")

variant("debug", default=False, description="Enable debugging")

# For version 1.9.0:
# headers: fix forward-declaration of enum fi_collective_op with C++
patch(
"https://github.com/ofiwg/libfabric/commit/2e95b0efd85fa8a3d814128e34ec57ffd357460e.patch?full_index=1",
sha256="456693e28bb1fc41a0bbb94b97ae054e7d28f81ca94795d7f294243da58c6376",
when="@1.9.0",
)

# Fix for the inline assembly problem for the Nvidia compilers
# https://github.com/ofiwg/libfabric/pull/7665
patch("nvhpc-symver.patch", when="@1.6.0:1.14.0 %nvhpc")

depends_on("rdma-core", when="fabrics=verbs")
depends_on("rdma-core", when="@1.10.0: fabrics=efa")
depends_on("opa-psm2", when="fabrics=psm2")
depends_on("psm", when="fabrics=psm")
depends_on("ucx", when="fabrics=mlx")
depends_on("uuid", when="fabrics=opx")

depends_on("m4", when="@main", type="build")
depends_on("autoconf", when="@main", type="build")
depends_on("automake", when="@main", type="build")
depends_on("libtool", when="@main", type="build")

conflicts("@1.9.0", when="platform=darwin", msg="This distribution is missing critical files")
conflicts("fabrics=opx", when="@:1.14.99")

def setup_build_environment(self, env):
if self.run_tests:
env.prepend_path("PATH", self.prefix.bin)

@when("@main")
def autoreconf(self, spec, prefix):
bash = which("bash")
bash("./autogen.sh")

def configure_args(self):
args = []

args.extend(self.enable_or_disable("debug"))

if "+kdreg" in self.spec:
args.append("--with-kdreg=yes")
else:
args.append("--with-kdreg=no")

for fabric in self.fabrics:
if "fabrics=" + fabric in self.spec:
args.append("--enable-{0}=yes".format(fabric))
else:
args.append("--enable-{0}=no".format(fabric))

return args

def installcheck(self):
fi_info = Executable(self.prefix.bin.fi_info)
fi_info()

0 comments on commit f373b2f

Please sign in to comment.