[Chapel Merge] Add warnings for misuse of Comm/Gpu Diagnostics

Branch: refs/heads/main
Revision: d99457c50023ffbe3785cf1019640230b8359e05
Author: jabraham17
Link: Add warnings for misuse of Comm/Gpu Diagnostics by jabraham17 · Pull Request #23948 · chapel-lang/chapel · GitHub
Log Message:
Add warnings for misuse of Comm/Gpu Diagnostics (#23948)

Adds warnings for misused of CommDiagnostics and GpuDiagnostics.

In summary. the new warning will do the following:

  • warns for calling start* after already calling start*
  • warns for calling stop* if there was no previous start*

Also fixed an issue in
test/gpu/native/examples/releaseNotes/tasks/taskParLoop.chpl, caught
by the new warnings.


  • local testing of new tests with COMM=none, COMM=gasnet
    • tested cpu and gpu with cpu-as-device
  • paratest with comm none
  • paratest with comm gasnet
  • paratest nvidia

[Reviewed by @e-kayrakli]

closes `GpuDiagnostics` does not warn when incompatible calls · Issue #23625 · chapel-lang/chapel · GitHub

Compare: Comparing 1d9fc08cbf9c89514a0424da055cfdf4a2eb8bad...9da4153e684c55f26563d31ef8bbe936ca07b70a · chapel-lang/chapel · GitHub

M modules/standard/CommDiagnostics.chpl
M modules/standard/GpuDiagnostics.chpl
M runtime/include/chpl-comm-diags.h
M runtime/include/chpl-gpu-diags.h
M runtime/src/chpl-comm-diags.c
M runtime/src/chpl-gpu-diags.c
M test/gpu/native/examples/releaseNotes/tasks/taskParLoop.chpl
A test/gpu/native/gpuDiagnosticsWarnings.chpl
A test/gpu/native/gpuDiagnosticsWarnings.good
A test/library/standard/CommDiagnostics/commDiagnosticsWarnings.chpl
A test/library/standard/CommDiagnostics/commDiagnosticsWarnings.comm-none.good
A test/library/standard/CommDiagnostics/commDiagnosticsWarnings.good
A test/library/standard/CommDiagnostics/commDiagnosticsWarnings.numlocales
A test/library/standard/CommDiagnostics/commDiagnosticsWarnings.prediff