mfu_init: use of mfu_rank
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 200
- Forks
- 85
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 2
Description
I happened to glance over the implementation for mfu_init:
https://github.com/hpc/mpifileutils/blob/66c5273035396c34998c32e9d7918bce9aeca58f/src/common/mfu_util.c#L202-L213
I notice it sets mfu_rank, which is a global declared in mfu_util.h. But the use of mfu_rank doesn't seem to be very widespread. In fact it seems that the code base utilizes MPI_Comm_rank directly more often than it utilizes mfu_rank, which seemingly would be available as long as mfu_init was called.
I haven't specifically checked on every occurrence of MPI_Comm_rank to see if the corresponding code could be replaced with mfu_rank, but what is the intention here? I.e. is it intended that the code base should be using mfu_rank as much as possible? There are also a handful (at least) of functions that pass rank as a parameter, so mfu_rank could also simplify that.
If anything, I would personally like to use mfu_rank in my own contributions to avoid propagating the inconsistencies, if that's what it is.
@adammoody @gonsie Any comments, preferences here?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with mfu_init in src/common/mfu_util.c and the mfu_rank declaration in mfu_util.h. Search the codebase for mfu_rank, MPI_Comm_rank, and functions accepting rank parameters to understand the existing patterns. Done requires maintainer agreement on the intended convention and a defined scope for any consistency changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- distributed-systems, hpc
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100