summaryrefslogtreecommitdiff
path: root/var/spack/packages/SAMRAI/package.py
blob: bb88ec32923d2d9fbd50e4b7ddf2d16badca5d33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
from spack import *

class Samrai(Package):
    """SAMRAI (Structured Adaptive Mesh Refinement Application Infrastructure)
       is an object-oriented C++ software library enables exploration of numerical,
       algorithmic, parallel computing, and software issues associated with applying
       structured adaptive mesh refinement (SAMR) technology in large-scale parallel
       application development.
    """
    homepage = "https://computation-rnd.llnl.gov/SAMRAI/confirm.php"
    url      = "https://computation-rnd.llnl.gov/SAMRAI/download/SAMRAI-v3.7.3.tar.gz"
    list_url = homepage

    versions = {
      '3.7.3'      : '12d574eacadf8c9a70f1bb4cd1a69df6',
      '3.7.2'      : 'f6a716f171c9fdbf3cb12f71fa6e2737',
      '3.6.3-beta' : 'ef0510bf2893042daedaca434e5ec6ce',
      '3.5.2-beta' : 'd072d9d681eeb9ada15ce91bea784274',
      '3.5.0-beta' : '1ad18a319fc573e12e2b1fbb6f6b0a19',
      '3.4.1-beta' : '00814cbee2cb76bf8302aff56bbb385b',
      '3.3.3-beta' : '1db3241d3e1cab913dc310d736c34388',
      '3.3.2-beta' : 'e598a085dab979498fcb6c110c4dd26c',
      '2.4.4'      : '04fb048ed0efe7c531ac10c81cc5f6ac',
    }

    depends_on("mpi")
    depends_on("zlib")
    depends_on("hdf5")
    depends_on("boost@1.52.0")

    # don't build tools with gcc
    patch('no-tool-build.patch', when='%gcc')

    # TODO: currently hard-coded to use openmpi - be careful!
    def install(self, spec, prefix):
        configure(
            "--prefix=%s" % prefix,
            "--with-CXX=%s" % spec['openmpi'].prefix.bin + "/mpic++",
            "--with-CC=%s" % spec['openmpi'].prefix.bin + "/mpicc",
            "--with-hdf5=%s" % spec['hdf5'].prefix,
            "--with-boost=%s" % spec['boost'].prefix,
            "--with-zlib=%s" % spec['zlib'].prefix,
            "--disable-blas",
            "--disable-lapack",
            "--with-hypre=no",
            "--with-petsc=no",
            "--enable-opt",
            "--disable-debug")

        make()
        make("install")