Skip to content

Commit

Permalink
gromacs: add itt variant (spack#47764)
Browse files Browse the repository at this point in the history
Permit configuring GROMACS with support for mdrun to trace its timing
regions by calling the ITT API. This permits tools like VTune and
unitrace to augment their analysis with GROMACS-specific annotation.
  • Loading branch information
mabraham authored Nov 25, 2024
1 parent 3c220d0 commit 8e91430
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions var/spack/repos/builtin/packages/gromacs/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,15 @@ class Gromacs(CMakePackage, CudaPackage):
+ "The g++ location is written to icp{c,x}.cfg",
)

variant(
"itt",
default=False,
when="@2024:",
description="Enable Instrumentation and Tracing Technology (ITT)"
+ " profiling API (from Intel)",
)
depends_on("intel-oneapi-vtune", "+itt")

depends_on("fftw-api@3")
depends_on("[email protected]:3", type="build")
depends_on("[email protected]:3", type="build", when="@2018:")
Expand Down Expand Up @@ -614,6 +623,13 @@ def cmake_args(self):
options.append("-DGMX_GPU_NB_CLUSTER_SIZE=8")
options.append("-DGMX_GPU_NB_NUM_CLUSTER_PER_CELL_X=1")

if "+itt" in self.spec:
options.append("-DGMX_USE_ITT=on")
options.append(
"-DITTNOTIFY_INCLUDE_DIR=%s"
% join_path(self.spec["intel-oneapi-vtune"].package.headers)
)

if self.spec.satisfies("~nblib"):
options.append("-DGMX_INSTALL_NBLIB_API=OFF")
if self.spec.satisfies("~gmxapi"):
Expand Down

0 comments on commit 8e91430

Please sign in to comment.