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

[WIP] Add modifier for affinity package #584

Draft
wants to merge 13 commits into
base: develop
Choose a base branch
from
Draft

Conversation

rfhaque
Copy link
Collaborator

@rfhaque rfhaque commented Jan 31, 2025

Description

[WIP] Adding a modifier that prints thread/core/gpu affinity for an experiment.

  • Replace with: A short description of the change, including motivation and context.
  • Replace with: A list of any dependencies.
  • Replace with: Link(s) to relevant issue(s)
  • Complete the checklist for a relevant section(s) below
  • Delete sections below that are not relevant to this PR

Adding/modifying a system (docs: Adding a System)

  • Add/modify systems/system_name/system.py file
  • Add/modify a dry run unit test for system_name in .github/workflows/run.yml
  • Add/modify systems/all_hardware_descriptions/hardware_name/hardware_description.yaml which will appear in the docs catalogue

Adding/modifying a benchmark (docs: Adding a Benchmark)

  • (optional) If package upstreamed to Spack is insufficient, add/modify repo/benchmark_name/package.py
  • (optional) If application upstreamed to Ramble is insufficient, add/modify repo/benchmark_name/application.py
  • Tags in Ramble's application.py or in repo/benchmark_name/application.py will appear in the docs catalogue
  • Add/modify an experiments/benchmark_name/experiment.py to define a single node and multi-node experiments
  • Add/modify a dry run unit test in .github/workflows/run.yml

Adding/modifying core functionality, CI, or documentation:

  • Update docs
  • Update .github/workflows and .gitlab/ci unit tests (if needed)

@rfhaque rfhaque requested review from nhanford and pearce8 January 31, 2025 03:48
@github-actions github-actions bot added experiment New or modified experiment application labels Jan 31, 2025
@pearce8
Copy link
Collaborator

pearce8 commented Jan 31, 2025

@dyokelson We want to use this modifier to record the affinity. Please let Riyaz know how the data should be output (json format - any more details?) and where the file should be written so that we can inject it into the .cali file.

depends_on("mpi", when="+mpi")
depends_on("hip", when="+rocm")
depends_on("mpi", when="+mpi")
depends_on("mpi", when="+cuda")
Copy link
Collaborator

@pearce8 pearce8 Feb 3, 2025

Choose a reason for hiding this comment

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

line 25 should be:

depends_on("cuda", when="+cuda")

@rfhaque
Copy link
Collaborator Author

rfhaque commented Feb 5, 2025

@dyokelson The modifier can now generate the JSON output. Usage:

bin/benchpark system init --dest=tioga llnl-elcapitan rocm=5.5.1 +gtl compiler=cce
rm -rf saxpy; ../bin/benchpark experiment init --dest saxpy saxpy +rocm~cuda~openmp caliper=mpi affinity=rocm
benchpark setup saxpy tioga <workspace>
ramble setup ...
ramble on ...

The JSON file will be available at {experiment_dir}/affinity.rocm.json

@nhanford @pearce8 I have only tested this on lassen(cuda) and tioga(rocm). We need to test if the modes are output correctly, in particular there seems to be no mpi+openmp mode

Copy link
Collaborator

Choose a reason for hiding this comment

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

@dyokelson please take a look, does this work for injecting into Caliper attributes?

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

Successfully merging this pull request may close these issues.

2 participants