Skip to content

Conversation

@sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Nov 4, 2025

User description

Resolved fortitude lint errors:

  • [C061] Added intent(inout) to q_prim_vf and bc_type in s_apply_boundary_patches() (m_boundary_conditions.fpp:233-234)

This fixes pre-existing lint violations that were preventing documentation-only PRs from passing CI checks.

Description

Please include a summary of the changes and the related issue(s) if they exist.
Please also include relevant motivation and context.

Fixes #(issue) [optional]

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Something else

Scope

  • This PR comprises a set of related changes with a common goal

If you cannot check the above box, please split your PR into multiple PRs that each have a common goal.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • What computers and compilers did you use to test this:

Checklist

  • I have added comments for the new code
  • I added Doxygen docstrings to the new code
  • I have made corresponding changes to the documentation (docs/)
  • I have added regression tests to the test suite so that people can verify in the future that the feature is behaving as expected
  • I have added example cases in examples/ that demonstrate my new feature performing as expected.
    They run to completion and demonstrate "interesting physics"
  • I ran ./mfc.sh format before committing my code
  • New and existing tests pass locally with my changes, including with GPU capability enabled (both NVIDIA hardware with NVHPC compilers and AMD hardware with CRAY compilers) and disabled
  • This PR does not introduce any repeated code (it follows the DRY principle)
  • I cannot think of a way to condense this code and reduce any introduced additional line count

If your code changes any code source files (anything in src/simulation)

To make sure the code is performing as expected on GPU devices, I have:

  • Checked that the code compiles using NVHPC compilers
  • Checked that the code compiles using CRAY compilers
  • Ran the code on either V100, A100, or H100 GPUs and ensured the new feature performed as expected (the GPU results match the CPU results)
  • Ran the code on MI200+ GPUs and ensure the new features performed as expected (the GPU results match the CPU results)
  • Enclosed the new feature via nvtx ranges so that they can be identified in profiles
  • Ran a Nsight Systems profile using ./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR
  • Ran a Rocprof Systems profile using ./mfc.sh run XXXX --gpu -t simulation --rsys --hip-trace, and have attached the output file and plain text results to this PR.
  • Ran my code using various numbers of different GPUs (1, 2, and 8, for example) in parallel and made sure that the results scale similarly to what happens if you run without the new code/feature

PR Type

Bug fix


Description

  • Added missing intent(inout) attributes to subroutine arguments

  • Resolves Fortitude lint error [C061] in s_apply_boundary_patches()

  • Updated typos configuration with "Sur" exception


Diagram Walkthrough

flowchart LR
  A["Fortitude Lint Errors"] -->|"[C061] Missing intent"| B["s_apply_boundary_patches()"]
  B -->|"Add intent inout"| C["q_prim_vf parameter"]
  B -->|"Add intent inout"| D["bc_type parameter"]
  E["Typos Configuration"] -->|"Add exception"| F["Sur keyword"]
Loading

File Walkthrough

Relevant files
Bug fix
m_boundary_conditions.fpp
Add intent attributes to subroutine parameters                     

src/pre_process/m_boundary_conditions.fpp

  • Added intent(inout) attribute to q_prim_vf parameter in
    s_apply_boundary_patches() subroutine
  • Added intent(inout) attribute to bc_type parameter in
    s_apply_boundary_patches() subroutine
  • Resolves Fortitude lint error [C061] for missing intent declarations
+2/-2     
Configuration changes
.typos.toml
Add Sur to typos exceptions                                                           

.typos.toml

  • Added "Sur" as a recognized spelling exception in typos configuration
  • Prevents false positives in spell-checking for this term
+1/-0     

Resolved fortitude lint errors:
- [C061] Added intent(inout) to q_prim_vf and bc_type in
  s_apply_boundary_patches() (m_boundary_conditions.fpp:233-234)

This fixes pre-existing lint violations that were preventing
documentation-only PRs from passing CI checks.
Copilot AI review requested due to automatic review settings November 4, 2025 17:44
@sbryngelson sbryngelson requested a review from a team as a code owner November 4, 2025 17:44
@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Nov 4, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Nov 4, 2025

PR Code Suggestions ✨

No code suggestions found for the PR.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds explicit intent(inout) declarations to the arguments of the s_apply_boundary_patches subroutine and adds "Sur" to the typo checker whitelist.

  • Adds explicit intent(inout) to two arguments of s_apply_boundary_patches to comply with Fortran coding standards
  • Whitelists "Sur" in .typos.toml to prevent false-positive spell-check warnings

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/pre_process/m_boundary_conditions.fpp Adds explicit intent(inout) declarations to q_prim_vf and bc_type parameters in s_apply_boundary_patches
.typos.toml Whitelists the word "Sur" to prevent typo checker from flagging it as a misspelling


type(scalar_field), dimension(sys_size) :: q_prim_vf
type(integer_field), dimension(1:num_dims, -1:1) :: bc_type
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter q_prim_vf is declared with intent(inout) but is never used or modified in the subroutine body. Based on the subroutine implementation (lines 237-261), only bc_type is passed to helper subroutines (s_circle_bc, s_rectangle_bc, s_line_segment_bc). This parameter should be declared with intent(in) instead, or removed entirely if not needed.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.02%. Comparing base (bfd732c) to head (f50c642).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1023   +/-   ##
=======================================
  Coverage   46.02%   46.02%           
=======================================
  Files          67       67           
  Lines       13437    13437           
  Branches     1550     1550           
=======================================
  Hits         6185     6185           
  Misses       6362     6362           
  Partials      890      890           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant