summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorBenedikt Riedel <benedikt.riedel@gmail.com>2017-11-15 12:32:02 -0600
committerscheibelp <scheibel1@llnl.gov>2017-11-15 10:32:02 -0800
commit2eb7fabe622c71d6848b9b04b3ee82ba02b9c54c (patch)
treea984f7194fc88ef071c295a0632f9c5dee5a5dea /var
parent9acf207023fff8ea4f0e2414dc9479fd1111ba6e (diff)
downloadspack-2eb7fabe622c71d6848b9b04b3ee82ba02b9c54c.tar.gz
spack-2eb7fabe622c71d6848b9b04b3ee82ba02b9c54c.tar.bz2
spack-2eb7fabe622c71d6848b9b04b3ee82ba02b9c54c.tar.xz
spack-2eb7fabe622c71d6848b9b04b3ee82ba02b9c54c.zip
Allow openblas to build on a VM (#6258)
This adds a "virtual_machine" boolean variant which adds build options that enable building openblas on a VM.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/openblas/package.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py
index f85d0e2a02..6258cfa09d 100644
--- a/var/spack/repos/builtin/packages/openblas/package.py
+++ b/var/spack/repos/builtin/packages/openblas/package.py
@@ -40,7 +40,8 @@ class Openblas(MakefilePackage):
version('0.2.17', '664a12807f2a2a7cda4781e3ab2ae0e1')
version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc')
version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9')
- version('develop', git='https://github.com/xianyi/OpenBLAS.git', branch='develop')
+ version('develop', git='https://github.com/xianyi/OpenBLAS.git',
+ branch='develop')
variant(
'shared',
@@ -61,6 +62,12 @@ class Openblas(MakefilePackage):
multi=False
)
+ variant(
+ 'virtual_machine',
+ default=False,
+ description="Adding options to build openblas on Linux virtual machine"
+ )
+
# virtual dependency
provides('blas')
provides('lapack')
@@ -119,6 +126,13 @@ class Openblas(MakefilePackage):
'FC={0}'.format(spack_f77),
'MAKE_NO_J=1'
]
+
+ if self.spec.variants['virtual_machine'].value:
+ make_defs += [
+ 'DYNAMIC_ARCH=1',
+ 'NO_AVX2=1'
+ ]
+
if self.spec.variants['cpu_target'].value:
make_defs += [
'TARGET={0}'.format(self.spec.variants['cpu_target'].value)