diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2021-03-13 06:00:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-13 11:00:15 +0000 |
commit | 5b2a54952c083dbb1f6ea45827adbd83d023fbbb (patch) | |
tree | d0cbf5c6e9bd15d17a54538e2a20a4f34f6c5359 | |
parent | 746081e933367ecd08ba9e90b23ae44e4cce8140 (diff) | |
download | spack-5b2a54952c083dbb1f6ea45827adbd83d023fbbb.tar.gz spack-5b2a54952c083dbb1f6ea45827adbd83d023fbbb.tar.bz2 spack-5b2a54952c083dbb1f6ea45827adbd83d023fbbb.tar.xz spack-5b2a54952c083dbb1f6ea45827adbd83d023fbbb.zip |
openblas: prevent microarch flags for generic targets (#22270)
As of OpenBLAS 0.3.13, leaving off `TARGET` by default optimizes most
code for the host system -- adding flags that cause the resulting
library to fail (SIGILL) on older systems. This change should ensure
that a "x86_64" target for example will work across deployment systems.
https://github.com/xianyi/OpenBLAS/issues/3139
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/package.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index a2bd7da1cb..9ec69cc24d 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -218,8 +218,10 @@ class Openblas(MakefilePackage): if microarch.vendor == 'generic': # User requested a generic platform, or we couldn't find a good # match for the requested one. Allow OpenBLAS to determine - # an optimized kernel at run time. - args.append('DYNAMIC_ARCH=1') + # an optimized kernel at run time, including older CPUs, while + # forcing it not to add flags for the current host compiler. + args.extend(['DYNAMIC_ARCH=1', 'DYNAMIC_OLDER=1', + 'TARGET=GENERIC']) elif microarch.name in skylake: # Special case for renaming skylake family args.append('TARGET=SKYLAKEX') |