Skip to content

Commit

Permalink
Merge pull request #47 from flux-framework/bugfix/ci-test
Browse files Browse the repository at this point in the history
added CI for testing DYAD
  • Loading branch information
JaeseungYeom authored Oct 24, 2023
2 parents 5d0f12a + 308ec59 commit 55aa4fa
Show file tree
Hide file tree
Showing 5 changed files with 257 additions and 27 deletions.
9 changes: 9 additions & 0 deletions .github/prod-cons/dyad_consumer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

export DYAD_PATH_CONSUMER=${DYAD_PATH}_consumer
mkdir -p ${DYAD_PATH_CONSUMER}

echo "Loading DYAD module"

#flux module load ${DYAD_INSTALL_PREFIX}/lib/dyad.so $DYAD_PATH_CONSUMER $DYAD_DTL_MODE
${GITHUB_WORKSPACE}/docs/demos/ecp_feb_2023/cpp_cons 10 $DYAD_PATH_CONSUMER
18 changes: 18 additions & 0 deletions .github/prod-cons/dyad_prod_cons_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
echo "Creating namespace for DYAD"
flux kvs namespace create ${DYAD_KVS_NAMESPACE}

flux resource list

echo "Running Consumer job"
flux submit --nodes 1 --exclusive --env=DYAD_KVS_NAMESPACE=${DYAD_KVS_NAMESPACE} --env=DYAD_DTL_MODE=${DYAD_DTL_MODE} --env=DYAD_PATH_CONSUMER=$DYAD_PATH_CONSUMER ${GITHUB_WORKSPACE}/.github/prod-cons/dyad_consumer.sh
CONS_PID=$(flux job last)
# Will block terminal until done
echo "Running Producer job"
flux submit --nodes 1 --exclusive --env=DYAD_KVS_NAMESPACE=${DYAD_KVS_NAMESPACE} --env=DYAD_DTL_MODE=${DYAD_DTL_MODE} --env=DYAD_PATH_PRODUCER=$DYAD_PATH_PRODUCER ${GITHUB_WORKSPACE}/.github/prod-cons/dyad_producer.sh
PROD_PID=$(flux job last)
flux jobs -a
flux job attach $PROD_PID
flux job attach $CONS_PID

flux kvs namespace remove ${DYAD_KVS_NAMESPACE}
11 changes: 11 additions & 0 deletions .github/prod-cons/dyad_producer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

export DYAD_PATH_PRODUCER=${DYAD_PATH}_producer
mkdir -p ${DYAD_PATH_PRODUCER}
echo "Loading DYAD module"

echo flux module load ${DYAD_INSTALL_PREFIX}/lib/dyad.so $DYAD_PATH_PRODUCER $DYAD_DTL_MODE
flux module load ${DYAD_INSTALL_PREFIX}/lib/dyad.so $DYAD_PATH_PRODUCER $DYAD_DTL_MODE

echo ${GITHUB_WORKSPACE}/docs/demos/ecp_feb_2023/cpp_prod 10 $DYAD_PATH_PRODUCER
${GITHUB_WORKSPACE}/docs/demos/ecp_feb_2023/cpp_prod 10 $DYAD_PATH_PRODUCER
244 changes: 219 additions & 25 deletions .github/workflows/compile_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,226 @@ on:
branches: [ main ]

jobs:
compile:
compile-flux:
strategy:
fail-fast: false
matrix:
base-os:
- focal
- fedora38
- fedora35
- el8
- el7
flux-version:
- v0.52.0
- v0.51.0
- v0.50.0
- v0.49.0
- v0.48.0
flux: [ 0.52.0, 0.49.0]
mode: ["FLUX_RPC", "UCX"]
runs-on: ubuntu-20.04 # Docker-based jobs must run on Ubuntu
if: ${{ matrix.base-os != 'fedora38' || contains(fromJSON('["v0.52.0", "v0.51.0"]'), matrix.flux-version) }}
container: fluxrm/flux-core:${{ matrix.base-os }}-${{ matrix.flux-version }}
env:
FLUX_VERSION: ${{ matrix.flux }}
SPACK_DIR: "/home/runner/work/spack"
DYAD_INSTALL_PREFIX: "/home/runner/work/dyad/install"
DYAD_KVS_NAMESPACE: "test"
DYAD_DTL_MODE: ${{ matrix.mode }}
DYAD_PATH: "/home/runner/work/dyad/temp"
steps:
- uses: actions/checkout@v2

- name: Run autogen
run: ./autogen.sh

- name: Configure build
run: ./configure --enable-dyad-debug

