Deploy mechanisms for additional codemodes

Issue #570 new
Dan Bonachea created an issue

As discussed in the 2022-11-01 meeting, we see a general requirement to eventually expand the set of UPC++ codemodes (ie UPCXX_CODEMODE aka upcxx -codemode=) beyond the current debug vs opt boolean. We currently envision this eventually including modes (with names TBD) such as:

  1. Optimization with profiling support: for performance analysis. This probably includes full compiler optimization, but additionally debug symbol tables (-g), GASNet stats/trace and possibly future profiling hooks.
  2. Optimization with assertions: for triaging correctness problems in application code that runs unacceptably slowly without compiler optimization. This probably includes full compiler optimization (at least for the application code), but additionally UPC++/GASNet-level assertions (to find defects) and debug symbol tables (to provide more useful crash stacks).
  3. Possibly other codemodes TBD.

There are a number of design and engineering details that will need to be ironed out for this generalization, including:

  1. How do we define and uniquely name each of the new codemodes?
  2. Is there always a 1-1 mapping between codemode and libupcxx/libgasnet build/installs?
  3. Are some of the code modes optional, and if so, how does a user select which to build/install, what is the default, and how do we ensure a consistent end-user experience?
  4. What adjustments (if any) should be made to the upcxx logic that infers codemode based on other arguments in the absence of an explicit codemode?
  5. How do we adjust the implementation-defined UPCXX_CODEMODE preprocessor macro, which is currently designed as a boolean?
  6. What other parts of the build infrastructure and/or library code assume that codemode is a binary decision that needs to be updated?
  7. How do we best document the new codemode options, without diluting the emphasis on the current/common codemodes and the importance of users making an appropriate choice?

This issue is not intended for immediate action, but rather to start requirements discussion and gather together design bits we'll eventually need.

Comments (0)

  1. Log in to comment