Skip to content

Commit 55e3efa

Browse files
author
Diego Vaca
committed
Fixed GPUs testing NVIDIA and added wp PR
2 parents 958719a + 108805c commit 55e3efa

File tree

119 files changed

+6122
-6198
lines changed

Some content is hidden

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

119 files changed

+6122
-6198
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/line-count.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ jobs:
2929
run: pip install fortitude-lint ansi2txt
3030

3131
- name: Lint the source code
32-
run: fortitude check --ignore=E001,S001,S101,M011,F001,S041,T001 ./src/*/* || 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/**
36+
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/*

.github/workflows/lint-toolchain.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ jobs:
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: 4 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

@@ -86,7 +88,7 @@ jobs:
8688
- name: Build
8789
run: |
8890
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi
89-
/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 }}
9092
9193
- name: Test
9294
run: |
@@ -140,4 +142,4 @@ jobs:
140142
if: always()
141143
with:
142144
name: logs-${{ strategy.job-index }}-${{ matrix.device }}
143-
path: test-${{ matrix.device }}.out
145+
path: test-${{ matrix.device }}.out

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ option(MFC_POST_PROCESS "Build post_process" OFF
2626
option(MFC_SYSCHECK "Build syscheck" OFF)
2727
option(MFC_DOCUMENTATION "Build documentation" OFF)
2828
option(MFC_ALL "Build everything" OFF)
29+
option(MFC_SINGLE_PRECISION "Build single precision" OFF)
2930

3031
if (MFC_ALL)
3132
set(MFC_PRE_PROCESS ON FORCE)
@@ -34,6 +35,12 @@ if (MFC_ALL)
3435
set(MFC_DOCUMENTATION ON FORCE)
3536
endif()
3637

38+
if (MFC_SINGLE_PRECISION)
39+
add_compile_definitions(MFC_SINGLE_PRECISION)
40+
else()
41+
add_compile_definitions(MFC_DOUBLE_PRECISION)
42+
endif()
43+
3744

3845
# CMake Library Imports
3946

0 commit comments

Comments
 (0)