- name: Build DYAD
run: make -j
- name: Push checkout
if: github.event_name == 'push'
uses: actions/checkout@v3
- name: PR checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install system deps
run: |
sudo apt-get install -y --no-install-recommends \
gcc g++ gfortran \
autoconf \
automake \
libtool \
libtool-bin \
openmpi-bin \
libopenmpi-dev \
libarchive-dev \
ncurses-bin \
hwloc \
lua5.3 liblua5.3-dev \
python3 \
libczmq-dev \
lua-posix-dev \
lz4 \
pkgconf \
libzmq5 \
sqlite
sudo pip install jsonschema cffi ply pyyaml
sudo chmod 777 /usr -R
- name: Install Spack
run: |
git clone https://github.com/spack/spack.git ${SPACK_DIR}
- name: Load existing dependencies
run: |
. ${SPACK_DIR}/share/spack/setup-env.sh
mkdir -p /home/runner/.spack
cat > /home/runner/.spack/packages.yaml << 'EOF'
packages:
all:
target: [x86_64]
providers:
mpi: [openmpi]
python:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
py-cffi:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
py-jsonschema:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
py-ply:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
py-pyyaml:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
czmq:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
sqlite:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
libzmq:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
lua:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
lua-luaposix:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
lz4:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
ncurses:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
pkgconf:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
hwloc:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
libarchive:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
autoconf:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
automake:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
libtool:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
m4:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
openmpi:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
openssl:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
pkg-config:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
EOF
spack external find
spack spec flux-core@${FLUX_VERSION}
if [[ $DYAD_DTL_MODE == 'UCX' ]]; then
spack spec [email protected]
fi
- name: Install dependencies
run: |
. ${SPACK_DIR}/share/spack/setup-env.sh
spack install -j4 flux-core@${FLUX_VERSION}
if [[ $DYAD_DTL_MODE == 'UCX' ]]; then
spack install -j4 [email protected]
fi
mkdir -p ${DYAD_INSTALL_PREFIX}
spack view --verbose symlink ${DYAD_INSTALL_PREFIX} flux-core@${FLUX_VERSION}
if [[ $DYAD_DTL_MODE == 'UCX' ]]; then
spack view --verbose symlink ${DYAD_INSTALL_PREFIX} [email protected]
fi
- name: Compile DYAD
run: |
echo "Activating spack"
. ${SPACK_DIR}/share/spack/setup-env.sh
echo "Install DYAD"
cd ${GITHUB_WORKSPACE}
ls
pwd
./autogen.sh
CONFIGURE_FLAGS=""
if [[ $DYAD_DTL_MODE == 'UCX' ]]; then
CONFIGURE_FLAGS=" --enable-ucx "
fi
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${DYAD_INSTALL_PREFIX}/lib/pkgconfig
./configure --enable-dyad-debug ${CONFIGURE_FLAGS} --prefix=${DYAD_INSTALL_PREFIX} \
CFLAGS="-I${DYAD_INSTALL_PREFIX}/include" \
CXXFLAGS="-I${DYAD_INSTALL_PREFIX}/include" \
LDFLAGS="-L${DYAD_INSTALL_PREFIX}/lib"
make install -j
- name: Install Test
run: |
. ${SPACK_DIR}/share/spack/setup-env.sh
export CFLAGS="-I${DYAD_INSTALL_PREFIX}/include"
export CXXFLAGS="-I${DYAD_INSTALL_PREFIX}/include"
export LDFLAGS="-L${DYAD_INSTALL_PREFIX}/lib"
cd ${GITHUB_WORKSPACE}/docs/demos/ecp_feb_2023
make all
- name: Test DYAD with separate FS
run: |
mkdir $DYAD_PATH
. ${SPACK_DIR}/share/spack/setup-env.sh
export PATH=${PATH}:${DYAD_INSTALL_PREFIX}/bin:${DYAD_INSTALL_PREFIX}/sbin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${DYAD_INSTALL_PREFIX}/lib
echo "Starting flux brokers"
flux start --test-size=2 /bin/bash ${GITHUB_WORKSPACE}/.github/prod-cons/dyad_prod_cons_test.sh
2 changes: 0 additions & 2 deletions docs/demos/ecp_feb_2023/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
DYAD_INSTALL_PREFIX = /usr

DYAD_LIB_PATH = $(DYAD_INSTALL_PREFIX)/lib
DYAD_INCLUDE_PATH = $(DYAD_INSTALL_PREFIX)/include

Expand Down

0 comments on commit 55aa4fa

Please sign in to comment.