Skip to content

Commit aa66f1b

Browse files
committed
revert bench.yml
1 parent 3d384e9 commit aa66f1b

File tree

1 file changed

+28
-128
lines changed

1 file changed

+28
-128
lines changed

.github/workflows/bench.yml

Lines changed: 28 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,48 @@
1-
name: 'Test Suite'
1+
name: 'Benchmark'
22

3-
on:
4-
push:
5-
paths:
6-
- '**.f90'
7-
- '**.fpp'
8-
- '**.py'
9-
- '**.yml'
10-
- 'mfc.sh'
11-
- 'golden.txt'
12-
- 'CMakeLists.txt'
13-
- 'requirements.txt'
3+
on: pull_request
144

15-
pull_request:
16-
17-
workflow_dispatch:
18-
195
jobs:
20-
github:
21-
name: Github
22-
strategy:
23-
matrix:
24-
os: ['ubuntu', 'macos']
25-
mpi: ['mpi']
26-
debug: ['debug', 'no-debug']
27-
intel: [true, false]
28-
exclude:
29-
- os: macos
30-
intel: true
31-
32-
include:
33-
- os: ubuntu
34-
mpi: no-mpi
35-
debug: no-debug
36-
intel: false
37-
38-
fail-fast: false
39-
continue-on-error: true
40-
runs-on: ${{ matrix.os }}-latest
41-
steps:
42-
- name: Clone
43-
uses: actions/checkout@v4
44-
45-
- name: Setup MacOS
46-
if: matrix.os == 'macos'
47-
run: |
48-
brew install wget make python make cmake coreutils gcc@14
49-
echo "CC=gcc-14" >> $GITHUB_ENV
50-
echo "CXX=g++-14" >> $GITHUB_ENV
51-
echo "FC=gfortran-14" >> $GITHUB_ENV
52-
53-
- name: (MacOS) Build OpenMPI
54-
if: matrix.os == 'macos' && matrix.mpi == 'mpi'
55-
run: |
56-
brew install mpich
57-
58-
- name: Setup Ubuntu
59-
if: matrix.os == 'ubuntu' && matrix.intel == false
60-
run: |
61-
sudo apt update -y
62-
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
63-
64-
- name: Setup Ubuntu (Intel)
65-
if: matrix.os == 'ubuntu' && matrix.intel == true
66-
run: |
67-
sudo apt update -y
68-
sudo apt install -y tar wget make cmake python3 python3-dev
69-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
70-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
71-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
72-
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
73-
sudo apt-get update
74-
sudo apt-get install -y intel-oneapi-common-vars intel-oneapi-compiler-fortran-2022.1.0 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0 intel-oneapi-mkl-2021.4.0 intel-oneapi-mpi-2021.7.1 intel-oneapi-mpi-devel-2021.7.1
75-
source /opt/intel/oneapi/setvars.sh
76-
echo "CXX=$(which icpc)" >> $GITHUB_ENV
77-
echo "CC=$(which icc)" >> $GITHUB_ENV
78-
echo "FC=$(which ifort)" >> $GITHUB_ENV
79-
echo "OMPI_FC=$(which ifort)" >> $GITHUB_ENV
80-
echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV
81-
echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV
82-
echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
83-
echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
84-
85-
- name: Build
86-
run: |
87-
if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
88-
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
89-
90-
- name: Test
91-
run: |
92-
if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
93-
/bin/bash mfc.sh test -j $(nproc) $OPT1 $OPT2
94-
env:
95-
OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }}
96-
OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }}
97-
98-
docker:
99-
name: Github | Docker
100-
runs-on: ubuntu-latest
101-
steps:
102-
- name: Clone
103-
uses: actions/checkout@v4
104-
105-
- name: Test
106-
run: sudo ./mfc.sh docker ./mfc.sh test -j $(nproc) -a
107-
1086
self:
109-
name: Self Hosted
7+
name: Georgia Tech | Phoenix (NVHPC)
1108
if: github.repository == 'MFlowCode/MFC'
111-
continue-on-error: true
1129
strategy:
11310
matrix:
11411
device: ['cpu', 'gpu']
115-
lbl: ['gt', 'frontier']
116-
exclude:
117-
- device: cpu
118-
lbl: frontier
11912
runs-on:
12013
group: phoenix
121-
labels: ${{ matrix.lbl }}
14+
labels: gt
12215
steps:
123-
- name: Clone
16+
- name: Clone - PR
12417
uses: actions/checkout@v3
18+
with:
19+
path: pr
12520

126-
- name: Build & Test
127-
if: matrix.lbl == 'gt'
128-
run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }}
129-
130-
- name: Build
131-
if: matrix.lbl == 'frontier'
132-
run: bash .github/workflows/frontier/build.sh
21+
- name: Clone - Master
22+
uses: actions/checkout@v3
23+
with:
24+
repository: MFlowCode/MFC
25+
ref: master
26+
path: master
13327

134-
- name: Test
135-
if: matrix.lbl == 'frontier'
136-
run: bash .github/workflows/frontier/submit.sh .github/workflows/frontier/test.sh ${{matrix.device}}
28+
- name: Bench (Master v. PR)
29+
run: |
30+
(cd pr && bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
31+
(cd master && bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
32+
wait %1 && wait %2
13733
138-
- name: Print Logs
139-
if: always()
140-
run: cat test-${{ matrix.device }}.out
34+
- name: Generate & Post Comment
35+
run: |
36+
. ./mfc.sh load -c p -m g
37+
./mfc.sh bench_diff master/bench-${{ matrix.device }}.yaml pr/bench-${{ matrix.device }}.yaml
14138
14239
- name: Archive Logs
14340
uses: actions/upload-artifact@v3
14441
if: always()
14542
with:
146-
name: logs
147-
path: test-${{ matrix.device }}.out
148-
43+
name: logs-${{ matrix.device }}
44+
path: |
45+
pr/bench-${{ matrix.device }}.*
46+
pr/build/benchmarks/*
47+
master/bench-${{ matrix.device }}.*
48+
master/build/benchmarks/*

0 commit comments

Comments
 (0)