Skip to content

Commit

Permalink
separate setup of spack
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan committed Dec 1, 2023
1 parent 06da6ea commit 1619e2f
Show file tree
Hide file tree
Showing 3 changed files with 184 additions and 134 deletions.
136 changes: 136 additions & 0 deletions .github/setup/setup_spack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
. ${SPACK_DIR}/share/spack/setup-env.sh
PYTHON_VERSION=`python3.10 --version | awk {'print $2'}`
rm /usr/bin/python
sudo ln -s `which python3.10` /usr/bin/python
mkdir -p $HOME/.spack
cat > $HOME/.spack/packages.yaml << EOF
packages:
all:
target: [x86_64]
providers:
mpi: [openmpi]
python:
buildable: False
externals:
- spec: python@${PYTHON_VERSION}
prefix: /usr
py-jsonschema:
buildable: False
externals:
- spec: "[email protected]"
prefix: /usr
py-cffi:
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
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
135 changes: 1 addition & 134 deletions .github/workflows/compile_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,140 +62,7 @@ jobs:
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
source ${GITHUB_WORKSPACE}/.github/setup/setup_spack.sh
- name: Compile DYAD
run: |
echo "Activating spack"
Expand Down
47 changes: 47 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- name: Install Dependencies
before: >
sudo rm -rf /home/gitpod/.pyenv
sudo apt-get update && 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.10 python3-pip libczmq-dev lua-posix-dev \
lz4 pkgconf libzmq5 sqlite
command: >
sudo python3.10 -m pip install jsonschema>=2.3.0 cffi ply pyyaml &&
gp sync-done sys
- name: Install spack
init: gp sync-await sys
command: >
mkdir /workspace/scripts &&
echo export SPACK_DIR=/workspace/spack > /workspace/scripts/gitpod.env &&
echo export FLUX_VERSION=0.52 >> /workspace/scripts/gitpod.env &&
echo export DYAD_DTL_MODE=UCX >> /workspace/scripts/gitpod.env &&
echo export DYAD_INSTALL_PREFIX=/workspace/install >> /workspace/scripts/gitpod.env &&
source /workspace/scripts/gitpod.env &&
git clone https://github.com/spack/spack.git ${SPACK_DIR} &&
source /workspace/dyad/.github/setup/setup_spack.sh &&
gp sync-done spack
- name: Compile DYAD
init: gp sync-await spack
command: >
source /workspace/scripts/gitpod.env &&
. ${SPACK_DIR}/share/spack/setup-env.sh &&
echo "Install DYAD" &&
cd /workspace/dyad &&
mkdir build &&
cd build &&
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${DYAD_INSTALL_PREFIX}/lib/pkgconfig &&
CONFIGURE_FLAGS="-DDYAD_CONTROL_PLANE=FLUX_RPC -DDYAD_DATA_PLANE=FLUX_RPC -DDYAD_PROFILER=NONE" &&
if [[ $DYAD_DTL_MODE == 'UCX' ]]; then
CONFIGURE_FLAGS="-DDYAD_CONTROL_PLANE=FLUX_RPC -DDYAD_DATA_PLANE=UCX -DDYAD_PROFILER=NONE"
fi
cmake -DCMAKE_INSTALL_PREFIX=${DYAD_INSTALL_PREFIX} ${CONFIGURE_FLAGS} -DENABLE_DYAD_DEBUG=ON .. &&
make install -j

0 comments on commit 1619e2f

Please sign in to comment.