Skip to content
Merged
Show file tree
Hide file tree
Changes from 79 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
d8730b1
Created parallel loop macro
Jun 3, 2025
8eec3d6
Added more args to parallel loop macro and replaced some directives
prathi-wind Jun 3, 2025
4056f84
Replaced more directives and added reduction option
prathi-wind Jun 3, 2025
7a81f7a
Multi-reduction support and more directives replaced
prathi-wind Jun 3, 2025
23dfe88
Replaced some directives
prathi-wind Jun 4, 2025
76f79e0
Replaced more directives
prathi-wind Jun 4, 2025
aa9b5c6
More directives replaced and formatter
prathi-wind Jun 4, 2025
d3e5ac7
More directives replaced
prathi-wind Jun 4, 2025
2e61a77
Don't change mpi_proxy as will likely cause merge conflicts
prathi-wind Jun 5, 2025
891b714
Made macro captialized and updated macro with DRY
prathi-wind Jun 5, 2025
5922cb2
Fixed issues with macro
prathi-wind Jun 5, 2025
d59e15e
Added loop macro
prathi-wind Jun 9, 2025
ef035a8
Added rest of directive macros
prathi-wind Jun 10, 2025
c4332d8
Moved directive macros to seperate file
prathi-wind Jun 10, 2025
25a5716
Fixed spelling issue
prathi-wind Jun 11, 2025
e8d78e8
Replaced Openacc routine directives
prathi-wind Jun 11, 2025
779ea27
Replaced non-parallel loops
prathi-wind Jun 11, 2025
8061a0d
Added declare macros
prathi-wind Jun 11, 2025
bb0d2ed
Added update device macros
prathi-wind Jun 11, 2025
9814a90
Added update host macros
prathi-wind Jun 11, 2025
2bcfa22
Replaced rest of parallel loop directives
prathi-wind Jun 11, 2025
b4afb9f
Ran formatter
prathi-wind Jun 11, 2025
764c71d
Small refactor of QBMM subroutines (#856)
prathi-wind Jun 12, 2025
2914bed
Fix packer compare message (#857)
sbryngelson Jun 5, 2025
d9656a7
Fixed some OpenACC directives (#859)
prathi-wind Jun 12, 2025
6a34845
cmake flags (#862)
sbryngelson Jun 6, 2025
217817f
Benchmarking news a new temp directory and there ya go
sbryngelson Jun 7, 2025
b443875
refac qbmm (#861)
sbryngelson Jun 7, 2025
ffb479a
Cody tidying - Remove unused dummy variables (#854)
prathi-wind Jun 12, 2025
5b8d979
move pressure relaxation to its own module + refac (#865)
prathi-wind Jun 12, 2025
1ed95c0
Create .cursorrules (#866)
sbryngelson Jun 8, 2025
43b498a
fix cursorrules (#867)
sbryngelson Jun 8, 2025
5d87f90
Delete .cursorrules (#868)
sbryngelson Jun 8, 2025
28d9700
Update mfc-agent-rules.mdc (#869)
sbryngelson Jun 8, 2025
46d55d8
Make CBC not so terrible (#870)
sbryngelson Jun 9, 2025
1f3b8f0
changed output file from default (1) to run_time.inf (3) (#504) (#877)
Malmahrouqi3 Jun 11, 2025
bea95b5
Fixed issues with macro
prathi-wind Jun 12, 2025
c6d4a04
Replaced Openacc routine directives
prathi-wind Jun 11, 2025
a6dac4d
Added update device macros
prathi-wind Jun 11, 2025
d1b0e73
Replaced rest of parallel loop directives
prathi-wind Jun 11, 2025
0d2d6ac
Renamed directives to have GPU_ beginning
prathi-wind Jun 12, 2025
444c4d6
Replace enter data directives and add cray inline support
prathi-wind Jun 12, 2025
593ed0f
Renamed gpu macros file to parallel_macros.fpp
prathi-wind Jun 12, 2025
7d378be
Ran formatter
prathi-wind Jun 13, 2025
4f8b48b
Resolved merge conflicts
prathi-wind Jun 13, 2025
a895014
Undo changes mpi_common as will be refactored in future pull request
prathi-wind Jun 13, 2025
f36163f
Ran formatter
prathi-wind Jun 13, 2025
4c9f230
Moved parallel_macros include directly into macros.fpp
prathi-wind Jun 16, 2025
395bc3e
Changed default of routine parallelism argument
prathi-wind Jun 16, 2025
c9b8708
Switch to string lists
prathi-wind Jun 17, 2025
709d18a
Merge remote-tracking branch 'upstream/master' into meta-directive
prathi-wind Jun 17, 2025
36db5fc
Merge branch 'master' into meta-directive
sbryngelson Jun 18, 2025
ca8f970
Fixed gpu loop defaults and changed some asserts
prathi-wind Jun 18, 2025
ba189e9
Switched parallelism from python list to string list
prathi-wind Jun 18, 2025
630163b
Removed default for GPU atomic and fixed GPU wait
prathi-wind Jun 18, 2025
c03adf9
Replaced many more directives
prathi-wind Jun 18, 2025
c073450
Add host_data directive
prathi-wind Jun 18, 2025
c32c956
Replaced atomic directives
prathi-wind Jun 18, 2025
eb01272
Replaced host data directives
prathi-wind Jun 18, 2025
4159b74
Removed all end directives excpet host_data and kernels
prathi-wind Jun 18, 2025
3c64b6b
Replaced end host data directives
prathi-wind Jun 19, 2025
f74dd1d
Added end host data directive
prathi-wind Jun 19, 2025
26a3b6f
Updated allocate and deallocate macros
prathi-wind Jun 19, 2025
96bfabe
Ran formatter
prathi-wind Jun 19, 2025
62cac03
Updated parallelism defaults, Updated cray inlining and used replaced…
prathi-wind Jun 19, 2025
41c8280
Combined end directives with the beginning directive
prathi-wind Jun 19, 2025
bfefe6a
Removed whitespace in macros, added mute, and ran formatter
prathi-wind Jun 19, 2025
31b0782
Had extra variables from a merge
prathi-wind Jun 20, 2025
50af227
Ran formatter
prathi-wind Jun 20, 2025
c56b755
Merge remote-tracking branch 'upstream/master' into meta-directive
prathi-wind Jun 20, 2025
c254a6b
Merge remote-tracking branch 'upstream/master' into meta-directive
prathi-wind Jun 20, 2025
7e0eb2e
Merge branch 'master' into meta-directive
sbryngelson Jun 21, 2025
f87d672
Merge branch 'master' into meta-directive
sbryngelson Jun 23, 2025
70c679b
Added gpu nacro docs
prathi-wind Jun 24, 2025
5899492
more gpu macro docs
prathi-wind Jun 24, 2025
df1a27b
Finished up gpu docs
prathi-wind Jun 24, 2025
9036bfd
Reorganized macros into logical groups
prathi-wind Jun 24, 2025
7a8cdc2
Cleaned up docs
prathi-wind Jun 24, 2025
6bc96a8
Fixes render issues with doxygen
prathi-wind Jun 24, 2025
6ac97d7
Merge remote-tracking branch 'upstream/master' into meta-directive
wilfonba Jun 28, 2025
ce2a250
Merge branch 'master' into meta-directive
prathi-wind Jul 2, 2025
f976b66
Added GPU_PARALLEL and replaced rest of acc directives
prathi-wind Jul 2, 2025
2beb457
Ran formatter
prathi-wind Jul 2, 2025
68f876e
Merge branch 'master' into meta-directive
sbryngelson Jul 3, 2025
df54d6f
fix bug
sbryngelson Jul 6, 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
504 changes: 504 additions & 0 deletions docs/documentation/gpuParallelization.md

Large diffs are not rendered by default.

35 changes: 20 additions & 15 deletions src/common/include/macros.fpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#:include 'parallel_macros.fpp'

#:def LOG(expr)
#ifdef MFC_DEBUG
block
Expand All @@ -12,14 +14,16 @@

#:def ALLOCATE(*args)
@:LOG({'@:ALLOCATE(${re.sub(' +', ' ', ', '.join(args))}$)'})
allocate (${', '.join(args)}$)
!$acc enter data create(${', '.join(args)}$)
#:set allocated_variables = ', '.join(args)
allocate (${allocated_variables}$)
$:GPU_ENTER_DATA(create=('[' + allocated_variables + ']'))
#:enddef ALLOCATE

#:def DEALLOCATE(*args)
@:LOG({'@:DEALLOCATE(${re.sub(' +', ' ', ', '.join(args))}$)'})
!$acc exit data delete(${', '.join(args)}$)
deallocate (${', '.join(args)}$)
#:set allocated_variables = ', '.join(args)
$:GPU_EXIT_DATA(delete=('[' + allocated_variables + ']'))
deallocate (${allocated_variables}$)
#:enddef DEALLOCATE

#:def ACC_SETUP_VFs(*args)
Expand All @@ -30,13 +34,13 @@
@:LOG({'@:ACC_SETUP_VFs(${', '.join(args)}$)'})

#:for arg in args
!$acc enter data copyin(${arg}$)
!$acc enter data copyin(${arg}$%vf)
$:GPU_ENTER_DATA(copyin=('[' + arg + ']'))
$:GPU_ENTER_DATA(copyin=('[' + arg + '%vf]'))
if (allocated(${arg}$%vf)) then
do macros_setup_vfs_i = lbound(${arg}$%vf, 1), ubound(${arg}$%vf, 1)
if (associated(${arg}$%vf(macros_setup_vfs_i)%sf)) then
!$acc enter data copyin(${arg}$%vf(macros_setup_vfs_i))
!$acc enter data create(${arg}$%vf(macros_setup_vfs_i)%sf)
$:GPU_ENTER_DATA(copyin=('[' + arg + '%vf(macros_setup_vfs_i)]'))
$:GPU_ENTER_DATA(copyin=('[' + arg + '%vf(macros_setup_vfs_i)%sf]'))
end if
end do
end if
Expand All @@ -52,9 +56,9 @@
@:LOG({'@:ACC_SETUP_SFs(${', '.join(args)}$)'})

#:for arg in args
!$acc enter data copyin(${arg}$)
$:GPU_ENTER_DATA(copyin=('[' + arg + ']'))
if (associated(${arg}$%sf)) then
!$acc enter data create(${arg}$%sf)
$:GPU_ENTER_DATA(copyin=('[' + arg + '%sf]'))
end if
#:endfor
end block
Expand All @@ -68,18 +72,18 @@
@:LOG({'@:ACC_SETUP_source_spatials(${', '.join(args)}$)'})

#:for arg in args
!$acc enter data copyin(${arg}$)
$:GPU_ENTER_DATA(copyin=('[' + arg + ']'))
if (allocated(${arg}$%coord)) then
!$acc enter data create(${arg}$%coord)
$:GPU_ENTER_DATA(copyin=('[' + arg + '%coord]'))
end if
if (allocated(${arg}$%val)) then
!$acc enter data create(${arg}$%val)
$:GPU_ENTER_DATA(copyin=('[' + arg + '%val]'))
end if
if (allocated(${arg}$%angle)) then
!$acc enter data create(${arg}$%angle)
$:GPU_ENTER_DATA(copyin=('[' + arg + '%angle]'))
end if
if (allocated(${arg}$%xyz_to_r_ratios)) then
!$acc enter data create(${arg}$%xyz_to_r_ratios)
$:GPU_ENTER_DATA(copyin=('[' + arg + '%xyz_to_r_ratios]'))
end if
#:endfor
end block
Expand All @@ -102,3 +106,4 @@
//${message or '"No error description."'}$)
end if
#:enddef
! New line at end of file is required for FYPP
Loading
Loading