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 committed Oct 31, 2022
1 parent 1065944 commit f9e49bf
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ RUN dnf update -y && dnf install -y\
nano\
ncurses-devel\
ndctl-devel\
numactl\
numactl-devel\
java-1.8.0-openjdk\
openssh-server\
Expand All @@ -79,6 +80,9 @@ RUN dnf update -y && dnf install -y\
&& dnf install -y nodejs \
&& dnf debuginfo-install -y glibc \
&& dnf clean all

COPY docker_install_hwloc.sh /
RUN /docker_install_hwloc.sh

COPY pmdk.sh /
RUN /pmdk.sh
Expand Down Expand Up @@ -117,4 +121,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 /memkind.sh /librpma.sh /tz.sh /docker_install_hwloc.sh
30 changes: 30 additions & 0 deletions docker/docker_install_hwloc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (C) 2020 - 2021 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
# fi

0 comments on commit f9e49bf

Please sign in to comment.