Skip to content

FEAT: configs for new achirecture (#525) #303

FEAT: configs for new achirecture (#525)

FEAT: configs for new achirecture (#525) #303

Workflow file for this run

name: Load testing
on:
workflow_dispatch:
push:
branches: [ "main" ]
workflow_call:
env:
BUILD_DIR: build
EXECUTABLE_PATH: build/nons
GENERATORS_DIR: scripts/generators
FAT_TREE_GENERATOR: scripts/generators/topology/fat_tree/fat_tree.py
FAT_TREE_SMALL_CONFIG: scripts/generators/topology/fat_tree/small_fat_tree_config.yml
FAT_TREE_LARGE_CONFIG: scripts/generators/topology/fat_tree/large_fat_tree_config.yml
ALL_TO_ALL_GENERATOR: scripts/generators/ti_simulation/all-to-all/all-to-all.py
FLAMEGRAPH_TOPOLOGY_NAME: fat_tree_topology.yml
FLAMEGRAPH_SIMULATION_NAME: fat_tree_simulation.yml
FLAMEGRAPH_ARTIFACT_DIR: flamegraph
FLAMEGRAPH_OUTPUT_DIR: flamegraph/flamegraph
jobs:
load_testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update submodules
run: git submodule update --init --recursive
- name: Configure CMake for building project
run: cmake -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=Release -DBUILD_PROJECT=ON -DBUILD_TESTS=OFF -DLOG_LEVEL=LOG_LEVEL_ERROR
- name: Build project
run: cmake --build ${{env.BUILD_DIR}} -j $(nproc)
- name: Update PYTHONPATH
run: echo "PYTHONPATH=${{ github.workspace }}/scripts" >> $GITHUB_ENV
- name: Run simulations
run: |
python3 scripts/generate_configs_and_run.py -e ${{env.EXECUTABLE_PATH}} -t ${{env.FAT_TREE_GENERATOR}} -tc ${{env.FAT_TREE_SMALL_CONFIG}}
python3 scripts/generate_configs_and_run.py -e ${{env.EXECUTABLE_PATH}} -t ${{env.FAT_TREE_GENERATOR}} -tc ${{env.FAT_TREE_LARGE_CONFIG}}
profiling_load_testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update submodules
run: git submodule update --init --recursive
- name: Configure CMake for profiling
run: cmake -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=Release -DBUILD_PROJECT=ON -DBUILD_TESTS=OFF -DPROFILING=ON -DLOG_LEVEL=LOG_LEVEL_ERROR
- name: Build project with profiling
run: cmake --build ${{env.BUILD_DIR}} -j $(nproc)
- name: Update PYTHONPATH
run: echo "PYTHONPATH=${{ github.workspace }}/scripts" >> $GITHUB_ENV
- name: Run simulations with profiling
run: |
python3 scripts/generate_configs_and_run.py -e ${{env.EXECUTABLE_PATH}} -t ${{env.FAT_TREE_GENERATOR}} -tc ${{env.FAT_TREE_SMALL_CONFIG}}
gprof ${{env.EXECUTABLE_PATH}} > profile.txt
head profile.txt
python3 scripts/generate_configs_and_run.py -e ${{env.EXECUTABLE_PATH}} -t ${{env.FAT_TREE_GENERATOR}} -tc ${{env.FAT_TREE_LARGE_CONFIG}}
gprof ${{env.EXECUTABLE_PATH}} > profile.txt
head profile.txt
flamegraph:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Update submodules
run: git submodule update --init --recursive
- name: Get dependencies
run: git clone https://github.com/brendangregg/FlameGraph.git
- name: Configure CMake for perf
run: cmake -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=Release -DBUILD_PROJECT=ON -DBUILD_TESTS=OFF -DLOG_LEVEL=LOG_LEVEL_ERROR -DCMAKE_CXX_FLAGS="-g -fno-omit-frame-pointer"
- name: Build project with profiling
run: cmake --build ${{env.BUILD_DIR}} -j $(nproc)
- name: Update PYTHONPATH
run: echo "PYTHONPATH=${{ github.workspace }}/scripts" >> $GITHUB_ENV
- name: Generate topology config
run: python3 ${{env.FAT_TREE_GENERATOR}} -c ${{env.FAT_TREE_LARGE_CONFIG}} -o ${{env.FLAMEGRAPH_TOPOLOGY_NAME}}
- name: Generate simulation config
run: python3 ${{env.ALL_TO_ALL_GENERATOR}} -t ${{env.FLAMEGRAPH_TOPOLOGY_NAME}} -o ${{env.FLAMEGRAPH_SIMULATION_NAME}}
- name: Run perf
run: |
sudo perf record -F 99 -g -- ./${{env.EXECUTABLE_PATH}} -c ${{env.FLAMEGRAPH_SIMULATION_NAME}} --no-logs --no-plots > perf.data
perf report -i perf.data --header-only
perf script -i perf.data -v > out.perf 2>&1
- name: Prepare FlameGraph
run: |
mkdir -p ${{ env.FLAMEGRAPH_OUTPUT_DIR }}
- name: Generate flamegraph
run: |
./FlameGraph/stackcollapse-perf.pl out.perf > out.folded
./FlameGraph/flamegraph.pl out.folded > ${{ env.FLAMEGRAPH_OUTPUT_DIR }}/flamegraph.svg
- name: Create HTML
run: python3 scripts/generate-html.py ./${{ env.FLAMEGRAPH_ARTIFACT_DIR }}
- name: Put github context to json file
run: echo '${{ toJson(github) }}' > github_context.json
- name: Calculate deploy destination dir
run: |
DEPLOY_DIR=$(python3 scripts/calculate_deploy_dir.py -c github_context.json);
echo "DEPLOY_DIR=${DEPLOY_DIR}/flamegraph" >> $GITHUB_ENV;
- name: Deploy to GitHub Pages
if: ${{ env.DEPLOY_DIR }} != ''

Check warning on line 132 in .github/workflows/load_testing.yml

View workflow run for this annotation

GitHub Actions / Load testing

Workflow syntax warning

.github/workflows/load_testing.yml (Line: 132, Col: 11): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.FLAMEGRAPH_ARTIFACT_DIR }}
destination_dir: ${{ env.DEPLOY_DIR }}
- name: Wait for artifacts to be available
run:
python3 scripts/check_artifacts.py -u 'https://cloud-storage-team.github.io/algnet/${{env.DEPLOY_DIR}}'