parsimonator: simplified recipe by removing SIMD variants (#12949)
Now the support for SSE3 or AVX is tested on the selected target
This commit is contained in:
parent
f2967b6c16
commit
78d051b534
@ -3,65 +3,29 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
|
||||||
from spack.spec import ConflictsInSpecError
|
|
||||||
|
|
||||||
|
|
||||||
class Parsimonator(MakefilePackage):
|
class Parsimonator(MakefilePackage):
|
||||||
"""Parsimonator is a no-frills light-weight implementation for building
|
"""Parsimonator is a no-frills light-weight implementation for building
|
||||||
starting trees under parsimony for RAxML"""
|
starting trees under parsimony for RAxML.
|
||||||
|
"""
|
||||||
|
|
||||||
homepage = "http://www.exelixis-lab.org/"
|
homepage = "http://www.exelixis-lab.org/"
|
||||||
git = "https://github.com/stamatak/Parsimonator-1.0.2.git"
|
git = "https://github.com/stamatak/Parsimonator-1.0.2.git"
|
||||||
|
|
||||||
version('1.0.2', commit='78368c6ab1e9adc7e9c6ec9256dd7ff2a5bb1b0a')
|
version('1.0.2', commit='78368c6ab1e9adc7e9c6ec9256dd7ff2a5bb1b0a')
|
||||||
|
|
||||||
variant('sse', default=False, description='Enable SSE in order to substantially speed up execution')
|
|
||||||
variant('avx', default=False, description='Enable AVX in order to substantially speed up execution')
|
|
||||||
|
|
||||||
conflicts('+avx', when='+sse')
|
|
||||||
|
|
||||||
patch('nox86.patch')
|
patch('nox86.patch')
|
||||||
|
|
||||||
def flag_handler(self, name, flags):
|
|
||||||
arch = ''
|
|
||||||
spec = self.spec
|
|
||||||
if spec.satisfies("platform=cray"):
|
|
||||||
# FIXME; It is assumed that cray is x86_64.
|
|
||||||
# If you support arm on cray, you need to fix it.
|
|
||||||
arch = 'x86_64'
|
|
||||||
if arch != 'x86_64' and spec.target.family != 'x86_64':
|
|
||||||
if spec.satisfies("+sse"):
|
|
||||||
raise ConflictsInSpecError(
|
|
||||||
spec,
|
|
||||||
[(
|
|
||||||
spec,
|
|
||||||
spec.architecture.target,
|
|
||||||
spec.variants['sse'],
|
|
||||||
'+sse is valid only on x86_64'
|
|
||||||
)]
|
|
||||||
)
|
|
||||||
if spec.satisfies("+avx"):
|
|
||||||
raise ConflictsInSpecError(
|
|
||||||
spec,
|
|
||||||
[(
|
|
||||||
spec,
|
|
||||||
spec.architecture.target,
|
|
||||||
spec.variants['avx'],
|
|
||||||
'+avx is valid only on x86_64'
|
|
||||||
)]
|
|
||||||
)
|
|
||||||
return (flags, None, None)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def makefile_file(self):
|
def makefile_file(self):
|
||||||
if self.spec.target.family != 'x86_64':
|
if self.spec.target.family != 'x86_64':
|
||||||
return 'Makefile.nosse'
|
return 'Makefile.nosse'
|
||||||
elif '+sse' in self.spec:
|
|
||||||
return 'Makefile.SSE3.gcc'
|
if 'avx' in self.spec.target:
|
||||||
elif '+avx' in self.spec:
|
|
||||||
return 'Makefile.AVX.gcc'
|
return 'Makefile.AVX.gcc'
|
||||||
else:
|
elif 'sse3' in self.spec.target:
|
||||||
|
return 'Makefile.SSE3.gcc'
|
||||||
|
|
||||||
return 'Makefile.gcc'
|
return 'Makefile.gcc'
|
||||||
|
|
||||||
def edit(self, spec, prefix):
|
def edit(self, spec, prefix):
|
||||||
@ -73,11 +37,9 @@ def build(self, spec, prefix):
|
|||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
if self.spec.target.family != 'x86_64':
|
if 'avx' in self.spec.target:
|
||||||
install('parsimonator', prefix.bin)
|
|
||||||
elif '+sse' in spec:
|
|
||||||
install('parsimonator-SSE3', prefix.bin)
|
|
||||||
elif '+avx' in spec:
|
|
||||||
install('parsimonator-AVX', prefix.bin)
|
install('parsimonator-AVX', prefix.bin)
|
||||||
|
elif 'sse3' in self.spec.target:
|
||||||
|
install('parsimonator-SSE3', prefix.bin)
|
||||||
else:
|
else:
|
||||||
install('parsimonator', prefix.bin)
|
install('parsimonator', prefix.bin)
|
||||||
|
Loading…
Reference in New Issue
Block a user