Skip to content

Commit

Permalink
scorep: Change in configuration option for nvhpc compiler (spack#39919)
Browse files Browse the repository at this point in the history
* scorep version 8.1 added
* configure finds cudart and cupti in the nvhpcsdk suite
* style fixed
* changes to find libcuda.so in cuda directory

---------

Co-authored-by: Laura Bellentani <lbellen1@login01.leonardo.local>
  • Loading branch information
bellenlau and Laura Bellentani authored Sep 13, 2023
1 parent 5a91802 commit eee8fdc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion var/spack/repos/builtin/packages/scorep/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Scorep(AutotoolsPackage):
url = "https://perftools.pages.jsc.fz-juelich.de/cicd/scorep/tags/scorep-7.1/scorep-7.1.tar.gz"
maintainers("wrwilliams")

version("8.1", sha256="3a40b481fce610871ddf6bdfb88a6d06b9e5eb38c6080faac6d5e44990060a37")
version("8.0", sha256="4c0f34f20999f92ebe6ca1ff706d0846b8ce6cd537ffbedb49dfaef0faa66311")
version("7.1", sha256="98dea497982001fb82da3429ca55669b2917a0858c71abe2cfe7cd113381f1f7")
version("7.0", sha256="68f24a68eb6f94eaecf500e17448f566031946deab74f2cba072ee8368af0996")
Expand Down Expand Up @@ -139,6 +140,12 @@ def url_for_version(self, version):
# https://github.com/spack/spack/issues/1609
conflicts("platform=darwin")

def find_libpath(self, libname, root):
libs = find_libraries(libname, root, shared=True, recursive=True)
if len(libs.directories) == 0:
return None
return libs.directories[0]

def configure_args(self):
spec = self.spec

Expand Down Expand Up @@ -168,7 +175,9 @@ def configure_args(self):
if "+unwind" in spec:
config_args.append("--with-libunwind=%s" % spec["libunwind"].prefix)
if "+cuda" in spec:
config_args.append("--with-libcuda=%s" % spec["cuda"].prefix)
config_args.append("--with-libcudart=%s" % spec["cuda"].prefix)
cuda_driver_path = self.find_libpath("libcuda", spec["cuda"].prefix)
config_args.append("--with-libcuda-lib=%s" % cuda_driver_path)
if "+hip" in spec:
config_args.append("--with-rocm=%s" % spec["hip"].prefix)

Expand Down

0 comments on commit eee8fdc

Please sign in to comment.