Skip to content

Commit 8194bbf

Browse files
committed
Merge branch 'Diffusion' of github.com:DimAdam-01/MFC-Adam into Diffusion
2 parents e0e0705 + e4ac18d commit 8194bbf

38 files changed

+754
-216
lines changed

.fortls.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"source_dirs": [
3+
"src/",
4+
"src/common/",
5+
"src/simulation/",
6+
"src/pre_process/",
7+
"src/post_process/"
8+
],
9+
"excl_paths": [
10+
"benchmarks/",
11+
"examples/",
12+
"tests/",
13+
"misc/",
14+
"src/pre_process/include/2dHardcodedIC.fpp",
15+
"src/pre_process/include/3dHardcodedIC.fpp",
16+
"src/pre_process/include/ExtrusionHardcodedIC.fpp"
17+
],
18+
"include_dirs": [
19+
"src/common/include/",
20+
"src/simulation/include/",
21+
"src/pre_process/include/",
22+
"src/post_process/include/"
23+
],
24+
"pp_suffixes": [".fpp"],
25+
"pp_defs": {
26+
"MFC": 1,
27+
"MFC_DOUBLE_PRECISION": 1
28+
},
29+
"lowercase_intrinsics": true,
30+
"debug_log": false,
31+
"disable_diagnostics": true,
32+
"use_signature_help": true,
33+
"variable_hover": true,
34+
"hover_signature": true,
35+
"enable_code_actions": true,
36+
"mod_dirs": [
37+
"build/pre_process/",
38+
"build/simulation/",
39+
"build/post_process/",
40+
"build/common/"
41+
],
42+
"ext_mod_dirs": [
43+
"/usr/include/",
44+
"/usr/local/include/",
45+
"/opt/homebrew/include/"
46+
],
47+
"implicit_external_mods": [
48+
"mpi",
49+
"m_thermochem",
50+
"hipfort",
51+
"hipfort_check",
52+
"hipfort_hipfft",
53+
"cutensorex",
54+
"silo_f9x",
55+
"m_model"
56+
],
57+
"disable_diagnostics_for_external_modules": true,
58+
"max_line_length": 132,
59+
"symbol_skip_mem": [
60+
"mpi_*"
61+
],
62+
"disable_var_diagnostics": true,
63+
"disable_fypp": false,
64+
"fypp_strict": false,
65+
"error_suppression_list": [
66+
"include-not-found",
67+
"mod-not-found",
68+
"var-masking",
69+
"declared-twice",
70+
"no-matching-declaration",
71+
"invalid-parent",
72+
"parsing-error",
73+
"fypp-error",
74+
"preprocessor-error",
75+
"syntax-error",
76+
"semantic-error",
77+
"type-error",
78+
"undefined-variable",
79+
"line-too-long"
80+
],
81+
"incremental_sync": false,
82+
"debug_parser": false,
83+
"skip_parse_errors": true,
84+
"disable_parser": [
85+
"src/post_process/m_data_output.fpp",
86+
"src/pre_process/include/ExtrusionHardcodedIC.fpp",
87+
"src/pre_process/m_checker.fpp",
88+
"src/pre_process/include/2dHardcodedIC.fpp",
89+
"src/pre_process/include/3dHardcodedIC.fpp",
90+
"src/simulation/m_qbmm.fpp",
91+
"src/common/m_variables_conversion.fpp",
92+
"src/simulation/m_global_parameters.fpp"
93+
]
94+
}

.fortlsrc

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"source_dirs": [
3+
"src/",
4+
"src/common/",
5+
"src/simulation/",
6+
"src/pre_process/",
7+
"src/post_process/"
8+
],
9+
"excl_paths": [
10+
"benchmarks/",
11+
"examples/",
12+
"tests/",
13+
"misc/",
14+
"src/pre_process/include/2dHardcodedIC.fpp",
15+
"src/pre_process/include/3dHardcodedIC.fpp",
16+
"src/pre_process/include/ExtrusionHardcodedIC.fpp",
17+
"**/m_nvtx*",
18+
"**/syscheck.fpp"
19+
],
20+
"include_dirs": [
21+
"src/common/include/",
22+
"src/simulation/include/",
23+
"src/pre_process/include/",
24+
"src/post_process/include/"
25+
],
26+
"pp_suffixes": [".fpp"],
27+
"pp_defs": {
28+
"MFC": 1,
29+
"MFC_DOUBLE_PRECISION": 1
30+
},
31+
"lowercase_intrinsics": true,
32+
"debug_log": true,
33+
"disable_diagnostics": false,
34+
"use_signature_help": true,
35+
"variable_hover": true,
36+
"hover_signature": true,
37+
"enable_code_actions": true,
38+
"mod_dirs": [
39+
"build/pre_process/",
40+
"build/simulation/",
41+
"build/post_process/",
42+
"build/common/"
43+
],
44+
"ext_mod_dirs": [
45+
"/usr/include/",
46+
"/usr/local/include/",
47+
"/opt/homebrew/include/"
48+
],
49+
"implicit_external_mods": [
50+
"mpi",
51+
"m_thermochem",
52+
"m_variables_conversion",
53+
"hipfort",
54+
"hipfort_check",
55+
"hipfort_hipfft",
56+
"cutensorex",
57+
"silo_f9x",
58+
"m_model"
59+
],
60+
"disable_diagnostics_for_external_modules": true,
61+
"max_line_length": -1,
62+
"max_comment_line_length": -1,
63+
"symbol_skip_mem": [
64+
"mpi_*"
65+
],
66+
"disable_var_diagnostics": false,
67+
"disable_fypp": false,
68+
"fypp_strict": false,
69+
"error_suppression_list": [
70+
"include-not-found",
71+
"mod-not-found",
72+
"module-not-found",
73+
"declared-twice",
74+
"no-matching-declaration",
75+
"invalid-parent",
76+
"parsing-error",
77+
"fypp-error",
78+
"preprocessor-error",
79+
"implicit-type"
80+
],
81+
"incremental_sync": false,
82+
"debug_parser": false,
83+
"skip_parse_errors": true,
84+
"disable_parser": [
85+
"src/post_process/m_data_output.fpp",
86+
"src/pre_process/include/ExtrusionHardcodedIC.fpp",
87+
"src/pre_process/m_checker.fpp",
88+
"src/pre_process/include/2dHardcodedIC.fpp",
89+
"src/pre_process/include/3dHardcodedIC.fpp",
90+
"src/simulation/m_qbmm.fpp",
91+
"src/common/m_variables_conversion.fpp",
92+
"src/simulation/m_global_parameters.fpp",
93+
"**/m_nvtx*",
94+
"**/syscheck.fpp"
95+
]
96+
}

