Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable numpy AVX512 when compiled with Intel classic #486

Closed
Closed
5 changes: 5 additions & 0 deletions var/spack/repos/builtin/packages/py-numpy/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,11 @@ def setup_build_environment(self, env):

env.set("NPY_LAPACK_ORDER", lapack)

def setup_run_environment(self, env):
archs = ("x86_64_v4:", "cannonlake:", "mic_knl")
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
if any([self.spec.satisfies(f"target={arch} %intel") for arch in archs]):
env.set("NPY_DISABLE_CPU_FEATURES", "AVX512F")

@run_after("install")
@on_package_attributes(run_tests=True)
def install_test(self):
Expand Down
Loading