package.py 2.5 KB
Newer Older
Rob Latham's avatar
Rob Latham committed
1
2
3
4
from spack import *


class Bake(AutotoolsPackage):
Matthieu Dorier's avatar
Matthieu Dorier committed
5
    """Margo-enabled wrapper for Pmem, enabling RDMA to Pmem targets."""
Rob Latham's avatar
Rob Latham committed
6
7
8

    homepage = "https://xgitlab.cels.anl.gov/sds/bake"
    url      = "https://xgitlab.cels.anl.gov/sds/bake"
Matthieu Dorier's avatar
Matthieu Dorier committed
9
    git      = 'https://xgitlab.cels.anl.gov/sds/bake.git'
Rob Latham's avatar
Rob Latham committed
10

Matthieu Dorier's avatar
Matthieu Dorier committed
11
    version('develop', branch='master')
12
    version('dev-multi-backend', branch='dev-multibackend')
13
    version('dev-file-backend', branch='carns/dev-file-backend')
14
    version('0.3.6', tag='v0.3.6')
Matthieu Dorier's avatar
Matthieu Dorier committed
15
    version('0.3.5', tag='v0.3.5')
Matthieu Dorier's avatar
Matthieu Dorier committed
16
    version('0.3.4', tag='v0.3.4')
Matthieu Dorier's avatar
Matthieu Dorier committed
17
    version('0.3.3', tag='v0.3.3')
Matthieu Dorier's avatar
Matthieu Dorier committed
18
    version('0.3.2', tag='v0.3.2')
Philip Carns's avatar
Philip Carns committed
19
    version('0.3.1', tag='v0.3.1')
Rob Latham's avatar
Rob Latham committed
20
    version('0.3', tag='v0.3')
21
    version('0.2', tag='v0.2')
Matthieu Dorier's avatar
Matthieu Dorier committed
22
    version('0.1', tag='v0.1')
Rob Latham's avatar
Rob Latham committed
23

Matthieu Dorier's avatar
Matthieu Dorier committed
24
    variant('benchmark', default=False, description='Enable building bake-benchmark')
Matthieu Dorier's avatar
Matthieu Dorier committed
25
    variant('remi', default=False, description="Enable support for migration with REMI")
26
    variant('sizecheck', default=False, description="Enable size/bound checking (may degrade performance)")
Matthieu Dorier's avatar
Matthieu Dorier committed
27
    variant('timers', default=False, description="Enable timers on stdout (use for performance tuning)")
28

29
30
31
    depends_on('autoconf@2.65:', type=("build"))
    depends_on('automake@1.13.4:', type=("build"))
    depends_on('libtool', type=("build"))
Matthieu Dorier's avatar
Matthieu Dorier committed
32
    depends_on('margo@0.4:')
Matthieu Dorier's avatar
Matthieu Dorier committed
33
34
    depends_on('remi@0.1:', when='@:0.3.3')
    depends_on('remi@0.2.2:', when='+remi @0.3.4:')
35
36
    # dev-file-backend version still requires remi until it is rebased
    depends_on('remi@0.2.2:', when='@dev-file-backend')
Rob Latham's avatar
Rob Latham committed
37
    depends_on('libuuid')
Philip Carns's avatar
Philip Carns committed
38
    depends_on('pmdk')
Matthieu Dorier's avatar
Matthieu Dorier committed
39
    depends_on('jsoncpp@1.9.1:', when='+benchmark')
Matthieu Dorier's avatar
Matthieu Dorier committed
40
    depends_on('mpi', when='+benchmark')
41
42
43
44
45

    def configure_args(self):
        spec = self.spec
        extra_args = []

Matthieu Dorier's avatar
Matthieu Dorier committed
46
47
48
49
50
51
52
        if '+benchmark' in spec:
            extra_args.append('--enable-benchmark')
            extra_args.append('CXX=%s' % spec['mpi'].mpicxx)
            extra_args.append('CC=%s' % spec['mpi'].mpicc)
        else:
            extra_args.append('--disable-benchmark')

53
54
55
56
57
        if '+sizecheck' in spec:
            extra_args.append('--enable-sizecheck')
        else:
            extra_args.append('--disable-sizecheck')

Matthieu Dorier's avatar
Matthieu Dorier committed
58
59
60
61
62
        if '+timers' in spec:
            extra_args.append('--enable-timers')
        else:
            extra_args.append('--disable-timers')

Matthieu Dorier's avatar
Matthieu Dorier committed
63
64
65
66
67
68
        if spec.satisfies('@0.3.4:'):
            if '+remi' in spec:
                extra_args.append('--enable-remi')
            else:
                extra_args.append('--disable-remi')

69
        return extra_args