Copy MPI_Comm passed to AMGX_resources_create()
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 692
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
AMGX_resources_create() takes a void* comm and calls the constructor of Resources, which copies
the pointer to a member variable
MPI_Comm *m_mpi_comm;
This prevents the caller from passing a temporary MPI_Comm to AMGX_resources_create(). An alternative is to store a copy of the communicator in:
MPI_Comm m_mpi_comm;
Is there a reason to store the pointer instead?
Contributor guide
No contributing guide indexed for this repository
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 in base/src/resources.cu at the Resources constructor and the AMGX_resources_create() entry point, then trace how m_mpi_comm is used after construction. Determine whether storing an MPI_Comm value preserves the expected behavior and allows temporary communicators; done means the ownership and lifetime behavior is clear and covered by the relevant existing tests, if any.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100