Skip to content

Commit

Permalink
CI: fix clang-format version
Browse files Browse the repository at this point in the history
No longer need to install pkg-config on macOS

Install libhwloc-dev and libtirpc-dev on ubuntu

Build mpich manually to prevent ucx/ofi dependencies

Disable ucx/mpi/psm builds when non needed
  • Loading branch information
soumagne committed Jan 17, 2025
1 parent 223c9ca commit e315742
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 46 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest

env:
CLANG_FORMAT_VERSION: 12
CLANG_FORMAT_VERSION: 18

steps:
- name: Checkout source
Expand Down Expand Up @@ -171,13 +171,13 @@ jobs:
if: matrix.config.cc == 'icx' && steps.cache-pkg-deps.outputs.cache-hit != 'true'
run: Testing/script/gh_install_pkg_deps_${{ runner.os }}.sh "$ICX_COMPONENTS"

- name: Install pkg-config
if: runner.os == 'macOS'
run: Testing/script/gh_install_pkg_deps_${{ runner.os }}.sh pkg-config

- name: Install MPI package dependencies
if: matrix.config.cc != 'icx'
run: Testing/script/gh_install_pkg_deps_${{ runner.os }}.sh mpich
if: matrix.config.cc != 'icx' && runner.os == 'Linux'
run: Testing/script/gh_install_pkg_deps_${{ runner.os }}.sh libhwloc-dev

- name: Setup XDR package dependencies
if: matrix.encoding == 'xdr_on' && runner.os == 'Linux'
run: Testing/script/gh_install_pkg_deps_${{ runner.os }}.sh libtirpc-dev

- name: Restore cached dependencies
uses: actions/cache@v3
Expand Down
75 changes: 36 additions & 39 deletions Testing/script/gh_install_deps.sh
Original file line number Diff line number Diff line change
@@ -1,56 +1,44 @@
#!/bin/bash

BMI_VERSION=2.8.1
#MPI_VERSION=3.4.1
if [[ $MERCURY_BUILD_CONFIGURATION == 'Tsan' ]]; then
OFI_CFLAGS="-O1 -g -fsanitize=thread"
OFI_EXTRA_FLAGS="--enable-debug"
fi
if [[ $MERCURY_BUILD_CONFIGURATION == 'Debug' ]]; then
OFI_EXTRA_FLAGS="--enable-debug"
fi
# Versions
BMI_VERSION=latest
MPI_VERSION=4.2.3
#OFI_PR=
OFI_VERSION=1.22.0
# PSM_VERSION=updates
UCX_VERSION=1.17.0

# UCX
if [[ $MERCURY_BUILD_CONFIGURATION == 'Tsan' ]]; then
UCX_CFLAGS="-O1 -g -fsanitize=thread"
UCX_EXTRA_FLAGS="--enable-debug"
fi
if [[ $MERCURY_BUILD_CONFIGURATION == 'Debug' ]]; then
OFI_EXTRA_FLAGS="--enable-debug"
# PSM_EXTRA_FLAGS="PSM_DEBUG=1"
UCX_EXTRA_FLAGS="--enable-debug"
elif [[ $MERCURY_BUILD_CONFIGURATION == 'Asan' ]]; then
BUILD_MPI=0
elif [[ $MERCURY_BUILD_CONFIGURATION == 'Tsan' ]]; then
BUILD_MPI=0
BUILD_UCX=0
OFI_CFLAGS="-O1 -g -fsanitize=thread"
OFI_EXTRA_FLAGS="--enable-debug"
# PSM_EXTRA_FLAGS="PSM_DEBUG=1 PSM_SANITIZE=1"
UCX_CFLAGS="-O1 -g -fsanitize=thread"
UCX_EXTRA_FLAGS="--enable-debug"
fi
UCX_VERSION=1.17.0

PREFIX=${RUNNER_TEMP}/${INSTALL_DIR}

# PSM
if [[ $MERCURY_BUILD_CONFIGURATION == 'Tsan' ]]; then
PSM_EXTRA_FLAGS="PSM_DEBUG=1 PSM_SANITIZE=1"
fi
if [[ $MERCURY_BUILD_CONFIGURATION == 'Debug' ]]; then
PSM_EXTRA_FLAGS="PSM_DEBUG=1"
fi
PSM_VERSION=updates

set -e

# Default to GNU compilers when building dependencies
if [[ ${CC} == 'icx' ]]; then
CC=gcc
CXX=g++
BUILD_MPI=0
fi

