-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsprng.py
52 lines (43 loc) · 1.84 KB
/
sprng.py
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
52
# Copyright 2013-2019 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)
# ----------------------------------------------------------------------------
# If you submit this package back to Spack as a pull request,
# please first remove this boilerplate and all FIXME comments.
#
# This is a template package file for Spack. We've put "FIXME"
# next to all the things you'll want to change. Once you've handled
# them, you can save this file and test your package like this:
#
# spack install sprng
#
# You can edit this file again by typing:
#
# spack edit sprng
#
# See the Spack documentation for more information on packaging.
# ----------------------------------------------------------------------------
from spack import *
class Sprng(AutotoolsPackage):
"""Version 5.0 of the Scalable Parallel Random Number Generator."""
# FIXME: Add a proper url for your package's homepage here.
homepage = "http://www.sprng.org"
url = "http://www.sprng.org/Version5.0/sprng5.tar.bz2"
version('5', sha256='9172a495472cc24893e7489ce9b5654300dc60cba4430e436ce50d28eb749a66')
variant('mpi', default=True, description='Enable MPI support')
variant('fortran', default=False, description='Enable Fortran support')
depends_on('mpi', when='+mpi')
depends_on('fortran', when='+fortran')
def configure_args(self):
# FIXME: Add arguments other than --prefix
# FIXME: If not needed delete this function
args = []
spec = self.spec
if '+fortran' not in spec:
args.append('--with-fortran=no')
if '+mpi' in spec:
args.append('--with-mpi')
if spec.satisfies('^openmpi'):
args.append('LIBS=-lmpi_cxx')
return args