Skip to content

[rocprofiler-systems] Add Fortran MPI CTests#1172

Merged
kcossett-amd merged 21 commits intoROCm:developfrom
kcossett-amd:users/kcossett-amd/fortran-mpi-tests
Nov 27, 2025
Merged

[rocprofiler-systems] Add Fortran MPI CTests#1172
kcossett-amd merged 21 commits intoROCm:developfrom
kcossett-amd:users/kcossett-amd/fortran-mpi-tests

Conversation

@kcossett-amd
Copy link
Contributor

@kcossett-amd kcossett-amd commented Sep 30, 2025

Motivation

Closes 536326

Add CTests that cover Fortran MPI.

Technical Details

Uses a source code files from https://people.math.sc.edu/Burkardt/f_src/mpi/mpi.html

  • intervals.f90

These tests cover MPI_Comm_rank, MPI_Comm_size, MPI_Send, MPI_Recv, MPI_Init along with their profiler variants.

Uses gfortran for these tests. To do so, the containers were updates so that they too would install gfortran.

Test Plan

Added 4 new tests.

Test Result

All tests pass.

REQUIRES #1322

Submission Checklist

@kcossett-amd kcossett-amd force-pushed the users/kcossett-amd/fortran-mpi-tests branch from f34651e to 58a8552 Compare October 2, 2025 10:53
@kcossett-amd
Copy link
Contributor Author

Should not be merged until #1322 is merged and until --main-function argument is removed from test (which will be done once #1322 is merged).

@kcossett-amd kcossett-amd marked this pull request as ready for review October 22, 2025 12:40
@kcossett-amd kcossett-amd requested review from a team and jrmadsen as code owners October 22, 2025 12:40
@kcossett-amd kcossett-amd removed the WIP label Oct 23, 2025
@dgaliffiAMD dgaliffiAMD self-requested a review October 30, 2025 13:48
Copilot AI review requested due to automatic review settings November 26, 2025 16:28
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 Fortran MPI test coverage by introducing a new test case using the intervals.f90 example from an external source. The implementation includes CMake configuration to detect and enable Fortran support when gfortran is available, adds the test infrastructure, and updates Docker containers to include gcc-fortran.

Key changes:

  • Added Fortran MPI test case covering MPI_Init, MPI_Comm_rank, MPI_Comm_size, MPI_Send, and MPI_Recv operations
  • Implemented CMake logic to conditionally enable Fortran tests based on gfortran availability
  • Updated OpenSUSE Docker images to include gcc-fortran package

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
projects/rocprofiler-systems/tests/rocprof-sys-mpi-tests.cmake Adds test configuration for Fortran MPI example with environment variables and regex validation
projects/rocprofiler-systems/examples/mpi/intervals_mpi.f90 New Fortran source file implementing parallel integration using MPI
projects/rocprofiler-systems/examples/mpi/CMakeLists.txt Adds gfortran detection, version checking, and Fortran MPI target configuration
projects/rocprofiler-systems/docker/Dockerfile.opensuse.ci Adds gcc-fortran to CI container dependencies
projects/rocprofiler-systems/docker/Dockerfile.opensuse Adds gcc-fortran to base container dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kcossett-amd
Copy link
Contributor Author

/AzurePipelines run rocm-ci-caller

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kcossett-amd kcossett-amd merged commit 63713f0 into ROCm:develop Nov 27, 2025
89 of 129 checks passed
@kcossett-amd kcossett-amd deleted the users/kcossett-amd/fortran-mpi-tests branch November 27, 2025 15:32
systems-assistant bot pushed a commit to ROCm/rocprofiler-systems that referenced this pull request Nov 27, 2025
* Add MPI CTests (use gfortran)

* Add proper regex check

* Skip Runtime-Instrument due to incompatibility with MPI

Co-authored-by: Copilot <[email protected]>
[rocm-systems] ROCm/rocm-systems#1172 (commit 63713f0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants