Skip to content

Commit

Permalink
Add libhwloc support for memkind example
Browse files Browse the repository at this point in the history
  • Loading branch information
szadam authored and root committed Dec 27, 2022
1 parent 1065944 commit af59738
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ RUN /pmemkv-nodejs.sh
COPY pmemkv-ruby.sh /
RUN /pmemkv-ruby.sh

COPY install-hwloc.sh /
RUN /install-hwloc.sh

COPY memkind.sh /
RUN /memkind.sh

Expand All @@ -117,4 +120,4 @@ RUN /librpma.sh
COPY tz.sh /
RUN /tz.sh

RUN rm /pmdk.sh /valgrind.sh /pmemobj-cpp.sh /pmemkv.sh /setup-maven-settings.sh /pmemkv-java.sh /pmemkv-python.sh /pmemkv-nodejs.sh /pmemkv-ruby.sh /memkind.sh /librpma.sh /tz.sh
RUN rm /pmdk.sh /valgrind.sh /pmemobj-cpp.sh /pmemkv.sh /setup-maven-settings.sh /pmemkv-java.sh /pmemkv-python.sh /pmemkv-nodejs.sh /pmemkv-ruby.sh /install-hwloc.sh /memkind.sh /librpma.sh /tz.sh
29 changes: 29 additions & 0 deletions docker/install-hwloc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (C) 2020 - 2022 Intel Corporation.

# installs hwloc library

set -e

HWLOC_LIBRARY_VERSION=v2.3
HWLOC_VERSION="${HWLOC_LIBRARY_VERSION:1}".0
HWLOC_TAR_GZ=hwloc-"${HWLOC_VERSION}".tar.gz

HWLOC_TARBALL_URL=https://download.open-mpi.org/release/hwloc/"$HWLOC_LIBRARY_VERSION"/"$HWLOC_TAR_GZ"

HWLOC_LOCAL_DIR="$HOME"/hwloc/"$HWLOC_LIBRARY_VERSION"
HWLOC_LOCAL_TAR_GZ="$HWLOC_LOCAL_DIR"/"$HWLOC_TAR_GZ"

# create hwloc directory in home directory
mkdir -p "$HWLOC_LOCAL_DIR"

# download and untar hwloc library to hwloc directory
curl -L "$HWLOC_TARBALL_URL" -o "$HWLOC_LOCAL_TAR_GZ"
tar -xzf "$HWLOC_LOCAL_TAR_GZ" -C "$HWLOC_LOCAL_DIR" --strip-components=1

# go to hwloc directory, build and install library
cd "$HWLOC_LOCAL_DIR"
./configure --prefix=/usr
make -j "$(nproc)"
sudo make -j "$(nproc)" install

0 comments on commit af59738

Please sign in to comment.