targets: adjust packages to use new specific targets semantics
Seamless translation from 'target=<generic>' to either - target.family == <generic> (in methods) - 'target=<generic>:' (in directives) Also updated docs to show ranges in directives.
This commit is contained in:
parent
3c4322bf1a
commit
7daf860991
@ -410,6 +410,8 @@ For tarball downloads, Spack can currently support checksums using the
|
|||||||
MD5, SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 algorithms. It
|
MD5, SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 algorithms. It
|
||||||
determines the algorithm to use based on the hash length.
|
determines the algorithm to use based on the hash length.
|
||||||
|
|
||||||
|
.. _versions-and-fetching:
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
Versions and fetching
|
Versions and fetching
|
||||||
---------------------
|
---------------------
|
||||||
@ -3290,7 +3292,17 @@ Within directives each of the names above can be used to match a particular targ
|
|||||||
# This patch is only applied on icelake microarchitectures
|
# This patch is only applied on icelake microarchitectures
|
||||||
patch("icelake.patch", when="target=icelake")
|
patch("icelake.patch", when="target=icelake")
|
||||||
|
|
||||||
in a similar way to what we have seen before for ``platform`` and ``os``.
|
It's also possible to select all the architectures belonging to the same family
|
||||||
|
using an open range:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
class Julia(Package):
|
||||||
|
# This patch is applied on all x86_64 microarchitectures.
|
||||||
|
# The trailing colon that denotes an open range of targets
|
||||||
|
patch("generic_x86_64.patch", when="target=x86_64:")
|
||||||
|
|
||||||
|
in a way that resembles what was shown in :ref:`versions-and-fetching` for versions.
|
||||||
Where ``target`` objects really shine though is when they are used in methods
|
Where ``target`` objects really shine though is when they are used in methods
|
||||||
called at configure, build or install time. In that case we can test targets
|
called at configure, build or install time. In that case we can test targets
|
||||||
for supported features, for instance:
|
for supported features, for instance:
|
||||||
|
@ -31,17 +31,17 @@ class Bowtie2(Package):
|
|||||||
patch('bowtie2-2.3.1.patch', when='@2.3.1', level=0)
|
patch('bowtie2-2.3.1.patch', when='@2.3.1', level=0)
|
||||||
patch('bowtie2-2.3.0.patch', when='@2.3.0', level=0)
|
patch('bowtie2-2.3.0.patch', when='@2.3.0', level=0)
|
||||||
resource(name='simde', git="https://github.com/nemequ/simde",
|
resource(name='simde', git="https://github.com/nemequ/simde",
|
||||||
destination='.', when='target=aarch64')
|
destination='.', when='target=aarch64:')
|
||||||
|
|
||||||
# seems to have trouble with 6's -std=gnu++14
|
# seems to have trouble with 6's -std=gnu++14
|
||||||
conflicts('%gcc@6:', when='@:2.3.1')
|
conflicts('%gcc@6:', when='@:2.3.1')
|
||||||
conflicts('@:2.3.5.0', when='target=aarch64')
|
conflicts('@:2.3.5.0', when='target=aarch64:')
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
if self.spec.satisfies('target=aarch64'):
|
if self.spec.target.family == 'aarch64':
|
||||||
copy_tree('simde', 'third_party/simde')
|
copy_tree('simde', 'third_party/simde')
|
||||||
if self.spec.satisfies('%gcc@:4.8.9 target=aarch64'):
|
if self.spec.satisfies('%gcc@:4.8.9'):
|
||||||
filter_file('-fopenmp-simd', '', 'Makefile')
|
filter_file('-fopenmp-simd', '', 'Makefile')
|
||||||
|
|
||||||
@run_before('install')
|
@run_before('install')
|
||||||
def filter_sbang(self):
|
def filter_sbang(self):
|
||||||
@ -66,7 +66,7 @@ def filter_sbang(self):
|
|||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
make_arg = []
|
make_arg = []
|
||||||
if self.spec.satisfies('target=aarch64'):
|
if self.spec.target.family == 'aarch64':
|
||||||
make_arg.append('POPCNT_CAPABILITY=0')
|
make_arg.append('POPCNT_CAPABILITY=0')
|
||||||
make(*make_arg)
|
make(*make_arg)
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
|
@ -105,7 +105,7 @@ class CbtfKrell(CMakePackage):
|
|||||||
|
|
||||||
depends_on("gotcha")
|
depends_on("gotcha")
|
||||||
|
|
||||||
patch('arm.patch', when='target=aarch64')
|
patch('arm.patch', when='target=aarch64:')
|
||||||
|
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class Cctools(AutotoolsPackage):
|
|||||||
depends_on('swig')
|
depends_on('swig')
|
||||||
# depends_on('xrootd')
|
# depends_on('xrootd')
|
||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
patch('arm.patch', when='target=aarch64')
|
patch('arm.patch', when='target=aarch64:')
|
||||||
|
|
||||||
# Generally SYS_foo is defined to __NR_foo (sys/syscall.h) which
|
# Generally SYS_foo is defined to __NR_foo (sys/syscall.h) which
|
||||||
# is then defined to a syscall number (asm/unistd_64.h). Certain
|
# is then defined to a syscall number (asm/unistd_64.h). Certain
|
||||||
|
@ -46,7 +46,7 @@ class Cudnn(Package):
|
|||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
install_tree('.', prefix)
|
install_tree('.', prefix)
|
||||||
|
|
||||||
if 'target=ppc64le platform=linux' in spec:
|
if 'target=ppc64le: platform=linux' in spec:
|
||||||
symlink(os.path.join(prefix, 'targets', 'ppc64le-linux', 'lib'),
|
symlink(os.path.join(prefix, 'targets', 'ppc64le-linux', 'lib'),
|
||||||
prefix.lib)
|
prefix.lib)
|
||||||
symlink(
|
symlink(
|
||||||
|
@ -24,7 +24,7 @@ def edit(self, spec, prefix):
|
|||||||
makefile = FileFilter('Makefile')
|
makefile = FileFilter('Makefile')
|
||||||
makefile.filter(' -march=i686 ', ' ')
|
makefile.filter(' -march=i686 ', ' ')
|
||||||
makefile.filter('CC=gcc', 'CC=%s' % spack_cc)
|
makefile.filter('CC=gcc', 'CC=%s' % spack_cc)
|
||||||
if spec.satisfies('target=aarch64'):
|
if spec.target.family == 'aarch64':
|
||||||
makefile.filter('-mfpmath=sse -msse -mmmx', ' ')
|
makefile.filter('-mfpmath=sse -msse -mmmx', ' ')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
@ -18,7 +18,7 @@ class Diffsplice(MakefilePackage):
|
|||||||
version('0.1.1', 'be90e6c072402d5aae0b4e2cbb8c10ac')
|
version('0.1.1', 'be90e6c072402d5aae0b4e2cbb8c10ac')
|
||||||
|
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
if spec.satisfies('target=aarch64'):
|
if spec.target.family == 'aarch64':
|
||||||
makefile = FileFilter(join_path(self.build_directory, 'Makefile'))
|
makefile = FileFilter(join_path(self.build_directory, 'Makefile'))
|
||||||
makefile.filter('-m64', '')
|
makefile.filter('-m64', '')
|
||||||
|
|
||||||
|
@ -30,8 +30,7 @@ class Fasta(MakefilePackage):
|
|||||||
def makefile_name(self):
|
def makefile_name(self):
|
||||||
if self.spec.satisfies('platform=darwin'):
|
if self.spec.satisfies('platform=darwin'):
|
||||||
name = 'Makefile.os_x86_64'
|
name = 'Makefile.os_x86_64'
|
||||||
elif (self.spec.satisfies('platform=linux') and
|
elif self.spec.satisfies('platform=linux target=x86_64:'):
|
||||||
self.spec.satisfies('target=x86_64')):
|
|
||||||
name = 'Makefile.linux64_sse2'
|
name = 'Makefile.linux64_sse2'
|
||||||
else:
|
else:
|
||||||
tty.die('''Unsupported platform/target, must be
|
tty.die('''Unsupported platform/target, must be
|
||||||
|
@ -96,8 +96,7 @@ def flag_handler(self, name, flags):
|
|||||||
for targets, simds in target_simds.items():
|
for targets, simds in target_simds.items():
|
||||||
if (
|
if (
|
||||||
(arch not in targets)
|
(arch not in targets)
|
||||||
and not any(
|
and str(spec.target.family) not in targets
|
||||||
spec.satisfies('target={0}'.format(t)) for t in targets)
|
|
||||||
):
|
):
|
||||||
if any(spec.satisfies('simd={0}'.format(x)) for x in simds):
|
if any(spec.satisfies('simd={0}'.format(x)) for x in simds):
|
||||||
raise ConflictsInSpecError(
|
raise ConflictsInSpecError(
|
||||||
|
@ -21,14 +21,14 @@ class Flang(CMakePackage):
|
|||||||
version('20180612', '62284e26214eaaff261a922c67f6878c')
|
version('20180612', '62284e26214eaaff261a922c67f6878c')
|
||||||
|
|
||||||
depends_on('llvm@flang-develop', when='@develop')
|
depends_on('llvm@flang-develop', when='@develop')
|
||||||
depends_on('llvm@flang-20180921', when='@20180921 target=x86_64')
|
depends_on('llvm@flang-20180921', when='@20180921 target=x86_64:')
|
||||||
depends_on('llvm@flang-20180612', when='@20180612 target=x86_64')
|
depends_on('llvm@flang-20180612', when='@20180612 target=x86_64:')
|
||||||
|
|
||||||
depends_on('llvm@flang-20180921', when='@20180921 target=aarch64')
|
depends_on('llvm@flang-20180921', when='@20180921 target=aarch64:')
|
||||||
|
|
||||||
# LLVM version specific to OpenPOWER.
|
# LLVM version specific to OpenPOWER.
|
||||||
depends_on('llvm@flang-ppc64le-20180921', when='@20180921 target=ppc64le')
|
depends_on('llvm@flang-ppc64le-20180921', when='@20180921 target=ppc64le:')
|
||||||
depends_on('llvm@flang-ppc64le-20180612', when='@20180612 target=ppc64le')
|
depends_on('llvm@flang-ppc64le-20180612', when='@20180612 target=ppc64le:')
|
||||||
|
|
||||||
depends_on('pgmath@develop', when='@develop')
|
depends_on('pgmath@develop', when='@develop')
|
||||||
depends_on('pgmath@20180921', when='@20180921')
|
depends_on('pgmath@20180921', when='@20180921')
|
||||||
|
@ -20,7 +20,7 @@ class Hisea(MakefilePackage):
|
|||||||
depends_on('boost')
|
depends_on('boost')
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
if self.spec.satisfies("target=aarch64"):
|
if self.spec.target.family == 'aarch64':
|
||||||
filter_file('-mpopcnt', '', 'Makefile')
|
filter_file('-mpopcnt', '', 'Makefile')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
|
@ -73,7 +73,7 @@ class Hpctoolkit(AutotoolsPackage):
|
|||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
|
|
||||||
depends_on('cuda', when='+cuda')
|
depends_on('cuda', when='+cuda')
|
||||||
depends_on('intel-xed', when='target=x86_64')
|
depends_on('intel-xed', when='target=x86_64:')
|
||||||
depends_on('mbedtls+pic', when='@gpu')
|
depends_on('mbedtls+pic', when='@gpu')
|
||||||
depends_on('papi', when='+papi')
|
depends_on('papi', when='+papi')
|
||||||
depends_on('libpfm4', when='~papi')
|
depends_on('libpfm4', when='~papi')
|
||||||
|
@ -68,7 +68,7 @@ def configure_args(self):
|
|||||||
cflags.append('-O3')
|
cflags.append('-O3')
|
||||||
if self.compiler.target in ['x86_64']:
|
if self.compiler.target in ['x86_64']:
|
||||||
cflags.append('-march=native')
|
cflags.append('-march=native')
|
||||||
elif not self.spec.satisfies('target=aarch64 %gcc@:5.9'):
|
elif not self.spec.satisfies('target=aarch64: %gcc@:5.9'):
|
||||||
cflags.append('-mcpu=native')
|
cflags.append('-mcpu=native')
|
||||||
cflags.append('-mtune=native')
|
cflags.append('-mtune=native')
|
||||||
else:
|
else:
|
||||||
|
@ -27,7 +27,7 @@ class IbmJava(Package):
|
|||||||
|
|
||||||
provides('java@8')
|
provides('java@8')
|
||||||
|
|
||||||
conflicts('target=x86_64', msg='ibm-java is only available for ppc64 and ppc64le')
|
conflicts('target=x86_64:', msg='ibm-java is only available for ppc64 and ppc64le')
|
||||||
|
|
||||||
# This assumes version numbers are 4-tuples: 8.0.5.30
|
# This assumes version numbers are 4-tuples: 8.0.5.30
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
|
@ -196,7 +196,7 @@ class IntelParallelStudio(IntelPackage):
|
|||||||
# MacOS does not support some of the auto dispatch settings
|
# MacOS does not support some of the auto dispatch settings
|
||||||
conflicts('auto_dispatch=SSE2', 'platform=darwin',
|
conflicts('auto_dispatch=SSE2', 'platform=darwin',
|
||||||
msg='SSE2 is not supported on MacOS')
|
msg='SSE2 is not supported on MacOS')
|
||||||
conflicts('auto_dispatch=SSE3', 'platform=darwin target=x86_64',
|
conflicts('auto_dispatch=SSE3', 'platform=darwin target=x86_64:',
|
||||||
msg='SSE3 is not supported on MacOS x86_64')
|
msg='SSE3 is not supported on MacOS x86_64')
|
||||||
|
|
||||||
def setup_dependent_environment(self, *args):
|
def setup_dependent_environment(self, *args):
|
||||||
|
@ -44,8 +44,8 @@ class IntelXed(Package):
|
|||||||
|
|
||||||
depends_on('python@2.7:', type='build')
|
depends_on('python@2.7:', type='build')
|
||||||
|
|
||||||
conflicts('target=ppc64', msg='intel-xed only runs on x86')
|
conflicts('target=ppc64:', msg='intel-xed only runs on x86')
|
||||||
conflicts('target=ppc64le', msg='intel-xed only runs on x86')
|
conflicts('target=ppc64le:', msg='intel-xed only runs on x86')
|
||||||
|
|
||||||
mycflags = []
|
mycflags = []
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class Intel(IntelPackage):
|
|||||||
# MacOS does not support some of the auto dispatch settings
|
# MacOS does not support some of the auto dispatch settings
|
||||||
conflicts('auto_dispatch=SSE2', 'platform=darwin',
|
conflicts('auto_dispatch=SSE2', 'platform=darwin',
|
||||||
msg='SSE2 is not supported on MacOS')
|
msg='SSE2 is not supported on MacOS')
|
||||||
conflicts('auto_dispatch=SSE3', 'platform=darwin target=x86_64',
|
conflicts('auto_dispatch=SSE3', 'platform=darwin target=x86_64:',
|
||||||
msg='SSE3 is not supported on MacOS x86_64')
|
msg='SSE3 is not supported on MacOS x86_64')
|
||||||
|
|
||||||
# Since the current package is a subset of 'intel-parallel-studio',
|
# Since the current package is a subset of 'intel-parallel-studio',
|
||||||
|
@ -35,6 +35,6 @@ class IsaacServer(CMakePackage):
|
|||||||
|
|
||||||
# https://github.com/ComputationalRadiationPhysics/isaac/pull/70
|
# https://github.com/ComputationalRadiationPhysics/isaac/pull/70
|
||||||
patch('jpeg.patch', when='@:1.3.1')
|
patch('jpeg.patch', when='@:1.3.1')
|
||||||
patch('arm.patch', when='@:1.4.0 target=aarch64')
|
patch('arm.patch', when='@:1.4.0 target=aarch64:')
|
||||||
|
|
||||||
root_cmakelists_dir = 'server'
|
root_cmakelists_dir = 'server'
|
||||||
|
@ -71,8 +71,8 @@ class Jdk(Package):
|
|||||||
provides('java@8', when='@1.8.0:1.8.999')
|
provides('java@8', when='@1.8.0:1.8.999')
|
||||||
provides('java@7', when='@1.7.0:1.7.999')
|
provides('java@7', when='@1.7.0:1.7.999')
|
||||||
|
|
||||||
conflicts('target=ppc64', msg='jdk is only available for x86_64')
|
conflicts('target=ppc64:', msg='jdk is only available for x86_64')
|
||||||
conflicts('target=ppc64le', msg='jdk is only available for x86_64')
|
conflicts('target=ppc64le:', msg='jdk is only available for x86_64')
|
||||||
|
|
||||||
# FIXME:
|
# FIXME:
|
||||||
# 1. `extends('java')` doesn't work, you need to use `extends('jdk')`
|
# 1. `extends('java')` doesn't work, you need to use `extends('jdk')`
|
||||||
|
@ -43,7 +43,7 @@ class Julia(Package):
|
|||||||
|
|
||||||
patch('gc.patch', when='@0.4:0.4.5')
|
patch('gc.patch', when='@0.4:0.4.5')
|
||||||
patch('openblas.patch', when='@0.4:0.4.5')
|
patch('openblas.patch', when='@0.4:0.4.5')
|
||||||
patch('armgcc.patch', when='@1.0.0:1.1.1 %gcc@:5.9 target=aarch64')
|
patch('armgcc.patch', when='@1.0.0:1.1.1 %gcc@:5.9 target=aarch64:')
|
||||||
|
|
||||||
variant('binutils', default=sys.platform != 'darwin',
|
variant('binutils', default=sys.platform != 'darwin',
|
||||||
description="Build via binutils")
|
description="Build via binutils")
|
||||||
@ -102,7 +102,7 @@ class Julia(Package):
|
|||||||
depends_on("mpi", when="+mpi", type="run")
|
depends_on("mpi", when="+mpi", type="run")
|
||||||
depends_on("py-matplotlib", when="+plot", type="run")
|
depends_on("py-matplotlib", when="+plot", type="run")
|
||||||
|
|
||||||
conflicts("@:0.7.0", when="target=aarch64")
|
conflicts("@:0.7.0", when="target=aarch64:")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
# Julia needs git tags
|
# Julia needs git tags
|
||||||
@ -133,7 +133,7 @@ def install(self, spec, prefix):
|
|||||||
"BUILD_LLVM_CLANG=1",
|
"BUILD_LLVM_CLANG=1",
|
||||||
"LLVM_ASSERTIONS=1",
|
"LLVM_ASSERTIONS=1",
|
||||||
"USE_LLVM_SHLIB=1"]
|
"USE_LLVM_SHLIB=1"]
|
||||||
if spec.satisfies('target=aarch64'):
|
if spec.target.family == 'aarch64':
|
||||||
options += [
|
options += [
|
||||||
'JULIA_CPU_TARGET=generic',
|
'JULIA_CPU_TARGET=generic',
|
||||||
'MARCH=armv8-a+crc']
|
'MARCH=armv8-a+crc']
|
||||||
|
@ -23,8 +23,8 @@ class Libsharp(AutotoolsPackage):
|
|||||||
depends_on('autoconf', type='build')
|
depends_on('autoconf', type='build')
|
||||||
depends_on('mpi', when='+mpi')
|
depends_on('mpi', when='+mpi')
|
||||||
|
|
||||||
patch('arm.patch', when='@2018-01-17 target=aarch64')
|
patch('arm.patch', when='@2018-01-17 target=aarch64:')
|
||||||
patch('1.0.0-arm.patch', when='@1.0.0 target=aarch64')
|
patch('1.0.0-arm.patch', when='@1.0.0 target=aarch64:')
|
||||||
|
|
||||||
def autoreconf(self, spec, prefix):
|
def autoreconf(self, spec, prefix):
|
||||||
"""Generate autotools configuration"""
|
"""Generate autotools configuration"""
|
||||||
|
@ -20,10 +20,10 @@ class Masurca(Package):
|
|||||||
depends_on('perl', type=('build', 'run'))
|
depends_on('perl', type=('build', 'run'))
|
||||||
depends_on('boost')
|
depends_on('boost')
|
||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
patch('arm.patch', when='target=aarch64')
|
patch('arm.patch', when='target=aarch64:')
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
if self.spec.satisfies('target=aarch64'):
|
if self.spec.target.family == 'aarch64':
|
||||||
for makefile in 'Makefile.am', 'Makefile.in':
|
for makefile in 'Makefile.am', 'Makefile.in':
|
||||||
m = join_path('global-1', 'prepare', makefile)
|
m = join_path('global-1', 'prepare', makefile)
|
||||||
filter_file('-minline-all-stringops', '', m)
|
filter_file('-minline-all-stringops', '', m)
|
||||||
|
@ -18,7 +18,7 @@ class Megahit(MakefilePackage):
|
|||||||
|
|
||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
|
|
||||||
patch('amd.patch', when='target=aarch64')
|
patch('amd.patch', when='target=aarch64:')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
|
@ -18,14 +18,14 @@ class Minimap2(PythonPackage):
|
|||||||
version('2.10', '52b36f726ec00bfca4a2ffc23036d1a2b5f96f0aae5a92fd826be6680c481c20')
|
version('2.10', '52b36f726ec00bfca4a2ffc23036d1a2b5f96f0aae5a92fd826be6680c481c20')
|
||||||
version('2.2', '5b68e094f4fa3dfbd9b37d5b654b7715')
|
version('2.2', '5b68e094f4fa3dfbd9b37d5b654b7715')
|
||||||
|
|
||||||
conflicts('target=aarch64', when='@:2.10')
|
conflicts('target=aarch64:', when='@:2.10')
|
||||||
depends_on('zlib', type='link')
|
depends_on('zlib', type='link')
|
||||||
depends_on('py-cython', type='build')
|
depends_on('py-cython', type='build')
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
def install_minimap2(self):
|
def install_minimap2(self):
|
||||||
make_arg = []
|
make_arg = []
|
||||||
if self.spec.satisfies("target=aarch64"):
|
if self.spec.target.family == 'aarch64':
|
||||||
make_arg.extend([
|
make_arg.extend([
|
||||||
'arm_neon=1',
|
'arm_neon=1',
|
||||||
'aarch64~1'
|
'aarch64~1'
|
||||||
|
@ -16,7 +16,8 @@ class Nanoflann(CMakePackage):
|
|||||||
version('1.2.3', '92a0f44a631c41aa06f9716c51dcdb11')
|
version('1.2.3', '92a0f44a631c41aa06f9716c51dcdb11')
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
if self.spec.satisfies('target=aarch64 %gcc@:5.9'):
|
if self.spec.target.family == 'aarch64' and \
|
||||||
|
self.spec.satisfies('%gcc@:5.9'):
|
||||||
filter_file('-mtune=native', '', 'CMakeLists.txt')
|
filter_file('-mtune=native', '', 'CMakeLists.txt')
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
|
@ -86,7 +86,7 @@ class Openblas(MakefilePackage):
|
|||||||
|
|
||||||
# Fixes compilation error on POWER8 with GCC 7
|
# Fixes compilation error on POWER8 with GCC 7
|
||||||
# https://github.com/xianyi/OpenBLAS/pull/1098
|
# https://github.com/xianyi/OpenBLAS/pull/1098
|
||||||
patch('power8.patch', when='@0.2.18:0.2.19 %gcc@7.1.0: target=ppc64')
|
patch('power8.patch', when='@0.2.18:0.2.19 %gcc@7.1.0: target=power8')
|
||||||
|
|
||||||
# Change file comments to work around clang 3.9 assembler bug
|
# Change file comments to work around clang 3.9 assembler bug
|
||||||
# https://github.com/xianyi/OpenBLAS/pull/982
|
# https://github.com/xianyi/OpenBLAS/pull/982
|
||||||
|
@ -34,8 +34,8 @@ class Openjdk(Package):
|
|||||||
provides('java@11', when='@11.0:11.99')
|
provides('java@11', when='@11.0:11.99')
|
||||||
provides('java@8', when='@1.8.0:1.8.999')
|
provides('java@8', when='@1.8.0:1.8.999')
|
||||||
|
|
||||||
conflicts('target=ppc64', msg='openjdk is only available for x86_64')
|
conflicts('target=ppc64:', msg='openjdk is only available for x86_64')
|
||||||
conflicts('target=ppc64le', msg='openjdk is only available for x86_64')
|
conflicts('target=ppc64le:', msg='openjdk is only available for x86_64')
|
||||||
|
|
||||||
# FIXME:
|
# FIXME:
|
||||||
# 1. `extends('java')` doesn't work, you need to use `extends('openjdk')`
|
# 1. `extends('java')` doesn't work, you need to use `extends('openjdk')`
|
||||||
|
@ -142,7 +142,7 @@ class OpenspeedshopUtils(CMakePackage):
|
|||||||
depends_on("mrnet@5.0.1-3:+cti", when='@2.3.1.3:9999+cti', type=('build', 'link', 'run'))
|
depends_on("mrnet@5.0.1-3:+cti", when='@2.3.1.3:9999+cti', type=('build', 'link', 'run'))
|
||||||
depends_on("mrnet@5.0.1-3:+lwthreads", when='@2.3.1.3:9999', type=('build', 'link', 'run'))
|
depends_on("mrnet@5.0.1-3:+lwthreads", when='@2.3.1.3:9999', type=('build', 'link', 'run'))
|
||||||
|
|
||||||
patch('arm.patch', when='target=aarch64')
|
patch('arm.patch', when='target=aarch64:')
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
build_directory = 'build_openspeedshop'
|
build_directory = 'build_openspeedshop'
|
||||||
|
@ -140,7 +140,7 @@ class Openspeedshop(CMakePackage):
|
|||||||
depends_on("mrnet@5.0.1-3:+cti", when='@2.3.1.3:9999+cti', type=('build', 'link', 'run'))
|
depends_on("mrnet@5.0.1-3:+cti", when='@2.3.1.3:9999+cti', type=('build', 'link', 'run'))
|
||||||
depends_on("mrnet@5.0.1-3:+lwthreads", when='@2.3.1.3:9999', type=('build', 'link', 'run'))
|
depends_on("mrnet@5.0.1-3:+lwthreads", when='@2.3.1.3:9999', type=('build', 'link', 'run'))
|
||||||
|
|
||||||
patch('arm.patch', when='target=aarch64')
|
patch('arm.patch', when='target=aarch64:')
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
build_directory = 'build_openspeedshop'
|
build_directory = 'build_openspeedshop'
|
||||||
|
@ -88,7 +88,7 @@ def install(self, spec, prefix):
|
|||||||
# Makefile, leading to build errors.
|
# Makefile, leading to build errors.
|
||||||
env.pop('APPS', None)
|
env.pop('APPS', None)
|
||||||
|
|
||||||
if spec.satisfies('target=x86_64') or spec.satisfies('target=ppc64'):
|
if str(spec.target.family) in ('x86_64', 'ppc64'):
|
||||||
# This needs to be done for all 64-bit architectures (except Linux,
|
# This needs to be done for all 64-bit architectures (except Linux,
|
||||||
# where it happens automatically?)
|
# where it happens automatically?)
|
||||||
env['KERNEL_BITS'] = '64'
|
env['KERNEL_BITS'] = '64'
|
||||||
|
@ -30,7 +30,7 @@ def flag_handler(self, name, flags):
|
|||||||
# FIXME; It is assumed that cray is x86_64.
|
# FIXME; It is assumed that cray is x86_64.
|
||||||
# If you support arm on cray, you need to fix it.
|
# If you support arm on cray, you need to fix it.
|
||||||
arch = 'x86_64'
|
arch = 'x86_64'
|
||||||
if (arch != 'x86_64' and not spec.satisfies("target=x86_64")):
|
if arch != 'x86_64' and spec.target.family != 'x86_64':
|
||||||
if spec.satisfies("+sse"):
|
if spec.satisfies("+sse"):
|
||||||
raise ConflictsInSpecError(
|
raise ConflictsInSpecError(
|
||||||
spec,
|
spec,
|
||||||
@ -55,7 +55,7 @@ def flag_handler(self, name, flags):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def makefile_file(self):
|
def makefile_file(self):
|
||||||
if not self.spec.satisfies('target=x86_64'):
|
if self.spec.target.family != 'x86_64':
|
||||||
return 'Makefile.nosse'
|
return 'Makefile.nosse'
|
||||||
elif '+sse' in self.spec:
|
elif '+sse' in self.spec:
|
||||||
return 'Makefile.SSE3.gcc'
|
return 'Makefile.SSE3.gcc'
|
||||||
@ -73,7 +73,7 @@ def build(self, spec, prefix):
|
|||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
if not self.spec.satisfies('target=x86_64'):
|
if self.spec.target.family != 'x86_64':
|
||||||
install('parsimonator', prefix.bin)
|
install('parsimonator', prefix.bin)
|
||||||
elif '+sse' in spec:
|
elif '+sse' in spec:
|
||||||
install('parsimonator-SSE3', prefix.bin)
|
install('parsimonator-SSE3', prefix.bin)
|
||||||
|
@ -27,7 +27,7 @@ class PlanckLikelihood(Package):
|
|||||||
|
|
||||||
patch('fortran.patch')
|
patch('fortran.patch')
|
||||||
patch('make.patch')
|
patch('make.patch')
|
||||||
patch('arm.patch', when='target=aarch64')
|
patch('arm.patch', when='target=aarch64:')
|
||||||
|
|
||||||
resource(
|
resource(
|
||||||
name='baseline',
|
name='baseline',
|
||||||
|
@ -46,7 +46,7 @@ def patch(self):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# remove -m64 on aarch64
|
# remove -m64 on aarch64
|
||||||
if self.spec.satisfies('target=aarch64'):
|
if self.spec.target.family == 'aarch64':
|
||||||
for f in ['lib/Makefile.am', 'src/Makefile.am']:
|
for f in ['lib/Makefile.am', 'src/Makefile.am']:
|
||||||
filter_file('-m64', '', f)
|
filter_file('-m64', '', f)
|
||||||
|
|
||||||
|
@ -18,6 +18,6 @@ class PyFlye(PythonPackage):
|
|||||||
depends_on('python@2.7:2.8', type=('build', 'run'))
|
depends_on('python@2.7:2.8', type=('build', 'run'))
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
if self.spec.satisfies('target=aarch64'):
|
if self.spec.target.family == 'aarch64':
|
||||||
spack_env.set('arm_neon', '1')
|
spack_env.set('arm_neon', '1')
|
||||||
spack_env.set('aarch64', '1')
|
spack_env.set('aarch64', '1')
|
||||||
|
@ -21,4 +21,4 @@ class Rapidjson(CMakePackage):
|
|||||||
# branch-fall-through warnings
|
# branch-fall-through warnings
|
||||||
patch('0001-turn-off-Werror.patch')
|
patch('0001-turn-off-Werror.patch')
|
||||||
|
|
||||||
patch('arm.patch', when='@1.1.0 target=aarch64 %gcc@:5.9')
|
patch('arm.patch', when='@1.1.0 target=aarch64: %gcc@:5.9')
|
||||||
|
@ -45,7 +45,7 @@ def flag_handler(self, name, flags):
|
|||||||
# FIXME; It is assumed that cray is x86_64.
|
# FIXME; It is assumed that cray is x86_64.
|
||||||
# If you support arm on cray, you need to fix it.
|
# If you support arm on cray, you need to fix it.
|
||||||
arch = 'x86_64'
|
arch = 'x86_64'
|
||||||
if (arch != 'x86_64' and not spec.satisfies("target=x86_64")):
|
if arch != 'x86_64' and not spec.target.family == 'x86_64':
|
||||||
if spec.satisfies("+sse"):
|
if spec.satisfies("+sse"):
|
||||||
raise ConflictsInSpecError(
|
raise ConflictsInSpecError(
|
||||||
spec,
|
spec,
|
||||||
@ -77,7 +77,7 @@ def install(self, spec, prefix):
|
|||||||
if spec.satisfies('+mpi'):
|
if spec.satisfies('+mpi'):
|
||||||
makefile.filter('mpicc', self.spec['mpi'].mpicc)
|
makefile.filter('mpicc', self.spec['mpi'].mpicc)
|
||||||
|
|
||||||
if spec.satisfies('target=x86_64'):
|
if spec.target.family == 'x86_64':
|
||||||
if spec.satisfies('+mpi +avx +pthreads'):
|
if spec.satisfies('+mpi +avx +pthreads'):
|
||||||
make('-f', 'Makefile.AVX.HYBRID.gcc')
|
make('-f', 'Makefile.AVX.HYBRID.gcc')
|
||||||
install('raxmlHPC-HYBRID-AVX', prefix.bin)
|
install('raxmlHPC-HYBRID-AVX', prefix.bin)
|
||||||
|
@ -35,7 +35,8 @@ class Rocksdb(MakefilePackage):
|
|||||||
phases = ['install']
|
phases = ['install']
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
if (self.spec.satisfies('target=aarch64 %gcc@:5.9')):
|
if (self.spec.target.family == 'aarch64' and
|
||||||
|
self.spec.satisfies('%gcc@:5.9')):
|
||||||
filter_file(
|
filter_file(
|
||||||
'-march=native', '',
|
'-march=native', '',
|
||||||
join_path('build_tools', 'build_detect_platform')
|
join_path('build_tools', 'build_detect_platform')
|
||||||
|
@ -22,6 +22,6 @@ class Sdl2(CMakePackage):
|
|||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
return [
|
return [
|
||||||
'-DSSEMATH={0}'.format(
|
'-DSSEMATH={0}'.format(
|
||||||
'OFF' if self.spec.satisfies('target=aarch64') else 'ON'
|
'OFF' if self.spec.target.family == 'aarch64' else 'ON'
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -24,7 +24,7 @@ class Strace(AutotoolsPackage):
|
|||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
args = []
|
args = []
|
||||||
if self.spec.satisfies('target=aarch64'):
|
if self.spec.target.family == 'aarch64':
|
||||||
args.append('--enable-mpers=no')
|
args.append('--enable-mpers=no')
|
||||||
else:
|
else:
|
||||||
args.append('--enable-mpers=yes')
|
args.append('--enable-mpers=yes')
|
||||||
|
@ -30,7 +30,7 @@ def build(self, spec, prefix):
|
|||||||
'CC_EXEC = {0}'.format(spack_cc),
|
'CC_EXEC = {0}'.format(spack_cc),
|
||||||
'Makefile.Linux'
|
'Makefile.Linux'
|
||||||
)
|
)
|
||||||
if spec.satisfies('target=aarch64'):
|
if spec.target.family == 'aarch64':
|
||||||
filter_file('-mtune=core2', '', 'Makefile.Linux')
|
filter_file('-mtune=core2', '', 'Makefile.Linux')
|
||||||
if spec.satisfies('@1.6.2:1.6.4'):
|
if spec.satisfies('@1.6.2:1.6.4'):
|
||||||
filter_file(
|
filter_file(
|
||||||
|
@ -25,7 +25,7 @@ class Tealeaf(MakefilePackage):
|
|||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
|
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
if (spec.satisfies('target=aarch64 %gcc@:5.9')):
|
if spec.target.family == 'aarch64' and spec.satisfies('%gcc@:5.9'):
|
||||||
filter_file(
|
filter_file(
|
||||||
'-march=native', '', join_path('TeaLeaf_ref', 'Makefile')
|
'-march=native', '', join_path('TeaLeaf_ref', 'Makefile')
|
||||||
)
|
)
|
||||||
|
@ -33,11 +33,11 @@ class Vdt(CMakePackage):
|
|||||||
def flag_handler(self, name, flags):
|
def flag_handler(self, name, flags):
|
||||||
arch = ''
|
arch = ''
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
if (spec.satisfies("platform=cray")):
|
if spec.satisfies("platform=cray"):
|
||||||
# FIXME; It is assumed that cray is x86_64.
|
# FIXME; It is assumed that cray is x86_64.
|
||||||
# If you support arm on cray, you need to fix it.
|
# If you support arm on cray, you need to fix it.
|
||||||
arch = 'x86_64'
|
arch = 'x86_64'
|
||||||
if (arch != 'x86_64' and not spec.satisfies("target=x86_64")):
|
if arch != 'x86_64' and not spec.satisfies("target=x86_64:"):
|
||||||
for s in self.simd_x86:
|
for s in self.simd_x86:
|
||||||
if (spec.satisfies("simd={0}".format(s))):
|
if (spec.satisfies("simd={0}".format(s))):
|
||||||
raise ConflictsInSpecError(
|
raise ConflictsInSpecError(
|
||||||
@ -51,8 +51,8 @@ def flag_handler(self, name, flags):
|
|||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
# FIXME: It is assumed that arm 32 bit target is arm.
|
# FIXME: It is assumed that arm 32 bit target is arm.
|
||||||
if (arch != 'arm' and not spec.satisfies("target=arm")):
|
if arch != 'arm' and not spec.satisfies("target=arm"):
|
||||||
if (spec.satisfies("simd=neon")):
|
if spec.satisfies("simd=neon"):
|
||||||
raise ConflictsInSpecError(
|
raise ConflictsInSpecError(
|
||||||
spec,
|
spec,
|
||||||
[(
|
[(
|
||||||
|
@ -18,7 +18,7 @@ class Velvet(MakefilePackage):
|
|||||||
depends_on('zlib')
|
depends_on('zlib')
|
||||||
|
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
if spec.satisfies('target=aarch64'):
|
if spec.target.family == 'aarch64':
|
||||||
makefile = FileFilter('Makefile')
|
makefile = FileFilter('Makefile')
|
||||||
makefile.filter('-m64', '')
|
makefile.filter('-m64', '')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user