RFE: UPCXX_FREEZE environment variable

Issue #592 new
Paul Hargrove created an issue

Currently, we document (in docs/debugging.md) use of GASNET_FREEZE to request that UPC++ processes stop to await debugger attach. This issue is a request for a UPCXX_FREEZE environment variable which would cause upcxx::init() to pause very late (possibly as the last thing before return) for debugger attach. There are at least three motivations for this:

  1. This entire proposal grew out of discussions surrounding issue #591, which we noted would never have occurred if debugger attach occurred later than primary segment validation.
  2. The current "attach point" relatively early in GASNet initialization leaves a signficant amount of GASNet and UPC++ runtime code the user must somehow step over before reaching their own code. Attaching instead at (or near) the end of upcxx::init() could (if implemented within init itself) reduce this to a single finish command in gdb.
  3. There is precedent in the Berkeley UPC project which provided a distinct UPC_FREEZE environment variable for this purpose. At least point 2 was a motivating consideration in that design.

Comments (2)

  1. Dan Bonachea

    I suggest we adopt a similar UI to Berkeley UPC UPC_FREEZE, specifically define that the argument to UPCXX_FREEZE can be used to freeze selected processes. So for example UPCXX_FREEZE=1 would mean freeze only process 1 and UPCXX_FREEZE=0,4,6-9 would freeze the selected processes. We should also have a syntax for "freeze them all", perhaps UPCXX_FREEZE=* or UPCXX_FREEZE=-

  2. Log in to comment