Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ed2bc5e
Correct line markers have been recovered
danieljvickers Nov 6, 2025
35c57eb
Made it through common
danieljvickers Nov 6, 2025
477a13b
Modified a few hundred macros
danieljvickers Nov 6, 2025
3c010f8
Finished with parallel loops
danieljvickers Nov 6, 2025
f8dd4cd
Removed duplicate parallel statements
danieljvickers Nov 6, 2025
fd482ed
This builds
danieljvickers Nov 6, 2025
ceec116
Removed all warnings
danieljvickers Nov 6, 2025
0ce8883
Spelling and Format
danieljvickers Nov 6, 2025
824585f
Updated macro API documentation
danieljvickers Nov 6, 2025
28a20bb
Spelling
danieljvickers Nov 6, 2025
5f768ec
Found an error in how FYPP processes that resulted in only openMP dir…
danieljvickers Nov 7, 2025
5ea3506
Resolved chemistry issues
danieljvickers Nov 7, 2025
1980851
Ben found my IO error
danieljvickers Nov 7, 2025
1d5e33c
Fixed issue with s_get_char_vol being elemental, which means that it …
danieljvickers Nov 7, 2025
723822d
All tests pass on wingtip
danieljvickers Nov 7, 2025
2eb6864
merge
danieljvickers Nov 16, 2025
9f946a0
Passes GNU tests
danieljvickers Nov 16, 2025
a098d5d
Upstream mnerge
danieljvickers Nov 16, 2025
07d558b
Formatting and passed all GNU tests
danieljvickers Nov 16, 2025
90639b2
refresh FFT code to master based on comment
danieljvickers Nov 16, 2025
2376abc
formatting:
danieljvickers Nov 16, 2025
0470192
Hard reset of file with controled search for macro changes
Nov 16, 2025
c451b20
Formatting
Nov 16, 2025
db852bf
Parenthesis change
Nov 16, 2025
8578364
Testing if reverting macros on the MPI file resolves seg fault issues
Nov 17, 2025
b521697
format
Nov 17, 2025
973ea73
Fixed old macros
Nov 17, 2025
2ede9a1
Undoing a deletion of a directive with and end loop
Nov 17, 2025
d5a3f74
Previous test passed except for gres resource errors, which are kind …
Nov 17, 2025
abf2f5a
Got errors with the first 9 loops, so now I removed 4 more loops. 5 t…
Nov 17, 2025
71f19b1
Last test pass, so I have narrowed the seg fault to 4 loops. Removed …
Nov 17, 2025
1875e3c
Previous test compiled, meaning the problem is one of the two remaini…
Nov 17, 2025
b5079f6
The previous test compiled. If this does not compile then I am certai…
Nov 17, 2025
31d913f
For some reason, the last test compiled. It changed with format. I wi…
Nov 17, 2025
30417cb
Readding a fix that I implemented earlier for bubbles that fails on N…
Nov 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/common/include/acc_macros.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
$:end_acc_directive
#:enddef

#:def ACC_PARALLEL_LOOP(code, collapse=None, private=None, parallelism='[gang, vector]', &
#:def ACC_PARALLEL_LOOP(collapse=None, private=None, parallelism='[gang, vector]', &
& default='present', firstprivate=None, reduction=None, reductionOp=None, &
& copy=None, copyin=None, copyinReadOnly=None, copyout=None, create=None, &
& no_create=None, present=None, deviceptr=None, attach=None, extraAccArgs=None)
Expand All @@ -155,10 +155,7 @@
& deviceptr_val.strip('\n') + attach_val.strip('\n')
#:set acc_directive = '!$acc parallel loop ' + &
& clause_val + extraAccArgs_val.strip('\n')
#:set acc_end_directive = '!$acc end parallel loop'
$:acc_directive
$:code
$:acc_end_directive
#:enddef

#:def ACC_ROUTINE(function_name=None, parallelism=None, nohost=False, extraAccArgs=None)
Expand Down Expand Up @@ -308,4 +305,4 @@
#:set acc_directive = '!$acc wait ' + clause_val + extraAccArgs_val.strip('\n')
$:acc_directive
#:enddef
! New line at end of file is required for FYPP
! New line at end of file is required for FYPP
21 changes: 15 additions & 6 deletions src/common/include/omp_macros.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
$:omp_end_directive
#:enddef

#:def OMP_PARALLEL_LOOP(code, collapse=None, private=None, parallelism='[gang, vector]', &
#:def OMP_PARALLEL_LOOP(collapse=None, private=None, parallelism='[gang, vector]', &
& default='present', firstprivate=None, reduction=None, reductionOp=None, &
& copy=None, copyin=None, copyinReadOnly=None, copyout=None, create=None, &
& no_create=None, present=None, deviceptr=None, attach=None, extraOmpArgs=None)
Expand Down Expand Up @@ -178,21 +178,30 @@

#:if MFC_COMPILER == NVIDIA_COMPILER_ID or MFC_COMPILER == PGI_COMPILER_ID
#:set omp_start_directive = '!$omp target teams loop defaultmap(firstprivate:scalar) bind(teams,parallel) '
#:set omp_end_directive = '!$omp end target teams loop'
#:elif MFC_COMPILER == CCE_COMPILER_ID
#:set omp_start_directive = '!$omp target teams distribute parallel do simd defaultmap(firstprivate:scalar) '
#:set omp_end_directive = '!$omp end target teams distribute parallel do simd'
#:elif MFC_COMPILER == AMD_COMPILER_ID
#:set omp_start_directive = '!$omp target teams distribute parallel do '
#:set omp_end_directive = '!$omp end target teams distribute parallel do'
#:else
#:set omp_start_directive = '!$omp target teams loop defaultmap(firstprivate:scalar) bind(teams,parallel) '
#:set omp_end_directive = '!$omp end target teams loop'
#:endif

#:set omp_directive = omp_start_directive + clause_val + extraOmpArgs_val.strip('\n')
$:omp_directive
$:code
#:enddef

#:def END_OMP_PARALLEL_LOOP()

#:if MFC_COMPILER == NVIDIA_COMPILER_ID or MFC_COMPILER == PGI_COMPILER_ID
#:set omp_end_directive = '!$omp end target teams loop'
#:elif MFC_COMPILER == CCE_COMPILER_ID
#:set omp_end_directive = '!$omp end target teams distribute parallel do simd'
#:elif MFC_COMPILER == AMD_COMPILER_ID
#:set omp_end_directive = '!$omp end target teams distribute parallel do'
#:else
#:set omp_end_directive = '!$omp end target teams loop'
#:endif

$:omp_end_directive
#:enddef

Expand Down
24 changes: 17 additions & 7 deletions src/common/include/parallel_macros.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,31 @@

#:enddef

#:def GPU_PARALLEL_LOOP(code, collapse=None, private=None, parallelism='[gang, vector]', &
#:def GPU_PARALLEL_LOOP(collapse=None, private=None, parallelism='[gang, vector]', &
& default='present', firstprivate=None, reduction=None, reductionOp=None, &
& copy=None, copyin=None, copyinReadOnly=None, copyout=None, create=None, &
& no_create=None, present=None, deviceptr=None, attach=None, extraAccArgs=None, extraOmpArgs=None)

#:set acc_code = ACC_PARALLEL_LOOP(code, collapse, private, parallelism, default, firstprivate, reduction, reductionOp, copy, copyin, copyinReadOnly, copyout, create, no_create, present, deviceptr, attach, extraAccArgs)
#:set omp_code = OMP_PARALLEL_LOOP(code, collapse, private, parallelism, default, firstprivate, reduction, reductionOp, copy, copyin, copyinReadOnly, copyout, create, no_create, present, deviceptr, attach, extraOmpArgs)
#if defined(MFC_OpenACC)
#:set directive = ACC_PARALLEL_LOOP(collapse, private, parallelism, default, firstprivate, reduction, reductionOp, copy, copyin, copyinReadOnly, copyout, create, no_create, present, deviceptr, attach, extraAccArgs)
#elif defined(MFC_OpenMP)
#:set directive = OMP_PARALLEL_LOOP(collapse, private, parallelism, default, firstprivate, reduction, reductionOp, copy, copyin, copyinReadOnly, copyout, create, no_create, present, deviceptr, attach, extraOmpArgs)
#endif

$:directive

#:enddef

#:def END_GPU_PARALLEL_LOOP()

#if defined(MFC_OpenACC)
$:acc_code
#:set end_directive = '!$acc end parallel loop'
#elif defined(MFC_OpenMP)
$:omp_code
#else
$:code
#:set end_directive = END_OMP_PARALLEL_LOOP()
#endif

$:end_directive

#:enddef

#:def GPU_ROUTINE(function_name=None, parallelism=None, nohost=False, cray_inline=False, extraAccArgs=None, extraOmpArgs=None)
Expand Down
2 changes: 1 addition & 1 deletion src/common/include/shared_parallel_macros.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@
#:endif
$:extraArgs_val
#:enddef
! New line at end of file is required for FYPP
! New line at end of file is required for FYPP
Loading
Loading