@@ -28,17 +28,18 @@ Copilot, when reviewing:
2828
2929## 3 Style & Naming Conventions (* .fpp / * .f90)
3030
31- Element Rule
32- Indentation 2 spaces; continuation lines align beneath &.
33- Case Lower-case keywords & intrinsics (do, end subroutine, …).
34- Modules m_ <feature > (e.g. m_transport).
35- Public subroutines s_ <verb >_ <noun > (s_compute_flux).
36- Public functions f_ <verb >_ <noun >.
37- Routine size subroutine ≤ 500 lines, helper ≤ 150, function ≤ 100, file ≤ 1000.
38- Arguments ≤ 6; else use a derived-type params struct.
39- Forbidden goto (except legacy), COMMON, save globals.
40- Variables Every arg has explicit intent; use dimension/allocatable/pointer as appropriate.
41- Errors Call s_mpi_abort(<msg >), never stop or error stop.
31+ | Element | Rule |
32+ | ---------| ------|
33+ | Indentation | 2 spaces; continuation lines align beneath &. |
34+ | Case | Lower-case keywords & intrinsics (do, end subroutine, …). |
35+ | Modules | m_ <feature > (e.g. m_transport). |
36+ | Public subroutines | s_ <verb >_ <noun > (s_compute_flux). |
37+ | Public functions | f_ <verb >_ <noun >. |
38+ | Routine size | subroutine ≤ 500 lines, helper ≤ 150, function ≤ 100, file ≤ 1000. |
39+ | Arguments | ≤ 6; else use a derived-type params struct. |
40+ | Forbidden | goto (except legacy), COMMON, save globals. |
41+ | Variables | Every arg has explicit intent; use dimension/allocatable/pointer as appropriate. |
42+ | Errors | Call s_mpi_abort(<msg >), never stop or error stop. |
4243
4344Copilot, when reviewing:
4445* Flag violations of any cell above.
@@ -51,18 +52,15 @@ Copilot, when reviewing:
5152
5253Wrap tight loops:
5354
55+ ``` fortran
5456!$acc parallel loop gang vector default(present) reduction(...)
57+ ```
5558
56- * Add collapse(n) when safe.
57- * Declare loop-local variables with private(...).
58- * Allocate large arrays with managed or move them into a persistent !$acc enter data region at start-up.
59- * Avoid stop/error stop inside device code.
60- * Code must compile with Cray ftn, NVIDIA nvfortran, GNU gfortran, and Intel ifx/ifort.
61-
62- Copilot, when reviewing:
63- * Verify directives and data-movement are correct.
64- * Point out host-device violations, missing private, or illegal stops.
65- * Check that helper routines called from accelerated regions include !$acc routine seq.
59+ * Add collapse(n) when safe.
60+ * Declare loop-local variables with private(...).
61+ * Allocate large arrays with managed or move them into a persistent !$acc enter data region at start-up.
62+ * Avoid stop/error stop inside device code.
63+ * Code must compile with Cray ftn, NVIDIA nvfortran, GNU gfortran, and Intel ifx/ifort.
6664
6765---
6866
0 commit comments