Skip to content

Spatter generator updates #27

Spatter generator updates

Spatter generator updates #27

Workflow file for this run

name: Build and Test
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
SST_VERSION: 14.1.0
SPATTER_VERSION: 2.1
concurrency:
group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout SST Spatter
uses: actions/checkout@v4
with:
path: sst-spatter
- name: Install autogen.sh dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libtool-bin libltdl-dev
version: 1.0
- name: Update PATH environment variable
run : |
echo "$HOME/local/sstcore-${SST_VERSION}/bin" >> $GITHUB_PATH
- name: Restore SST Core cache
id: cache-sst-core-restore
uses: actions/cache/restore@v4
with:
path: ~/local/sstcore-${{ env.SST_VERSION }}
key: cache-sst-core-${{ env.SST_VERSION }}
- name: Download SST Core
if: steps.cache-sst-core-restore.outputs.cache-hit != 'true'
run: |
wget https://github.com/sstsimulator/sst-core/releases/download/v${SST_VERSION}_Final/sstcore-${SST_VERSION}.tar.gz
mkdir -p sstcore-${SST_VERSION}
tar xfz sstcore-${SST_VERSION}.tar.gz -C sstcore-${SST_VERSION} --strip-components=1
- name: Install SST Core
if: steps.cache-sst-core-restore.outputs.cache-hit != 'true'
working-directory: sstcore-${{ env.SST_VERSION }}
run: |
./configure --prefix=${HOME}/local/sstcore-${SST_VERSION} --disable-mpi
make -j$(nproc) all; make install
- name: Save SST Core cache
if: steps.cache-sst-core-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/local/sstcore-${{ env.SST_VERSION }}
key: ${{ steps.cache-sst-core-restore.outputs.cache-primary-key }}
- name: Download SST Elements
run: |
wget https://github.com/sstsimulator/sst-elements/archive/refs/tags/v${SST_VERSION}_Final.tar.gz -O sstelements-${SST_VERSION}.tar.gz
mkdir -p sstelements-${SST_VERSION}
tar xfz sstelements-${SST_VERSION}.tar.gz -C sstelements-${SST_VERSION} --strip-components=1
- name: Ignore unused elements
working-directory: sstelements-${{ env.SST_VERSION }}
run: |
for element in src/sst/elements/*/; do
if [[ ! "${element}" == *"memHierarchy/" && ! "${element}" == *"cassini/" ]]; then
cd ${GITHUB_WORKSPACE}/sstelements-${SST_VERSION}/${element}
touch .ignore
fi
done
- name: Install SST Elements
working-directory: sstelements-${{ env.SST_VERSION }}
run: |
./autogen.sh
./configure --prefix=${HOME}/local/sstelements-${SST_VERSION} \
--with-sst-core=${HOME}/local/sstcore-${SST_VERSION}
make -j$(nproc) all; make install
- name: Restore Spatter cache
id: cache-spatter-restore
uses: actions/cache/restore@v4
with:
path: ~/local/packages/spatter-${{ env.SPATTER_VERSION }}
key: cache-spatter-${{ env.SPATTER_VERSION }}
- name: Download Spatter
if: steps.cache-spatter-restore.outputs.cache-hit != 'true'
run: |
wget https://github.com/hpcgarage/spatter/archive/refs/tags/v${SPATTER_VERSION}.tar.gz -O spatter-${SPATTER_VERSION}.tar.gz
mkdir -p spatter-${SPATTER_VERSION}
tar xfz spatter-${SPATTER_VERSION}.tar.gz -C spatter-${SPATTER_VERSION} --strip-components=1
- name: Install Spatter
if: steps.cache-spatter-restore.outputs.cache-hit != 'true'
working-directory: spatter-${{ env.SPATTER_VERSION }}
run: |
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/local/packages/spatter-${SPATTER_VERSION} -B build_serial -S .
make -j$(nproc) all -C build_serial; make install -C build_serial
- name: Save Spatter cache
if: steps.cache-spatter-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/local/packages/spatter-${{ env.SPATTER_VERSION }}
key: cache-spatter-${{ env.SPATTER_VERSION }}
- name: Build SST Spatter
working-directory: sst-spatter
run: |
./autogen.sh
./configure --prefix=${HOME}/local/packages/sstspatter \
--with-sst-core=${HOME}/local/sstcore-${SST_VERSION} \
--with-spatter=${HOME}/local/packages/spatter-${SPATTER_VERSION}
make -j$(nproc) all; make install
- name: Run SST Spatter Tests
run: |
sst-test-elements -w "*spatter*"