Skip to content

Commit

Permalink
Merge branch 'develop' into experiment/kripke
Browse files Browse the repository at this point in the history
  • Loading branch information
pearce8 authored Apr 17, 2024
2 parents 9b283d6 + cc7e69e commit fd482d1
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# SPDX-License-Identifier: Apache-2.0

packages:
papi:
externals:
- spec: [email protected]
prefix: /usr/tce/packages/papi/papi-6.0.0.1
buildable: false
tar:
externals:
- spec: [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# SPDX-License-Identifier: Apache-2.0

packages:
papi:
externals:
- spec: [email protected]
prefix: /usr/tce/packages/papi/papi-6.0.0.1
buildable: false
tar:
externals:
- spec: [email protected]
Expand All @@ -27,6 +32,11 @@ packages:
externals:
- spec: [email protected]
prefix: /usr
python:
externals:
- spec: [email protected]
prefix: /usr/tce/packages/python/python-3.9.12/
buildable: false
mpi:
buildable: false
mvapich2:
Expand Down
18 changes: 18 additions & 0 deletions modifiers/caliper-cuda/configs/modifier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2023 Lawrence Livermore National Security, LLC and other
# Benchpark Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: Apache-2.0

variables:
modifier_package_name: 'caliper-cuda'
modifier_spack_variant: '+caliper'

modifiers:
- name: caliper-cuda
mode: cuda

spack:
packages:
caliper-cuda:
spack_spec: caliper+adiak+mpi~libunwind~libdw~papi+cuda cuda_arch=={cuda_arch}

27 changes: 27 additions & 0 deletions modifiers/caliper-cuda/modifier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2023 Lawrence Livermore National Security, LLC and other
# Benchpark Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: Apache-2.0

from ramble.modkit import *
from ramble.mod.benchpark.caliper import Caliper as CaliperBase


class CaliperCuda(CaliperBase):
"""Define a modifier for Caliper"""

name = "caliper-cuda"

mode(
"cuda",
description="Profile CUDA API functions",
)

_cali_datafile = CaliperBase._cali_datafile

env_var_modification(
"CALI_CONFIG",
"spot(output={}, profile.cuda)".format(_cali_datafile),
method="set",
modes=["cuda"],
)
18 changes: 18 additions & 0 deletions modifiers/caliper-topdown/configs/modifier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2023 Lawrence Livermore National Security, LLC and other
# Benchpark Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: Apache-2.0

variables:
modifier_package_name: 'caliper-topdown'
modifier_spack_variant: '+caliper'

modifiers:
- name: caliper-topdown
mode: topdown-all

spack:
packages:
caliper-topdown:
spack_spec: caliper+adiak+mpi~libunwind~libdw+papi

57 changes: 57 additions & 0 deletions modifiers/caliper-topdown/modifier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright 2023 Lawrence Livermore National Security, LLC and other
# Benchpark Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: Apache-2.0

from ramble.modkit import *
from ramble.mod.benchpark.caliper import Caliper as CaliperBase


class CaliperTopdown(CaliperBase):
"""Define a modifier for Caliper"""

name = "caliper-topdown"

mode(
"topdown-counters-all",
description="Raw counter values for Intel top-down analysis (all levels)",
)
mode(
"topdown-counters-toplevel",
description="Raw counter values for Intel top-down analysis (top level)",
)
mode(
"topdown-all",
description="Top-down analysis for Intel CPUs (all levels)",
)
mode(
"topdown-toplevel",
description="Top-down analysis for Intel CPUs (top level)",
)

_cali_datafile = CaliperBase._cali_datafile

env_var_modification(
"CALI_CONFIG",
"spot(output={}, topdown-counters.all)".format(_cali_datafile),
method="set",
modes=["topdown-counters-all"],
)
env_var_modification(
"CALI_CONFIG",
"spot(output={}, topdown-counters.toplevel)".format(_cali_datafile),
method="set",
modes=["topdown-counters-toplevel"],
)
env_var_modification(
"CALI_CONFIG",
"spot(output={}, topdown.all)".format(_cali_datafile),
method="set",
modes=["topdown-all"],
)
env_var_modification(
"CALI_CONFIG",
"spot(output={}, topdown.toplevel)".format(_cali_datafile),
method="set",
modes=["topdown-toplevel"],
)

0 comments on commit fd482d1

Please sign in to comment.