Minor mpi fixes with MUST
Had a go with the MUST tool on swift. It pointed out two minor issues (running SmallCosmoVolume_hydro)
- we pass
MPI_INFO_NULL
as an argument forMPI_Info info
. Then we try to write into that usingMPI_Info_Set(&info)
. Apparently that's illegal, becauseMPI_INFO_NULL
is supposed to beconst
, I've been told, but I couldn't find that documented in the MPI standard (https://www.mpi-forum.org/docs/mpi-4.1/mpi41-report.pdf) - the
MPI_Type lospart_mpi_type
is declared and freed, but never committed. I (andgrep
) don't see it used anywhere aside from the declaration and freeing. It's been a while since I wrote MPI stuff myself, but I'm pretty sure MPI would complain if you're trying to use a type that isn't committed. So I believe if the type were indeed used, we should have noticed. But I wouldn't bet money on that.