Skip to content

Commit 9578594

Browse files
committed
Install hwloc from source code on relevant runners
The hwloc package on Ubuntu-20.04 contains older version of the library than required by UMF. In such runners the hwloc was changed to be installed from the source code.
1 parent 6ac0019 commit 9578594

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

.github/scripts/install_hwloc.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Copyright (C) 2024 Intel Corporation
3+
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
4+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5+
6+
# install_hwloc.sh - Script for building and installing HWLOC library from source code
7+
8+
set -e
9+
10+
git clone -b hwloc-2.3.0 https://github.com/open-mpi/hwloc.git
11+
pushd hwloc
12+
./autogen.sh
13+
./configure
14+
make -j$(nproc)
15+
sudo make install -j$(nproc)
16+
popd

.github/workflows/basic.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,15 @@ jobs:
127127
- name: Install apt packages
128128
run: |
129129
sudo apt-get update
130-
sudo apt-get install -y clang cmake libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev
130+
sudo apt-get install -y clang cmake libnuma-dev libjemalloc-dev libtbb-dev
131131
132132
- name: Install g++-7
133133
if: matrix.compiler.cxx == 'g++-7'
134134
run: sudo apt-get install -y ${{matrix.compiler.cxx}}
135135

136+
- name: Install libhwloc
137+
run: .github/scripts/install_hwloc.sh
138+
136139
- name: Configure build
137140
run: >
138141
cmake

.github/workflows/qemu.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,5 @@ jobs:
123123
fi
124124
125125
scp -P 2222 ${{github.workspace}}/scripts/qemu/run-build.sh [email protected]:/home/cxltest
126+
scp -P 2222 ${{github.workspace}}/.github/scripts/install_hwloc.sh [email protected]:/home/cxltest
126127
ssh [email protected] -p 2222 -t "bash /home/cxltest/run-build.sh https://github.com/$CI_REPO ${{env.CI_BRANCH}}"

scripts/qemu/run-build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ repo=$1
1010
branch=$2
1111

1212
echo password | sudo -Sk apt update
13-
echo password | sudo -Sk apt install -y git cmake gcc g++ numactl libnuma-dev libjemalloc-dev libtbb-dev libhwloc-dev
13+
echo password | sudo -Sk apt install -y git cmake gcc g++ numactl libnuma-dev libjemalloc-dev libtbb-dev
14+
15+
# install packages required for building hwloc from source
16+
echo password | sudo -Sk apt install -y autoconf libtool
17+
source install_hwloc.sh
1418

1519
numactl -H
1620

0 commit comments

Comments
 (0)