# BMI
cd $HOME && wget --secure-protocol=TLSv1_2 https://github.com/radix-io/bmi/archive/refs/tags/v${BMI_VERSION}.tar.gz -O bmi-${BMI_VERSION}.tar.gz;
tar -xzf bmi-${BMI_VERSION}.tar.gz;
cd $HOME && git clone https://github.com/radix-io/bmi.git bmi-${BMI_VERSION};
cd bmi-${BMI_VERSION} && ./prepare && ./configure --enable-shared --disable-static --enable-bmi-only --prefix=$PREFIX && make -j2 -s && make install;

# MPI
#cd $HOME && wget http://www.mpich.org/static/downloads/${MPI_VERSION}/mpich-${MPI_VERSION}.tar.gz;
#tar -xzf mpich-${MPI_VERSION}.tar.gz;
#cd mpich-${MPI_VERSION} && ./configure --disable-fortran --with-device=ch3 --prefix=$PREFIX && make -j2 -s && make install;

# OFI
if [ -z "$OFI_PR" ]; then
cd $HOME && wget --secure-protocol=TLSv1_2 https://github.com/ofiwg/libfabric/releases/download/v${OFI_VERSION}/libfabric-${OFI_VERSION}.tar.bz2
Expand All @@ -69,15 +57,24 @@ fi
./configure --prefix=$PREFIX --disable-usnic --disable-mrail --disable-rstream --disable-perf --disable-efa --disable-psm2 --disable-psm --disable-opx --disable-dmabuf_peer_mem --disable-hook_hmem --disable-hook_debug --disable-rxd --disable-udp --disable-verbs --disable-shm --disable-static --disable-silent-rules ${OFI_EXTRA_FLAGS} CC="${CC}" CFLAGS="${OFI_CFLAGS}" && make -j2 -s && make install;

if [[ ${RUNNER_OS} == 'Linux' ]]; then
# UCX
cd $HOME && wget --secure-protocol=TLSv1_2 https://github.com/openucx/ucx/releases/download/v${UCX_VERSION}/ucx-${UCX_VERSION}.tar.gz
tar -xzf ucx-${UCX_VERSION}.tar.gz;
cd ucx-${UCX_VERSION};
./configure --prefix=$PREFIX --enable-profiling --enable-frame-pointer --enable-stats --enable-memtrack --enable-fault-injection --enable-mt --disable-numa --without-java --without-go --disable-silent-rules ${UCX_EXTRA_FLAGS} CC="${CC}" CXX="${CXX}" CFLAGS="${UCX_CFLAGS}" && make -j2 -s && make install;
if [[ ${BUILD_MPI} != '0' ]]; then
# MPI
cd $HOME && wget http://www.mpich.org/static/downloads/${MPI_VERSION}/mpich-${MPI_VERSION}.tar.gz;
tar -xzf mpich-${MPI_VERSION}.tar.gz;
cd mpich-${MPI_VERSION} && ./configure --enable-lib-depend --disable-rpath --disable-silent-rules --disable-dependency-tracking --disable-fortran --enable-shared --enable-static=no --with-pm=hydra:gforker --with-libfabric=$PREFIX --with-hwloc --prefix=$PREFIX && make -j2 -s && make install;
fi

if [[ ${BUILD_UCX} != '0' ]]; then
# UCX
cd $HOME && wget --secure-protocol=TLSv1_2 https://github.com/openucx/ucx/releases/download/v${UCX_VERSION}/ucx-${UCX_VERSION}.tar.gz
tar -xzf ucx-${UCX_VERSION}.tar.gz;
cd ucx-${UCX_VERSION};
./configure --prefix=$PREFIX --enable-profiling --enable-frame-pointer --enable-stats --enable-memtrack --enable-fault-injection --enable-mt --disable-numa --without-java --without-go --disable-silent-rules ${UCX_EXTRA_FLAGS} CC="${CC}" CXX="${CXX}" CFLAGS="${UCX_CFLAGS}" && make -j2 -s && make install;
fi

# PSM
cd $HOME && git clone https://github.com/mercury-hpc/psm.git -b ${PSM_VERSION} psm-${PSM_VERSION}
cd psm-${PSM_VERSION}
make install DESTDIR=$PREFIX ${PSM_EXTRA_FLAGS}
# cd $HOME && git clone https://github.com/mercury-hpc/psm.git -b ${PSM_VERSION} psm-${PSM_VERSION}
# cd psm-${PSM_VERSION}
# make install DESTDIR=$PREFIX ${PSM_EXTRA_FLAGS}
fi

0 comments on commit e315742

Please sign in to comment.