- edited description
dist_object destructor should be permitted after finalize
Currently the spec for ~dist_object()
requires "Calling thread must have the master persona." and does not grant any exceptions for invocation after library finalization.
However, there are many places in our current tests (and probably user code as well) where we assume a dist_object<T>
allocated on the stack in main()
can be destroyed by return-from-main after upcxx::finalize()
, but by the current spec this is prohibited.
team
and atomic_domain
destructors have explicit exceptions to allow simple destruction post-finalize. Unlike team
and atomic_domain
, dist_object
does not have a destroy()
, but it's still a collective object and I believe the same logic applies here. If anything the lack of a destroy()
call makes it more annoying to satisfy the over-constrained requirements.
I think the solution is the spec for ~dist_object()
should be loosened in ways analogous to the destructors for team
and atomic_domain
- namely, exclude the master persona precondition if the library was uninitialized since object construction, and apply the standard exception text to allow invocation outside finalize.
Comments (4)
-
reporter -
reporter Proposed solution in pull request #45
-
reporter - changed status to resolved
Fix issue
#161: Allow ~dist_object() after finalize→ <<cset 840bad26a46e>>
-
reporter Merge pull request #45
- issue160-1:
Fix issue
#161: Allow ~dist_object() after finalize issue#160: upgrade atomic_domain/cuda_Device constructors to progress: user Clarify that collectives with progress=none never synchronize
→ <<cset 30e600bb1252>>
- issue160-1:
Fix issue
- Log in to comment