
* added package gptune with all its dependencies: adding py-autotune, pygmo, py-pyaml, py-autotune, py-gpy, py-lhsmdu, py-hpbandster, pagmo2, py-opentuner; modifying superlu-dist, py-scikit-optimize * adding gptune package * minor fix for macos spack test * update patch for py-scikit-optimize; update test files for gptune * fixing gptune package style error * fixing unit tests * a few changes reviewed in the PR * improved gptune package.py with a few newly added/improved dependencies * fixed a few style errors * minor fix on package name py-pyro4 * fixing more style errors * Update var/spack/repos/builtin/packages/py-scikit-optimize/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * resolved a few issues in the PR * fixing file permissions * a few minor changes * style correction * minor correction to jq package file * Update var/spack/repos/builtin/packages/py-pyro4/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * fixing a few issues in the PR * adding py-selectors34 required by py-pyro4 * improved the superlu-dist package * improved the superlu-dist package * moree changes to gptune and py-selectors34 based on the PR * Update var/spack/repos/builtin/packages/py-selectors34/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
90 lines
3.3 KiB
Python
90 lines
3.3 KiB
Python
# Copyright 2013-2021 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 Exago(CMakePackage, CudaPackage):
|
|
"""ExaGO is a package for solving large-scale power grid optimization
|
|
problems on parallel and distributed architectures, particularly targeted
|
|
for exascale machines."""
|
|
|
|
homepage = 'https://gitlab.pnnl.gov/exasgd/frameworks/exago'
|
|
git = 'https://gitlab.pnnl.gov/exasgd/frameworks/exago.git'
|
|
maintainers = ['ashermancinelli', 'CameronRutherford']
|
|
|
|
version('1.0.0', tag='v1.0.0')
|
|
version('0.99.2', tag='v0.99.2')
|
|
version('0.99.1', tag='v0.99.1')
|
|
version('master', branch='master')
|
|
version('develop', branch='develop')
|
|
|
|
# Progrmming model options
|
|
variant('mpi', default=True, description='Enable/Disable MPI')
|
|
variant('raja', default=False, description='Enable/Disable RAJA')
|
|
|
|
# Solver options
|
|
variant('hiop', default=False, description='Enable/Disable HiOp')
|
|
variant('petsc', default=True, description='Enable/Disable PETSc')
|
|
variant('ipopt', default=False, description='Enable/Disable IPOPT')
|
|
|
|
# Dependencides
|
|
depends_on('mpi', when='+mpi')
|
|
depends_on('blas')
|
|
depends_on('cuda', when='+cuda')
|
|
depends_on('raja', when='+raja')
|
|
depends_on('raja+cuda', when='+raja+cuda')
|
|
depends_on('umpire', when='+raja')
|
|
|
|
# Some allocator code in Umpire only works with static libs
|
|
depends_on('umpire+cuda~shared', when='+raja+cuda')
|
|
|
|
# For some versions of RAJA package, camp cuda variant does not get set
|
|
# correctly, so we must explicitly depend on it even though we don't use
|
|
# camp
|
|
depends_on('camp+cuda', when='+cuda')
|
|
|
|
depends_on('cmake@3.18:', type='build')
|
|
|
|
# HiOp dependency logic
|
|
depends_on('hiop+raja', when='+hiop+raja')
|
|
depends_on('hiop@0.3.99:', when='@0.99:+hiop')
|
|
depends_on('hiop+cuda', when='+hiop+cuda')
|
|
depends_on('hiop~mpi', when='+hiop~mpi')
|
|
depends_on('hiop+mpi', when='+hiop+mpi')
|
|
|
|
# Require PETSc < 3.15 per ExaGO issue #199
|
|
depends_on('petsc@3.13:3.14', when='+petsc')
|
|
depends_on('petsc~mpi', when='+petsc~mpi')
|
|
depends_on('ipopt', when='+ipopt')
|
|
|
|
flag_handler = build_system_flags
|
|
|
|
def cmake_args(self):
|
|
args = []
|
|
spec = self.spec
|
|
|
|
args.append("-DEXAGO_RUN_TESTS=ON")
|
|
|
|
args.append(self.define_from_variant('EXAGO_ENABLE_MPI', 'mpi'))
|
|
args.append(self.define_from_variant('EXAGO_ENABLE_RAJA', 'raja'))
|
|
args.append(self.define_from_variant('EXAGO_ENABLE_HIOP', 'hiop'))
|
|
args.append(self.define_from_variant('EXAGO_ENABLE_PETSC', 'petsc'))
|
|
args.append(self.define_from_variant('EXAGO_ENABLE_IPOPT', 'ipopt'))
|
|
args.append(self.define_from_variant('EXAGO_ENABLE_GPU', 'cuda'))
|
|
args.append(self.define_from_variant('EXAGO_ENABLE_CUDA', 'cuda'))
|
|
|
|
if '+cuda' in spec:
|
|
cuda_arch_list = spec.variants['cuda_arch'].value
|
|
cuda_arch = cuda_arch_list[0]
|
|
if cuda_arch != 'none':
|
|
args.append(
|
|
"-DCMAKE_CUDA_ARCHITECTURES={0}".format(cuda_arch))
|
|
|
|
if '+petsc' in spec:
|
|
args.append("-DPETSC_DIR='{0}'".format(spec['petsc'].prefix))
|
|
|
|
return args
|