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.
This commit is contained in:
		@@ -296,6 +296,15 @@ class Gromacs(CMakePackage, CudaPackage):
 | 
				
			|||||||
        + "The g++ location is written to icp{c,x}.cfg",
 | 
					        + "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("fftw-api@3")
 | 
				
			||||||
    depends_on("cmake@2.8.8:3", type="build")
 | 
					    depends_on("cmake@2.8.8:3", type="build")
 | 
				
			||||||
    depends_on("cmake@3.4.3:3", type="build", when="@2018:")
 | 
					    depends_on("cmake@3.4.3:3", type="build", when="@2018:")
 | 
				
			||||||
@@ -614,6 +623,13 @@ def cmake_args(self):
 | 
				
			|||||||
            options.append("-DGMX_GPU_NB_CLUSTER_SIZE=8")
 | 
					            options.append("-DGMX_GPU_NB_CLUSTER_SIZE=8")
 | 
				
			||||||
            options.append("-DGMX_GPU_NB_NUM_CLUSTER_PER_CELL_X=1")
 | 
					            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"):
 | 
					        if self.spec.satisfies("~nblib"):
 | 
				
			||||||
            options.append("-DGMX_INSTALL_NBLIB_API=OFF")
 | 
					            options.append("-DGMX_INSTALL_NBLIB_API=OFF")
 | 
				
			||||||
        if self.spec.satisfies("~gmxapi"):
 | 
					        if self.spec.satisfies("~gmxapi"):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user