Skip to content

Commit

Permalink
CPU set
Browse files Browse the repository at this point in the history
  • Loading branch information
tewaro committed Apr 13, 2024
1 parent 7dcaf72 commit cdb42d8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,24 @@ jobs:
if [ ${{ matrix.build-type }} == 'Debug' ]; then
echo "GALOIS_CONTAINER_ENV=$GALOIS_CONTAINER_ENV -e=GALOIS_EXTRA_CXX_FLAGS='-O3'" >> $GITHUB_ENV
fi
if [ ${{ runner.name }} == 'zerberus-0' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30'" >> $GITHUB_ENV
fi
if [ ${{ runner.name }} == 'zerberus-1' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31'" >> $GITHUB_ENV
fi
if [ ${{ runner.name }} == 'languedoc-0' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=0,1,2,3,4,5,6,7,32,33,34,35,36,37,38,39'" >> $GITHUB_ENV
fi
if [ ${{ runner.name }} == 'languedoc-1' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=16,17,18,19,20,21,22,23,48,49,50,51,52,53,54,55'" >> $GITHUB_ENV
fi
if [ ${{ runner.name }} == 'languedoc-2' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=8,9,10,11,12,13,14,15,40,41,42,43,44,45,46,47'" >> $GITHUB_ENV
fi
if [ ${{ runner.name }} == 'languedoc-3' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=24,25,26,27,28,29,30,31,56,57,58,59,60,61,62,63'" >> $GITHUB_ENV
fi
cat $GITHUB_ENV
- name: Configure
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CONTAINER_BUILD_DIR ?= /pando-galois/build
CONTAINER_WORKDIR ?= ${CONTAINER_SRC_DIR}
CONTAINER_CONTEXT ?= default
CONTAINER_OPTS ?=
CONTAINER_CPUSET ?=
CONTAINER_CMD ?= bash -l
INTERACTIVE ?= i

Expand Down Expand Up @@ -91,6 +92,7 @@ docker:
${GALOIS_CONTAINER_MOUNTS} \
${GALOIS_CONTAINER_ENV} \
${GALOIS_CONTAINER_FLAGS} \
${CONTAINER_CPUSET} \
--privileged \
--workdir=${CONTAINER_WORKDIR} \
${CONTAINER_OPTS} \
Expand Down

0 comments on commit cdb42d8

Please sign in to comment.