Skip to content

Commit 143f710

Browse files
authored
Merge branch 'MFlowCode:master' into source
2 parents 5e77aa2 + 108805c commit 143f710

File tree

381 files changed

+73366
-6536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

381 files changed

+73366
-6536
lines changed

.github/workflows/bench.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747

4848
- name: Bench (Master v. PR)
4949
run: |
50-
(cd pr && bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
51-
(cd master && bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
50+
(cd pr && bash .github/workflows/phoenix/submit-bench.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
51+
(cd master && bash .github/workflows/phoenix/submit-bench.sh .github/workflows/phoenix/bench.sh ${{ matrix.device }}) &
5252
wait %1 && wait %2
5353
5454
- name: Generate & Post Comment

.github/workflows/formatting.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v4
1212

13+
- name: MFC Python setup
14+
run: ./mfc.sh init
15+
1316
- name: Check formatting
1417
run: |
1518
./mfc.sh format -j $(nproc)

.github/workflows/frontier/submit.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ sbatch <<EOT
2222
#SBATCH -N 1 # Number of nodes required
2323
#SBATCH -n 8 # Number of cores required
2424
#SBATCH -t 02:00:00 # Duration of the job (Ex: 15 mins)
25-
#SBATCH -q debug # QOS Name
2625
#SBATCH -o$job_slug.out # Combined output and error messages file
2726
#SBATCH -W # Do not exit until the submitted job terminates.
2827

.github/workflows/line-count.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check Line Counts
1+
name: Lines of Code
22

33
on: [push, pull_request, workflow_dispatch]
44

@@ -49,5 +49,6 @@ jobs:
4949
cd $BASE
5050
export MFC_PR=$PR
5151
pwd
52+
./mfc.sh init &> tmp.txt
5253
./mfc.sh count_diff
5354

.github/workflows/lint-source.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
name: Lint Source Code
1+
name: Lint Source
22

33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
lint:
7-
name: Lint Source Code
8-
runs-on: macos-latest
6+
file-changes:
7+
name: Detect File Changes
8+
runs-on: 'ubuntu-latest'
9+
outputs:
10+
checkall: ${{ steps.changes.outputs.checkall }}
11+
steps:
12+
- name: Clone
13+
uses: actions/checkout@v4
14+
15+
- name: Detect Changes
16+
uses: dorny/paths-filter@v3
17+
id: changes
18+
with:
19+
filters: ".github/file-filter.yml"
20+
21+
lint-source:
22+
name: Lint Source
23+
runs-on: 'ubuntu-latest'
924

1025
steps:
1126
- uses: actions/checkout@v4
@@ -14,10 +29,11 @@ jobs:
1429
run: pip install fortitude-lint ansi2txt
1530

1631
- name: Lint the source code
17-
run: fortitude check --ignore=E001,S001,S101,M011,F001,S041,T001 ./src/*/* &> lint.txt || true
32+
run: fortitude check --file-extensions=f90,fpp,fypp --ignore=E001,S001,S101,M011,F001,S041,T001,S101 ./src/** || true
33+
34+
- name: Ensure kind is specified
35+
run: fortitude check --file-extensions=f90,fpp,fypp --select=P001 ./src/**
1836

19-
- name: Sanitize
20-
run: cat lint.txt | ansi2txt > lint2.txt
21-
22-
- name: Output Summary
23-
run: cat lint2.txt << EOF > $GITHUB_STEP_SUMMARY
37+
- name: No double precision intrinsics
38+
run: |
39+
! grep -iR 'dexp\|dlog\|dble\|dabs\|double\ precision\|real(8)\|real(4)\|dprod\|dmin\|dmax\|dfloat\|dreal\|dcos\|dsin\|dtan\|dsign\|dtanh\|dsinh\|dcosh\|\.d0\|\dd0' --exclude-dir=syscheck ./src/*
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
name: Lint
1+
name: Lint Toolchain
22

33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
docs:
6+
lint-toolchain:
77
name: Lint Toolchain
88
runs-on: ubuntu-latest
99

1010
steps:
1111
- uses: actions/checkout@v4
1212

13+
- name: MFC Python setup
14+
run: ./mfc.sh init
15+
1316
- name: Lint the toolchain
1417
run: ./mfc.sh lint
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
usage() {
6+
echo "Usage: $0 [script.sh] [cpu|gpu]"
7+
}
8+
9+
if [ ! -z "$1" ]; then
10+
sbatch_script_contents=`cat $1`
11+
else
12+
usage
13+
exit 1
14+
fi
15+
16+
sbatch_cpu_opts="\
17+
#SBATCH -p cpu-small # partition
18+
#SBATCH --ntasks-per-node=24 # Number of cores per node required
19+
#SBATCH --mem-per-cpu=2G # Memory per core\
20+
"
21+
22+
sbatch_gpu_opts="\
23+
#SBATCH -CV100
24+
#SBATCH -G2\
25+
"
26+
27+
if [ "$2" == "cpu" ]; then
28+
sbatch_device_opts="$sbatch_cpu_opts"
29+
elif [ "$2" == "gpu" ]; then
30+
sbatch_device_opts="$sbatch_gpu_opts"
31+
else
32+
usage
33+
exit 1
34+
fi
35+
36+
job_slug="`basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g'`-$2"
37+
38+
sbatch <<EOT
39+
#!/bin/bash
40+
#SBATCH -Jshb-$job_slug # Job name
41+
#SBATCH --account=gts-sbryngelson3 # charge account
42+
#SBATCH -N1 # Number of nodes required
43+
$sbatch_device_opts
44+
#SBATCH -t 02:00:00 # Duration of the job (Ex: 15 mins)
45+
#SBATCH -q embers # QOS Name
46+
#SBATCH -o$job_slug.out # Combined output and error messages file
47+
#SBATCH -W # Do not exit until the submitted job terminates.
48+
49+
set -e
50+
set -x
51+
52+
cd "\$SLURM_SUBMIT_DIR"
53+
echo "Running in $(pwd):"
54+
55+
job_slug="$job_slug"
56+
job_device="$2"
57+
58+
. ./mfc.sh load -c p -m $2
59+
60+
$sbatch_script_contents
61+
62+
EOT
63+

.github/workflows/phoenix/submit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sbatch_cpu_opts="\
2020
"
2121

2222
sbatch_gpu_opts="\
23-
#SBATCH -CV100-16GB
23+
#SBATCH -p gpu-v100,gpu-a100,gpu-h100,gpu-l40s
2424
#SBATCH -G2\
2525
"
2626

.github/workflows/spelling.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Spell Check
22

3-
on: [push, workflow_dispatch]
3+
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
66
run:
@@ -9,6 +9,9 @@ jobs:
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@v4
12-
12+
13+
- name: MFC Python Setup
14+
run: ./mfc.sh init
15+
1316
- name: Spell Check
1417
run: ./mfc.sh spelling

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
matrix:
2727
os: ['ubuntu', 'macos']
2828
mpi: ['mpi']
29+
precision: ['']
2930
debug: ['debug', 'no-debug']
3031
intel: [true, false]
3132
exclude:
@@ -35,6 +36,7 @@ jobs:
3536
include:
3637
- os: ubuntu
3738
mpi: no-mpi
39+
precision: single
3840
debug: no-debug
3941
intel: false
4042

@@ -49,6 +51,8 @@ jobs:
4951
- name: Setup MacOS
5052
if: matrix.os == 'macos'
5153
run: |
54+
brew update
55+
brew upgrade
5256
brew install coreutils python cmake fftw hdf5 gcc@14 boost open-mpi
5357
echo "FC=gfortran-14" >> $GITHUB_ENV
5458
echo "BOOST_INCLUDE=/opt/homebrew/include/" >> $GITHUB_ENV
@@ -84,7 +88,7 @@ jobs:
8488
- name: Build
8589
run: |
8690
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi
87-
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
91+
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }} --${{ matrix.precision }}
8892
8993
- name: Test
9094
run: |
@@ -138,4 +142,4 @@ jobs:
138142
if: always()
139143
with:
140144
name: logs-${{ strategy.job-index }}-${{ matrix.device }}
141-
path: test-${{ matrix.device }}.out
145+
path: test-${{ matrix.device }}.out

0 commit comments

Comments
 (0)