summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Pritchard <howardp@lanl.gov>2022-10-18 11:18:04 -0600
committerGitHub <noreply@github.com>2022-10-18 11:18:04 -0600
commitd95f14084ea438185e35e9ce0cfa20dda4cff7bc (patch)
tree351e92a493beeb68c7cf7f0a2f6e090c1fce691b
parentb44c83429c78b62ff64394988e9f96d724400d07 (diff)
downloadspack-d95f14084ea438185e35e9ce0cfa20dda4cff7bc.tar.gz
spack-d95f14084ea438185e35e9ce0cfa20dda4cff7bc.tar.bz2
spack-d95f14084ea438185e35e9ce0cfa20dda4cff7bc.tar.xz
spack-d95f14084ea438185e35e9ce0cfa20dda4cff7bc.zip
papi: fix for Intel OneAPI compiler (#33225)
Without this patch one hits this error trying to compiler papi with Intel OneAPI: icx: error: Note that use of '-g' without any optimization-level option will turn off most compiler optimizations similar to use of '-O0' [-Werror,-Wdebug-disables-optimization] Signed-off-by: Howard Pritchard <howardp@lanl.gov> Signed-off-by: Howard Pritchard <howardp@lanl.gov>
-rw-r--r--var/spack/repos/builtin/packages/papi/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py
index f3fe762e44..35ea13fbd9 100644
--- a/var/spack/repos/builtin/packages/papi/package.py
+++ b/var/spack/repos/builtin/packages/papi/package.py
@@ -105,6 +105,11 @@ class Papi(AutotoolsPackage, ROCmPackage):
env.set("HSA_TOOLS_LIB", "unset")
if "+rocm_smi" in spec:
env.append_flags("CFLAGS", "-I%s/rocm_smi" % spec["rocm-smi-lib"].prefix.include)
+ #
+ # Intel OneAPI LLVM cannot compile papi unless the DBG enviroment variable is cleared
+ #
+ if spec.satisfies("%oneapi"):
+ env.set("DBG", "")
setup_run_environment = setup_build_environment