From a07c3d2aa8007372718821525ec0cf9ff9342515 Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Fri, 2 Oct 2020 17:08:48 -0400 Subject: [PATCH] metis: Ignore pragma omp warnings/errors with %intel (#19049) It looks like intel compilers generate warnings for omp pragmas when openmp flag is not given, which due to other flags set get promoted to errors. This adds a flag to ignore the pragma omp warnings (icc diagnostic number 3180 on %intel@14:). --- var/spack/repos/builtin/packages/metis/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 1992f1df20..37d8ef06be 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -55,6 +55,11 @@ class Metis(Package): patch('install_gklib_defs_rename.patch', when='@5:') patch('gklib_nomisleadingindentation_warning.patch', when='@5: %gcc@6:') + def setup_build_environment(self, env): + # Ignore warnings/errors re unrecognized omp pragmas on %intel + if '%intel@14:' in self.spec: + env.append_flags('CFLAGS', '-diag-disable 3180') + @when('@5:') def patch(self): source_path = self.stage.source_path