Skip to content

Get rid of MPI compilation warnings#256

Merged
astrofrog merged 1 commit into
hyperion-rt:mainfrom
astrofrog:mpi-interface-warnings
Jul 22, 2026
Merged

Get rid of MPI compilation warnings#256
astrofrog merged 1 commit into
hyperion-rt:mainfrom
astrofrog:mpi-interface-warnings

Conversation

@astrofrog

Copy link
Copy Markdown
Contributor

These warnings appear during compilation:

Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
src/mpi/mpi_io.f90:781:19:

  781 |     call mpi_bcast(array, n1*n2, mpi_integer4, rank_main, mpi_comm_world, ierr)
      |                   1
......
 1604 |     call mpi_bcast(n1, 1, mpi_integer4, rank_main, mpi_comm_world, ierr)
      |                   2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-2)
src/mpi/mpi_io.f90:764:19:

  764 |     call mpi_bcast(array, n1, mpi_integer4, rank_main, mpi_comm_world, ierr)
      |                   1
......
 1604 |     call mpi_bcast(n1, 1, mpi_integer4, rank_main, mpi_comm_world, ierr)
      |                   2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
src/mpi/mpi_io.f90:735:19:

We fix this by defining an explicit interface for these subroutines.

…outines that take choice buffers so that gfortran no longer warns about type and rank mismatches between calls
@astrofrog
astrofrog merged commit eeae847 into hyperion-rt:main Jul 22, 2026
22 checks passed
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.

1 participant