summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Abraham <Mark.J.Abraham@gmail.com>2024-11-25 16:12:55 +0100
committerGitHub <noreply@github.com>2024-11-25 16:12:55 +0100
commit8e914308f056e876a98aff55988cde3d477dd0e9 (patch)
treeacf4f93703fb9bdd4eaa65903e0478c9ab2ead5f
parent3c220d098954af581a0ff0dfa2024b9142f64340 (diff)
downloadspack-8e914308f056e876a98aff55988cde3d477dd0e9.tar.gz
spack-8e914308f056e876a98aff55988cde3d477dd0e9.tar.bz2
spack-8e914308f056e876a98aff55988cde3d477dd0e9.tar.xz
spack-8e914308f056e876a98aff55988cde3d477dd0e9.zip
gromacs: add itt variant (#47764)
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.
-rw-r--r--var/spack/repos/builtin/packages/gromacs/package.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py
index 90d1766118..486c36af8e 100644
--- a/var/spack/repos/builtin/packages/gromacs/package.py
+++ b/var/spack/repos/builtin/packages/gromacs/package.py
@@ -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("cmake@2.8.8:3", type="build")
depends_on("cmake@3.4.3:3", type="build", when="@2018:")
@@ -614,6 +623,13 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder):
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"):