.github/workflows/bench.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,11 @@ jobs:
9797
run: |
9898
cat pr/bench-${{ matrix.device }}.* 2>/dev/null || true
9999
cat master/bench-${{ matrix.device }}.* 2>/dev/null || true
100-
101-
- name: Archive Logs
100+
101+
# All other runners (non-Phoenix) just run without special env
102+
- name: Archive Logs (Frontier)
103+
if: always() && matrix.cluster != 'phoenix'
102104
uses: actions/upload-artifact@v4
103-
if: always()
104105
with:
105106
name: ${{ matrix.cluster }}-${{ matrix.device }}
106107
path: |

.github/workflows/frontier/submit-bench.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sbatch <<EOT
3232
#SBATCH -A CFD154 # charge account
3333
#SBATCH -N 1 # Number of nodes required
3434
$sbatch_device_opts
35-
#SBATCH -t 03:59:00 # Duration of the job (Ex: 15 mins)
35+
#SBATCH -t 01:59:00 # Duration of the job (Ex: 15 mins)
3636
#SBATCH -o$job_slug.out # Combined output and error messages file
3737
#SBATCH -p extended # Extended partition for shorter queues
3838
#SBATCH -W # Do not exit until the submitted job terminates.

.github/workflows/frontier/submit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ sbatch <<EOT
3333
#SBATCH -A CFD154 # charge account
3434
#SBATCH -N 1 # Number of nodes required
3535
$sbatch_device_opts
36-
#SBATCH -t 03:59:00 # Duration of the job (Ex: 15 mins)
36+
#SBATCH -t 01:59:00 # Duration of the job (Ex: 15 mins)
3737
#SBATCH -o$job_slug.out # Combined output and error messages file
3838
#SBATCH -p extended # Extended partition for shorter queues
3939
#SBATCH -W # Do not exit until the submitted job terminates.

.github/workflows/lint-source.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434
find ./src -type f -not -name '*nvtx*' -exec sh -c 'fortitude check "$1" | grep -v E001' _ {} \;
3535
find ./src -type f -not -name '*nvtx*' -exec sh -c 'fortitude check "$1" | grep -v E001' _ {} \; | wc -l | xargs -I{} sh -c '[ {} -gt 0 ] && exit 1 || exit 0'
3636
37+
- name: Looking for raw directives
38+
run: |
39+
! grep -iR '!\$acc\|!\$omp' --exclude="parallel_macros.fpp" --exclude="syscheck.fpp" ./src/*
40+
3741
- name: No double precision intrinsics
3842
run: |
3943
! grep -iR 'double_precision\|dsqrt\|dexp\|dlog\|dble\|dabs\|double\ precision\|real(8)\|real(4)\|dprod\|dmin\|dmax\|dfloat\|dreal\|dcos\|dsin\|dtan\|dsign\|dtanh\|dsinh\|dcosh\|d0' --exclude-dir=syscheck --exclude="*nvtx*" --exclude="*precision_select*" ./src/*

.github/workflows/phoenix/bench.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
n_ranks=12
44

5-
if [ "$job_device" = "gpu" ]; then
5+
echo "My benchmarking device is:" $device
6+
if [ "$device" = "gpu" ]; then
67
n_ranks=$(nvidia-smi -L | wc -l) # number of GPUs on node
78
gpu_ids=$(seq -s ' ' 0 $(($n_ranks-1))) # 0,1,2,...,gpu_count-1
89
device_opts="--gpu -g $gpu_ids"
@@ -15,7 +16,7 @@ mkdir -p $currentdir
1516

1617
export TMPDIR=$currentdir
1718

18-
if [ "$job_device" = "gpu" ]; then
19+
if [ "$device" = "gpu" ]; then
1920
./mfc.sh bench --mem 12 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks
2021
else
2122
./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix-bench $device_opts -n $n_ranks

0 commit comments

Comments
 (0)