Skip to content

MPI Fortran push-pop count fix for extra MAIN subroutine#1145

Closed
sputhala-amd wants to merge 1 commit intodevelopfrom
users/sputhala/mpiPushPopCountFix
Closed

MPI Fortran push-pop count fix for extra MAIN subroutine#1145
sputhala-amd wants to merge 1 commit intodevelopfrom
users/sputhala/mpiPushPopCountFix

Conversation

@sputhala-amd
Copy link
Contributor

Motivation

Fix the CI failure for MPI Fortran tests due to MAIN subroutine not getting popped from tracing

Technical Details

Fix CI assert failure by ensuring extra Fortran MAIN subroutine is popped correctly, preventing push/pop trace count mismatch.
The failure was happening when built with ROCPROFSYS_USE_MPI=ON and not with ROCPROFSYS_USE_MPI_HEADERS=ON. If the finalization call is preceded with an additional pop trace for MPI_Finalize/PMPI_Finalize then the MAIN is popped correctly for the full MPI case with ROCPROFSYS_USE_MPI=ON..

Test Plan

Manual tests were performed with the fix.

Test Result

The testing confirms the fix works.

Submission Checklist

@dgaliffiAMD
Copy link
Contributor

Are there additional Fortran tests that we should enable after your fix?

@sputhala-amd sputhala-amd marked this pull request as draft September 29, 2025 14:41
@sputhala-amd sputhala-amd force-pushed the users/sputhala/mpiPushPopCountFix branch from c00995d to 64dac08 Compare September 29, 2025 17:16
@sputhala-amd
Copy link
Contributor Author

sputhala-amd commented Sep 29, 2025

  1. Add MPI_Finalize/PMPI_Finalize in the traces.
  2. Check for Fortran additional subroutines during finalization and pop the count for trace explicitly as we do for main executable.

[The instrumentation bundle for the main binary and the additional main subroutine (in case of Fortran) are created during library startup inside dl.cpp, these will be popped from the trace later during finalization.]

image

@sputhala-amd sputhala-amd force-pushed the users/sputhala/mpiPushPopCountFix branch from 64dac08 to 6dd0031 Compare September 29, 2025 17:28
@sputhala-amd
Copy link
Contributor Author

Are there additional Fortran tests that we should enable after your fix?

@dgaliffiAMD , Kian has a branch with the MPI Fortran specific tests #349. I have requested Kian to test with this fix and confirm.

@kcossett-amd
Copy link
Contributor

See #1172 for ctests (labelled mpi-fortran)

@sputhala-amd
Copy link
Contributor Author

This Fix is not needed as another PR fixes this issue.

@sputhala-amd sputhala-amd deleted the users/sputhala/mpiPushPopCountFix branch November 11, 2025 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants