Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
JRChreim authored Feb 10, 2024
2 parents c0c6522 + f5744a8 commit 33c1d40
Show file tree
Hide file tree
Showing 557 changed files with 14,707 additions and 38,561 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Benchmark'

on:
pull_request:

jobs:
self:
name: Georgia Tech | Phoenix (NVHPC)
if: github.repository == 'MFlowCode/MFC'
strategy:
matrix:
device: ['cpu', 'gpu']
runs-on:
group: phoenix
labels: gt
steps:
- name: Clone - PR
uses: actions/checkout@v3
with:
path: pr

- name: Clone - Master
uses: actions/checkout@v3
with:
repository: MFlowCode/MFC
ref: master
path: master

- name: Bench (Master v. PR)
run: |
(cd pr && bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
(cd master && bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
wait %1 && wait %2
- name: Generate & Post Comment
run: |
. ./mfc.sh load -c p -m g
./mfc.sh bench_diff master/bench-${{ matrix.device }}.yaml pr/bench-${{ matrix.device }}.yaml
- name: Archive Logs
uses: actions/upload-artifact@v3
if: always()
with:
name: logs-${{ matrix.device }}
path: |
pr/bench-${{ matrix.device }}.*
pr/build/benchmarks/*
master/bench-${{ matrix.device }}.*
master/build/benchmarks/*
40 changes: 40 additions & 0 deletions .github/workflows/count.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check Line Counts
on:
push:

pull_request:

workflow_dispatch:

jobs:
sz:
name: Core MFC Line Difference
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout code from PR branch
uses: actions/checkout@v4
with:
path: pr

- name: Checkout code from MFC master
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.repository }}
ref: ${{ github.event.pull_request.base.ref }}
path: base
# repository: MFlowCode/MFC
# ref: master
# path: base

- name: Get Line Diff
run: |
BASE="$GITHUB_WORKSPACE/base"
PR="$GITHUB_WORKSPACE/pr"
cd $BASE
export MFC_PR=$PR
pwd
./mfc.sh count_diff
1 change: 0 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ jobs:
file: toolchain/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/mfc:latest

7 changes: 6 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ jobs:
docs:
name: Build & Publish
runs-on: ubuntu-latest


if: github.repository == 'MFlowCode/MFC'
concurrency:
group: docs-publish
cancel-in-progress: true

steps:
- uses: actions/checkout@v3

Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: LinkChecker

on: push

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: '.link_config.json'
use-verbose-mode: 'yes'
19 changes: 19 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint

on:
push:

pull_request:

workflow_dispatch:

jobs:
docs:
name: Lint Toolchain
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Lint the toolchain
run: ./mfc.sh lint
11 changes: 11 additions & 0 deletions .github/workflows/phoenix/bench.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

n_ranks=4

if [ "$job_device" == "gpu" ]; then
n_ranks=$(nvidia-smi -L | wc -l) # number of GPUs on node
gpu_ids=$(seq -s ' ' 0 $(($n_ranks-1))) # 0,1,2,...,gpu_count-1
device_opts="--gpu -g $gpu_ids"
fi

./mfc.sh bench -j $(nproc) -o "$job_slug.yaml" -- -c phoenix $device_opts -n $n_ranks
63 changes: 63 additions & 0 deletions .github/workflows/phoenix/submit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash

set -e

usage() {
echo "Usage: $0 [script.sh] [cpu|gpu]"
}

if [ ! -z "$1" ]; then
sbatch_script_contents=`cat $1`
else
usage
exit 1
fi

sbatch_cpu_opts="\
#SBATCH -p cpu-small # partition
#SBATCH --ntasks-per-node=24 # Number of cores per node required
#SBATCH --mem-per-cpu=2G # Memory per core\
"

sbatch_gpu_opts="\
#SBATCH -CV100-16GB
#SBATCH -G2\
"

if [ "$2" == "cpu" ]; then
sbatch_device_opts="$sbatch_cpu_opts"
elif [ "$2" == "gpu" ]; then
sbatch_device_opts="$sbatch_gpu_opts"
else
usage
exit 1
fi

job_slug="`basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g'`-$2"

sbatch <<EOT
#!/bin/bash
#SBATCH -Jshb-$job_slug # Job name
#SBATCH --account=gts-sbryngelson3 # charge account
#SBATCH -N1 # Number of nodes required
$sbatch_device_opts
#SBATCH -t 04:00:00 # Duration of the job (Ex: 15 mins)
#SBATCH -q embers # QOS Name
#SBATCH -o$job_slug.out # Combined output and error messages file
#SBATCH -W # Do not exit until the submitted job terminates.
set -e
set -x
cd "\$SLURM_SUBMIT_DIR"
echo "Running in $(pwd):"
job_slug="$job_slug"
job_device="$2"
. ./mfc.sh load -c p -m $2
$sbatch_script_contents
EOT

20 changes: 20 additions & 0 deletions .github/workflows/phoenix/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

build_opts=""
if [ "$job_device" == "gpu" ]; then
build_opts="--gpu"
fi

./mfc.sh build -j 8 $build_opts

n_test_threads=8

if [ "$job_device" == "gpu" ]; then
gpu_count=$(nvidia-smi -L | wc -l) # number of GPUs on node
gpu_ids=$(seq -s ' ' 0 $(($gpu_count-1))) # 0,1,2,...,gpu_count-1
device_opts="-g $gpu_ids"
n_test_threads=`expr $gpu_count \* 2`
fi

./mfc.sh test -a -j $n_test_threads $device_opts -- -c phoenix

21 changes: 21 additions & 0 deletions .github/workflows/pretty.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Pretty

on:
push:

pull_request:

workflow_dispatch:

jobs:
docs:
name: Code formatting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Check formatting
run: |
./mfc.sh format
git diff --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
uses: actions/checkout@v3

- name: Spell Check
uses: crate-ci/typos@master
uses: crate-ci/typos@master
26 changes: 12 additions & 14 deletions .github/workflows/ci.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,22 @@ jobs:
device: ['cpu', 'gpu']
runs-on:
group: phoenix
labels: self-hosted
labels: gt
steps:
- name: Clone
uses: actions/checkout@v3

- name: Build
run: |
. ./mfc.sh load -c p -m gpu
./mfc.sh build -j 2 $(if [ '${{ matrix.device }}' == 'gpu' ]; then echo '--gpu'; fi)
- name: Build & Test
run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }}

- name: Test
run: |
. ./mfc.sh load -c p -m gpu
mv misc/run-phoenix-release-${{ matrix.device }}.sh ./
sbatch run-phoenix-release-${{ matrix.device }}.sh
- name: Print Logs
if: always()
run: cat test-${{ matrix.device }}.out

- name: Print
if: always()
run: |
cat test.out
- name: Archive Logs
uses: actions/upload-artifact@v3
if: always()
with:
name: logs
path: test-${{ matrix.device }}.out

7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
node_modules/
package.json
yarn.lock
docker-compose.yml

/build/
.vscode/
src/*/include/case.fpp
Expand All @@ -19,8 +24,6 @@ __pycache__
/tests/*/**
!/tests/*/golden.txt
!/tests/*/golden-metadata.txt
!/tests/*/case.py
!/tests/*/README.md

# NVIDIA Nsight Compute
*.nsys-rep
Expand Down
32 changes: 32 additions & 0 deletions .link_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"ignorePatterns": [
{
"pattern": "examples.md"
}
],
"replacementPatterns": [
{
"pattern": "^.attachments",
"replacement": "file://some/conventional/folder/.attachments"
},
{
"pattern": "^/",
"replacement": "{{BASEURL}}/"
}
],
"httpHeaders": [
{
"urls": ["https://example.com"],
"headers": {
"Authorization": "Basic Zm9vOmJhcg==",
"Foo": "Bar"
}
}
],
"timeout": "20s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206, 403]
}

4 changes: 0 additions & 4 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ AttributeIDSupressMenu = "AttributeIDSupressMenu"
INOUT = "INOUT"
WRONLY = "WRONLY"
nd = "nd"
# Childs = "Childs"
# myu = "myu"



[files]
extend-exclude = ["docs/documentation/references*", "tests/"]
Loading

0 comments on commit 33c1d40

Please sign in to comment.