Starpu and Fxt: new packages (#29285)
This commit is contained in:
parent
3dbbf3a101
commit
79e0a3dad0
55
var/spack/repos/builtin/packages/fxt/package.py
Normal file
55
var/spack/repos/builtin/packages/fxt/package.py
Normal file
@ -0,0 +1,55 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
|
||||
class Fxt(AutotoolsPackage):
|
||||
"""Fast User/Kernel Tracing
|
||||
|
||||
FxT stands for both FKT (Fast Kernel Tracing) and FUT (Fast User
|
||||
Tracing). This library provides efficient support for recording
|
||||
traces.
|
||||
"""
|
||||
|
||||
homepage = "http://savannah.nongnu.org/projects/fkt"
|
||||
url = "http://download.savannah.nongnu.org/releases/fkt/fxt-0.3.14.tar.gz"
|
||||
|
||||
maintainers = ['nfurmento', 'sthibaul']
|
||||
|
||||
version('0.3.14', sha256='317d8d93175cd9f27ec43b8390b6d29dc66114f06aa74f2329847d49baaaebf2')
|
||||
version('0.3.5', sha256='3c0b33c82a01c4fb710c53ee9fc2c803314beba6fb60c397e13e874811e34a22')
|
||||
version('0.3.4', sha256='fcd35a5278ac0f10eba12fed4fa436dce79559897fde5b8176d5eee9081970f7')
|
||||
version('0.3.3', sha256='3f6fea5211cc242a54496e6242365c99522a5039916789cdbe25a58d05d6a626')
|
||||
|
||||
variant('moreparams', default=False, description='Increase the value of FXT_MAX_PARAMS (to allow longer task names).')
|
||||
|
||||
depends_on("gawk", type='build')
|
||||
depends_on('autoconf', type='build')
|
||||
depends_on('automake', type='build')
|
||||
depends_on('libtool', type='build')
|
||||
depends_on('m4', type='build')
|
||||
|
||||
parallel = False
|
||||
|
||||
def patch(self):
|
||||
# Increase the value of FXT_MAX_PARAMS (to allow longer task names)
|
||||
if '+moreparams' in self.spec:
|
||||
filter_file('#define FXT_MAX_PARAMS.*',
|
||||
'#define FXT_MAX_PARAMS 16', 'tools/fxt.h')
|
||||
|
||||
def autoreconf(self, spec, prefix):
|
||||
if not os.path.isfile("./configure"):
|
||||
if os.path.isfile("./autogen.sh"):
|
||||
subprocess.call(['libtoolize', '--copy', '--force'], shell=False)
|
||||
subprocess.check_call("./autogen.sh")
|
||||
else:
|
||||
raise RuntimeError('Neither configure nor autogen.sh script exist.\
|
||||
FxT Cannot configure.')
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
if name == 'cflags':
|
||||
flags.append(self.compiler.cc_pic_flag)
|
||||
return(flags, None, None)
|
151
var/spack/repos/builtin/packages/starpu/package.py
Normal file
151
var/spack/repos/builtin/packages/starpu/package.py
Normal file
@ -0,0 +1,151 @@
|
||||
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import os
|
||||
|
||||
|
||||
class Starpu(AutotoolsPackage):
|
||||
"""StarPU runtime system
|
||||
|
||||
StarPU is a runtime support for scheduling applications written as
|
||||
task graphs on heterogeneous multi-core architectures. Tasks may
|
||||
define several implementations, for different architectures (e.g
|
||||
one implementation for CPUs, and one implementation for CUDA).
|
||||
StarPU takes care of scheduling and executing those tasks as
|
||||
efficiently as possible over the entire machine. It also provides
|
||||
a high-level data management library which enforces memory
|
||||
coherency over the differents processing units of the machine, and
|
||||
over a cluster when using distributed computing. Various data
|
||||
structures are supported mainline (vectors, dense matrices,
|
||||
CSR/BCSR/COO sparse matrices, ...), but application-specific data
|
||||
structures can also be supported.
|
||||
"""
|
||||
|
||||
homepage = "https://starpu.gitlabpages.inria.fr/"
|
||||
url = "https://files.inria.fr/starpu/starpu-1.3.9/starpu-1.3.9.tar.gz"
|
||||
git = "https://gitlab.inria.fr/starpu/starpu.git"
|
||||
|
||||
maintainers = ['nfurmento', 'sthibaul']
|
||||
|
||||
version('1.3.9', sha256='73adf2a5d25b04023132cfb1a8d9293b356354af7d1134e876122a205128d241')
|
||||
version('1.3.8', sha256='d35a27b219af8e7973888ebbff728ec0112ae9cda88d6b79c4cc7a1399b4d052')
|
||||
version('1.3.7', sha256='1d7e01567fbd4a66b7e563626899374735e37883226afb96c8952fea1dab77c2')
|
||||
version('1.3.6', sha256='ca71bfc5e66bbef6838a81de80fe62ff1037c3bbf902f25d3812a6f63fd8091a')
|
||||
version('1.3.5', sha256='910456a44cbac798709d3d3dfa808b5730b56cb79d6e3d8af9c3723856c26eb9')
|
||||
version('1.3.3', sha256='9dee3ac5ead3fb6911ac0eb5bef6681e8b6d70be2d55e3df5f725dd1268ca942')
|
||||
version('1.3.2', sha256='6c49441bf9d91d8e707d7c4a1df6124138e8a89a55c5f9ff514843415ff7e0b8')
|
||||
version('1.3.1', sha256='84120ec1e5b8655d4778a1263ac6e82857c7287279d8e4f8df24bfffc92613ba')
|
||||
version('1.3.0', sha256='7e06841bddb4b4c7e04e87230cd76b839ef9618d6f4e8ac9b045ec1a80a631c4')
|
||||
version('1.2.8', sha256='b6666dfbc8f248d20df232f27b0edbbb0b426258eac55ec693e45373ba5a75fb')
|
||||
version('1.2.7', sha256='be301a2718d2ca24e125d0c70f98d5bb74525f5908b3d10e63fb980918b5a16f')
|
||||
version('1.2.6', sha256='eb67a7676777b6ed583722aca5a9f63145b842f390ac2f5b3cbc36fe910d964c')
|
||||
version('1.2.5', sha256='1f22eae5c9ee4cae1c8020c5a18f4e36c05c43624bd2ba1f5356a8962d2bdae9')
|
||||
version('1.2.4', sha256='4c99f41a29a5056685a086dc6e299f5bd8c79146f1f0543f1a5882ec5100a9bd')
|
||||
version('1.2.3', sha256='295d39da17ad17752c1cb91e0009fc9b3630bc4ac7db7e2e43433ec9024dc6db')
|
||||
version('1.2.2', sha256='1677990bb9aa8e574634f2407a63aa797313fcb9a0d544b7ac60df90a37e3057')
|
||||
version('1.2.1', sha256='2e0c13f9be7bf7f3c2ce73340ca773d7a0c25bf66a822e44d8fe6407a04f8d77')
|
||||
version('1.2.0', sha256='c0b09a946bcbc680dd169d75856dc759abd98685da777afccc3366998b218a75')
|
||||
version('1.1.6', sha256='c28749b8f0a1586b814cb7d49dffb0f2631dde849591e697c40ef693a8fd54d8')
|
||||
|
||||
version('develop', branch='master')
|
||||
version('master', branch='master')
|
||||
version('git-1.1', branch='starpu-1.1')
|
||||
version('git-1.2', branch='starpu-1.2')
|
||||
version('git-1.3', branch='starpu-1.3')
|
||||
|
||||
variant('shared', default=True, description='Build STARPU as a shared library')
|
||||
variant('fast', default=True, description='Disable runtime assertions')
|
||||
variant('debug', default=False, description='Enable debug symbols')
|
||||
variant('verbose', default=False, description='Enable verbose debugging')
|
||||
variant('fxt', default=False, description='Enable FxT tracing support')
|
||||
variant('mpi', default=True, description='Enable MPI support')
|
||||
variant('cuda', default=False, description='Enable CUDA support')
|
||||
variant('opencl', default=False, description='Enable OpenCL support')
|
||||
variant('openmp', default=True, description='Enable OpenMP support')
|
||||
variant('fortran', default=False, description='Enable Fortran interface and examples')
|
||||
variant('simgrid', default=False, description='Enable SimGrid support')
|
||||
variant('simgridmc', default=False, description='Enable SimGrid model checker support')
|
||||
variant('examples', default=True, description='Enable Examples')
|
||||
|
||||
depends_on("pkg-config", type='build')
|
||||
depends_on('autoconf', type='build')
|
||||
depends_on('automake', type='build')
|
||||
depends_on('libtool', type='build')
|
||||
depends_on('m4', type='build')
|
||||
depends_on("hwloc")
|
||||
depends_on("hwloc+cuda", when='+cuda')
|
||||
depends_on("mpi", when='+mpi~simgrid')
|
||||
depends_on("cuda", when='+cuda~simgrid')
|
||||
depends_on("fxt", when='+fxt')
|
||||
depends_on("simgrid", when='+simgrid')
|
||||
depends_on("simgrid+smpi", when='+simgrid+mpi')
|
||||
depends_on("simgrid+mc", when='+simgridmc')
|
||||
|
||||
conflicts('+shared', when='+mpi+simgrid', msg="Simgrid MPI cannot be built with a shared library")
|
||||
|
||||
def autoreconf(self, spec, prefix):
|
||||
if not os.path.isfile("./configure"):
|
||||
autogen = Executable("./autogen.sh")
|
||||
autogen()
|
||||
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
|
||||
config_args = [
|
||||
'--disable-build-doc',
|
||||
'--enable-blas-lib=none',
|
||||
'--disable-mlr',
|
||||
]
|
||||
|
||||
# add missing lib for simgrid static compilation,
|
||||
# already fixed since StarPU 1.2.1
|
||||
if spec.satisfies('+fxt'):
|
||||
mf = FileFilter('configure')
|
||||
mf.filter('libfxt.a -lrt', 'libfxt.a -lrt -lbfd')
|
||||
|
||||
mpicc = ""
|
||||
if spec.satisfies('+mpi~simgrid'):
|
||||
mpicc = spec['mpi'].mpicc
|
||||
elif spec.satisfies('+mpi+simgrid'):
|
||||
mpicc = "%s/bin/smpicc" % spec['simgrid'].prefix
|
||||
|
||||
config_args.extend([
|
||||
"--%s-shared" % ('enable' if '+shared' in spec else 'disable'),
|
||||
"--%s-debug" % ('enable' if '+debug' in spec else 'disable'),
|
||||
"--%s-verbose" % ('enable' if '+verbose' in spec else 'disable'),
|
||||
"--%s-fast" % ('enable' if '+fast' in spec else 'disable'),
|
||||
|
||||
"--%s-build-tests" % ('enable' if '+examples' in spec else 'disable'),
|
||||
"--%s-build-examples" % ('enable' if '+examples' in spec else 'disable'),
|
||||
|
||||
"--%s-fortran" % ('enable' if '+fortran' in spec else 'disable'),
|
||||
"--%s-openmp" % ('enable' if '+openmp' in spec else 'disable'),
|
||||
|
||||
"--%s-opencl" % ('disable' if '~opencl' in spec
|
||||
or '+simgrid' in spec else 'enable'),
|
||||
"--%s-cuda" % ('disable' if '~cuda' in spec
|
||||
or '+simgrid' in spec else 'enable'),
|
||||
|
||||
"--disable-mpi" if '~mpi' in spec else "--enable-mpi",
|
||||
"--without-mpicc" if '~mpi' in spec else "--with-mpicc=%s" % mpicc,
|
||||
|
||||
"--with-hwloc=%s" % spec['hwloc'].prefix,
|
||||
])
|
||||
|
||||
if spec.satisfies('+fxt'):
|
||||
config_args.append("--with-fxt=%s" % spec['fxt'].prefix)
|
||||
if spec.satisfies('@1.2:') or spec.satisfies('@git-1.2'):
|
||||
config_args.append("--enable-paje-codelet-details")
|
||||
|
||||
if spec.satisfies('+simgrid'):
|
||||
config_args.append("--enable-simgrid")
|
||||
config_args.append("--with-simgrid-dir=%s" % spec['simgrid'].prefix)
|
||||
if spec.satisfies('+simgridmc'):
|
||||
config_args.append("--enable-simgrid-mc")
|
||||
|
||||
# On OSX, deactivate glpk
|
||||
if spec.satisfies('platform=darwin'):
|
||||
config_args.append("--disable-glpk")
|
||||
|
||||
return config_args
|
Loading…
Reference in New Issue
Block a user