Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add region probe infrastructure #159

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

devreal
Copy link
Contributor

@devreal devreal commented Sep 16, 2021

The region probes are divided into three levels:

  • User probes: defined by the user using ttg::user_probe; compile with -DTTG_ENABLE_USER_PROBES=1 to enable.
  • Task probes: task execution instrumentation using names provided to ttg::Op; compile with -DTTG_ENABLE_TASK_PROBES=1 to enable.
  • Internal probes: all the gory runtime-internal details; compile with -DTTG_ENABLE_INTERNAL_PROBES=1 to enable.

At the moment, the latter two are only available in the PaRSEC backend.
User probes can be defined any time and work with any backend that uses PaRSEC.

To enable tracing in PaRSEC, users have to export the following two
environment variables:

  • PARSEC_MCA_mca_pins=task_profiler
  • PARSEC_MCA_profile_filename= (files must not exist)

Note that in the wake of the instrumentation, I also encapsulated some code snippets to avoid (and reducing existing) code duplication.

Signed-off-by: Joseph Schuchart [email protected]

The region probes are divided in three levels:
- User probes: defined by the user using ttg::user_probe; compile with -DTTG_ENABLE_USER_PROBES=1 to enable.
- Task probes: task execution instrumentation using names provided to ttg::Op; compile with -DTTG_ENABLE_TASK_PROBES=1 to enable.
- Internal probes: all the gory runtime-internal details; compile with -DTTG_ENABLE_INTERNAL_PROBES=1 to enable.

At the moment, the latter two are only available in the PaRSEC backend.
User probes can be defined any time and work with any backend that uses PaRSEC.

To enable tracing in PaRSEC, users have to export the following two
environment variables:
- PARSEC_MCA_mca_pins=task_profiler
- PARSEC_MCA_profile_filename=<filename> (files must not exist)

Signed-off-by: Joseph Schuchart <[email protected]>
An example use case is the size of an active message sent.

Signed-off-by: Joseph Schuchart <[email protected]>
#include <vector>
#include <cassert>

#include <parsec/profiling.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be protected by ifdefs to avoid having to introduce dependence of ttg target on parsec targets. Alternatively we can make parsec a hard dependence of TTG, but that may be undesirable long term.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have a HAVE_PARSEC preprocessor flag right now and both the madness and parsec backends provide access to the parsec header/libs. If we create a backend that does not depend on PaRSEC we'll have to revisit that.

@therault
Copy link
Contributor

There are three things in this PR:

  • new framework to log/profile internal state of the PaRSEC backend
  • Use of this framework to define some internal events in the PaRSEC backend
  • some refactoring of the code to simplify logging

We may want to split this PR in parts, and integrate part 2 and 3.

Part 1 (new framework) could be provided by PINS in PaRSEC; or the new framework is simpler. We have not decided on that yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants