Files
spack/var/spack/repos/builtin/packages/snap/package.py
Todd Gamblin eea786f4e8 relicense: replace LGPL headers with Apache-2.0/MIT SPDX headers
- remove the old LGPL license headers from all files in Spack
- add SPDX headers to all files
  - core and most packages are (Apache-2.0 OR MIT)
  - a very small number of remaining packages are LGPL-2.1-only
2018-10-17 14:42:06 -07:00

47 lines
1.6 KiB
Python

# Copyright 2013-2018 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)
from spack import *
class Snap(MakefilePackage):
"""SNAP serves as a proxy application to model
the performance of a modern discrete ordinates
neutral particle transport application.
SNAP may be considered an update to Sweep3D,
intended for hybrid computing architectures.
It is modeled off the Los Alamos National Laboratory code PARTISN."""
homepage = "https://github.com/lanl/SNAP"
git = "https://github.com/lanl/SNAP.git"
tags = ['proxy-app']
version('master')
variant('openmp', default=False, description='Build with OpenMP support')
variant('opt', default=True, description='Build with debugging')
variant('mpi', default=True, description='Build with MPI support')
depends_on('mpi', when='+mpi')
build_directory = 'src'
def edit(self, spec, prefix):
with working_dir(self.build_directory):
makefile = FileFilter('Makefile')
if '~opt' in spec:
makefile.filter('OPT = yes', 'OPT = no')
if '~mpi' in spec:
makefile.filter('MPI = yes', 'MPI = no')
if '~openmp' in spec:
makefile.filter('OPENMP = yes', 'OPENMP = no')
def install(self, spec, prefix):
mkdirp(prefix.bin)
install('src/gsnap', prefix.bin)
install_tree('qasnap', prefix.qasnap)
install('README.md', prefix)