Skip to content

Safe if rank==0 execution mode #1008

@manopapad

Description

@manopapad

In control-replicated execution mode, there are legitimate cases where we want to perform a computation on only one copy of the top-level program, e.g. writing out to a log file, or making a database operation.

A check like if get_rank() == 0: is unfortunately unsafe, because it leaves the door open to doing some operation that ends up launching Legion work (e.g. printing out a cuPyNumeric ndarray triggers an inline mapping), which is a violation of the control replication model.

We could perhaps provide this through something like an execution scope, that raises an exception if an unsafe operation is launched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions