spack/var/spack/repos/builtin/packages/ceed/package.py
Veselin Dobrev 49334f006d [WIP] CEED 2.0 (#10903)
* Initial commit for v2.0 of the CEED software suite.

* Update Nek packages and gslib

* Help spack concretize the hypre version for ceed-2.0.

* Fix nekcem install error

* Add support for gfortran v8 in nek5000 and nekcem.

* Split Nek5000 into Nek5000 and Nektools

* Get Nektools to build fine in Theta

* Fix travis failure: remove unused 'import numbers' from nek5000.

* Check for gfortran if it is wrapped

* Tweak the detection of gfortran in nek5000.

* Fix Nek packages to add -std=legacy when FC=gcc

* spack install ceed~petsc works fine on Theta

* Fix flake8 errors

* Fix more flake8 tests

* Fix an import issue

* Tweak the suite-sparse package to avoid interaction with existing system
installations of suite-sparse.

* petsc: update superlu-dist dependency

* Updates in the packages: occa, libceed, and ceed.

* In the libceed package, explicitly tell nvcc which host compiler to use.

* Fix python formatting.

* Simplify the test for gfortran in nek* packages.

* ceed: 2.0 uses petsc@3.11.0

* hpgmg-0.4; use from ceed@2.0.0

* Update the hypre dependency for ceed 2.0.

* Disable the superlu-dist dependency (through hypre) when using a
+quickbuild of ceed 2.0.

* petsc-3.11.0: add xlf fix

* nekcem: has a build dependency on Python 2.7+

* hpgmg: better setting of compiler options and use python for configure

* libceed: use v0.4 tag

* libceed: fix 0.4 release oops (pkgconfig version)

* Add a patch for magma-2.5.0 that brings it up the current 'master'.

* In the mfem package, install the examples, miniapps, and data under
$prefix/share/mfem.

* In the magma package, apply a patch to v2.5.0 that disables
magma_sparse - for testing purposes.

* In the magma package, link the 'magma' library with the
'nvToolsExt' library.

* In the magma package, update the 'magma-2.5.0.patch' with the latest
commits from the magma source repository. Also, remove the library
'nvToolsExt' from the 'magma-2.5.0-cmake.patch' - now it is not
needed.

* In the magma package, disable OpenMP when using v2.5.0 with the
IBM XL compiler.

 Please enter the commit message for your changes. Lines starting

* In the mfem package, add version for the 'laghos-v2.0' tag; also,
prefix the versions `laghos-v*` with their respective development
version numbers -- this way they are properly ordered within spack
relative to the official numbered versions.

* petsc: add version 3.11.1 (#11179)


(cherry picked from commit 1eab6e3c86)

* ceed-2.0: use petsc-3.11.1

* this-is-so-dumb.f -> empty.f
2019-04-17 17:37:41 -07:00

146 lines
6.0 KiB
Python

# 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)
from spack import *
import os
class Ceed(Package):
"""Ceed is a collection of benchmarks, miniapps, software libraries and
APIs for efficient high-order finite element and spectral element
discretizations for exascale applications developed in the Department of
Energy (DOE) and partially supported by the Exascale Computing Project
(ECP). This is a Spack bundle package that installs the CEED software
components."""
homepage = "https://ceed.exascaleproject.org"
url = 'file://' + os.path.dirname(__file__) + '/README.md'
sha1 = 'b2eefd95c09ba573f663a761b84811a2d7e39788'
version('2.0.0', sha1, expand=False)
version('1.0.0', sha1, expand=False)
variant('cuda', default=False,
description='Build MAGMA; enable CUDA support in libCEED and OCCA')
variant('mfem', default=True, description='Build MFEM and Laghos')
variant('nek', default=True,
description='Build Nek5000, GSLIB, Nekbone, and NekCEM')
variant('occa', default=True,
description='Build OCCA; enable OCCA support in libCEED')
variant('petsc', default=True,
description='Build PETSc and HPGMG')
variant('pumi', default=True,
description='Build PUMI')
variant('quickbuild', default=True,
description='Speed-up the build by disabling variants in packages')
# TODO: Add 'int64' variant?
# LibCEED
# ceed-2.0
depends_on('libceed@0.4~cuda', when='@2.0.0~cuda')
depends_on('libceed@0.4+cuda', when='@2.0.0+cuda')
depends_on('libceed@0.4+occa', when='@2.0.0+occa')
depends_on('libceed@0.4~occa', when='@2.0.0~occa')
# ceed-1.0
depends_on('libceed@0.2~cuda', when='@1.0.0~cuda')
depends_on('libceed@0.2+cuda', when='@1.0.0+cuda')
depends_on('libceed@0.2+occa', when='@1.0.0+occa')
depends_on('libceed@0.2~occa', when='@1.0.0~occa')
# OCCA
# ceed-2.0
depends_on('occa@1.0.8~cuda', when='@2.0.0+occa~cuda')
depends_on('occa@1.0.8+cuda', when='@2.0.0+occa+cuda')
# ceed-1.0
depends_on('occa@1.0.0-alpha.5~cuda', when='@1.0.0+occa~cuda')
depends_on('occa@1.0.0-alpha.5+cuda', when='@1.0.0+occa+cuda')
# Nek5000, GSLIB, Nekbone, and NekCEM
# ceed-2.0
depends_on('nek5000@17.0', when='@2.0.0+nek')
depends_on('nektools@17.0%gcc', when='@2.0.0+nek')
depends_on('gslib@1.0.2', when='@2.0.0+nek')
depends_on('nekbone@17.0', when='@2.0.0+nek')
depends_on('nekcem@7332619', when='@2.0.0+nek')
# ceed-1.0
depends_on('nek5000@17.0', when='@1.0.0+nek')
depends_on('nektools@17.0%gcc', when='@1.0.0+nek')
depends_on('gslib@1.0.2', when='@1.0.0+nek')
depends_on('nekbone@17.0', when='@1.0.0+nek')
depends_on('nekcem@0b8bedd', when='@1.0.0+nek')
# PETSc, HPGMG
# ceed-2.0
# For a +quickbuild we disable hdf5, and superlu-dist in PETSc.
# Ideally, these can be turned into recommendations to Spack for
# concretizing the PETSc spec, if Spack ever supports recommendations.
depends_on('petsc@3.11.1~hdf5~superlu-dist',
when='@2.0.0+petsc+quickbuild')
depends_on('petsc@3.11.1+mpi+double~int64', when='@2.0.0+petsc~mfem')
# The mfem petsc examples need the petsc variants +hypre, +suite-sparse,
# and +mumps:
depends_on('petsc@3.11.1+mpi+hypre+suite-sparse+mumps+double~int64',
when='@2.0.0+petsc+mfem')
depends_on('hpgmg@0.4+fe', when='@2.0.0+petsc')
# ceed-1.0
# For a +quickbuild we disable hdf5, and superlu-dist in PETSc.
# Ideally, these can be turned into recommendations to Spack for
# concretizing the PETSc spec, if Spack ever supports recommendations.
depends_on('petsc@3.8.3~hdf5~superlu-dist',
when='@1.0.0+petsc+quickbuild')
depends_on('petsc@3.8.3+mpi+double~int64', when='@1.0.0+petsc~mfem')
# The mfem petsc examples need the petsc variants +hypre, +suite-sparse,
# and +mumps:
depends_on('petsc@3.8.3+mpi+hypre+suite-sparse+mumps+double~int64',
when='@1.0.0+petsc+mfem')
depends_on('hpgmg@a0a5510df23b+fe', when='@1.0.0+petsc')
# MAGMA
# ceed-2.0
depends_on('magma@2.5.0', when='@2.0.0+cuda')
# ceed-1.0
depends_on('magma@2.3.0', when='@1.0.0+cuda')
# PUMI
# ceed-2.0
depends_on('pumi@2.2.0', when='@2.0.0+pumi')
# ceed-1.0
depends_on('pumi@2.1.0', when='@1.0.0+pumi')
# MFEM, Laghos
# ceed-2.0
depends_on('mfem@3.4.0+mpi+examples+miniapps', when='@2.0.0+mfem~petsc')
depends_on('mfem@3.4.0+mpi+petsc+examples+miniapps',
when='@2.0.0+mfem+petsc')
depends_on('mfem@3.4.0+pumi', when='@2.0.0+mfem+pumi')
depends_on('laghos@2.0', when='@2.0.0+mfem')
# Help the spack concretizer find a suitable version of hypre:
depends_on('hypre~internal-superlu', when='@2.0.0+mfem')
depends_on('hypre~internal-superlu~superlu-dist',
when='@2.0.0+mfem+quickbuild')
# If using gcc version <= 4.8 build suite-sparse version <= 5.1.0
depends_on('suite-sparse@:5.1.0', when='@2.0.0%gcc@:4.8+mfem+petsc')
# ceed-1.0
depends_on('mfem@3.3.2+mpi+examples+miniapps', when='@1.0.0+mfem~petsc')
depends_on('mfem@3.3.2+mpi+petsc+examples+miniapps',
when='@1.0.0+mfem+petsc')
depends_on('laghos@1.0', when='@1.0.0+mfem')
# The next line seems to be necessary because the concretizer somehow
# decides that mfem requires 'hypre+internal-superlu' even though the mfem
# package lists simply 'hypre' as dependency. This is only an issue because
# petsc explicitly requires 'hypre~internal-superlu' which for the
# concretizer is a conflict.
depends_on('hypre~internal-superlu', when='@1.0.0+mfem')
# If using gcc version <= 4.8 build suite-sparse version <= 5.1.0
depends_on('suite-sparse@:5.1.0', when='@1.0.0%gcc@:4.8+mfem+petsc')
# Dummy install
def install(self, spec, prefix):
install('README.md', prefix)