add MoFEM packages (#8700)
* add mofem-cephas package * add mofem fracture module * add user modules build and fracture modyle * add minimal surface module * add slepc variant * bump mofem core lib version * bump mofem core lib version * bump version * fix bug * set upper bound to petsc version and other chanes * fix indentation * add minimal med file installation * chcekc with flake8 and installation with spack packages * add variants to med package * upper bound to adol-c and remove obsolete internal package install * fix basic module install * module install from external source in extended prefix * remove obsolte code and reverse to variant doxygen * fix git adress * improve packaging for mofem users modules * fix flake8 * move dependencies after variants * move root_cmakelists_dir right before cmake_args * remove unused variants * use append for single element * replace root_cmakelists_dir * use install_tree instead copy tree * simplify code * remove phase and mkdirp * add run tests * instal ext modules to ext_users_modules directory * move version below url * simplify directory name * use underscore in variant name * remove unused variable * fix link to blas libs * add missing boost dependence * fix problem with copying module source code * change variant name form doxygen to docs * add expanded description * make installation consistent with spack * fix flake8 * make extensions installed * code comments and minor corrections * make slepc variant false by default
This commit is contained in:
100
var/spack/repos/builtin/packages/mofem-cephas/package.py
Normal file
100
var/spack/repos/builtin/packages/mofem-cephas/package.py
Normal file
@@ -0,0 +1,100 @@
|
||||
##############################################################################
|
||||
# This file is part of Spack.
|
||||
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
|
||||
# LLNL-CODE-647188
|
||||
#
|
||||
# For details, see https://github.com/spack/spack
|
||||
# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License (as
|
||||
# published by the Free Software Foundation) version 2.1, February 1999.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
|
||||
# conditions of the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class MofemCephas(CMakePackage):
|
||||
"""mofem-cephas core library"""
|
||||
|
||||
homepage = "http://mofem.eng.gla.ac.uk"
|
||||
url = "https://bitbucket.org/likask/mofem-cephas.git"
|
||||
|
||||
maintainers = ['likask']
|
||||
|
||||
version('0.8.7', git='https://bitbucket.org/likask/mofem-cephas.git',
|
||||
tag='v0.8.7', submodules=True)
|
||||
version('develop',
|
||||
git='https://bitbucket.org/likask/mofem-cephas.git',
|
||||
branch='develop', submodules=True)
|
||||
|
||||
# This option can be only used for development of core lib
|
||||
variant('copy_user_modules', default=True,
|
||||
description='Copy user modules directory instead linking to source')
|
||||
variant('adol-c', default=True, description='Compile with Adol-C')
|
||||
variant('tetgen', default=True, description='Compile with Tetgen')
|
||||
variant('med', default=True, description='Compile with Med')
|
||||
variant('slepc', default=False, description='Compile with Slepc')
|
||||
|
||||
depends_on("mpi")
|
||||
depends_on("boost")
|
||||
depends_on("parmetis")
|
||||
# Fixed version of hdf5, to remove some problems with dependent
|
||||
# packages, f.e. MED format
|
||||
depends_on("hdf5@:1.8.19+hl+mpi")
|
||||
depends_on("petsc@:3.9.2+mumps+mpi")
|
||||
depends_on('slepc', when='+slepc')
|
||||
depends_on("moab")
|
||||
# Upper bound set to ADOL-C until issues with memory leaks
|
||||
# for versions 2.6: fully resolved
|
||||
depends_on("adol-c@2.5.2~examples", when="+adol-c")
|
||||
depends_on("tetgen", when="+tetgen")
|
||||
depends_on("med", when='+med')
|
||||
|
||||
extendable = True
|
||||
|
||||
root_cmakelists_dir = 'mofem'
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
options = []
|
||||
|
||||
# obligatory options
|
||||
options.extend([
|
||||
'-DWITH_SPACK=YES',
|
||||
'-DPETSC_DIR=%s' % spec['petsc'].prefix,
|
||||
'-DPETSC_ARCH=',
|
||||
'-DMOAB_DIR=%s' % spec['moab'].prefix,
|
||||
'-DBOOST_DIR=%s' % spec['boost'].prefix])
|
||||
|
||||
# build tests
|
||||
options.append('-DMOFEM_BUILD_TETS={0}'.format(
|
||||
'ON' if self.run_tests else 'OFF'))
|
||||
|
||||
# variant packages
|
||||
if '+adol-c' in spec:
|
||||
options.append('-DADOL-C_DIR=%s' % spec['adol-c'].prefix)
|
||||
|
||||
if '+tetgen' in spec:
|
||||
options.append('-DTETGEN_DIR=%s' % spec['tetgen'].prefix)
|
||||
|
||||
if '+med' in spec:
|
||||
options.append('-DMED_DIR=%s' % spec['med'].prefix)
|
||||
|
||||
if '+slepc' in spec:
|
||||
options.append('-DSLEPC_DIR=%s' % spec['slepc'].prefix)
|
||||
|
||||
# copy users modules, i.e. stand alone vs linked users modules
|
||||
options.append(
|
||||
'-DSTAND_ALLONE_USERS_MODULES=%s' %
|
||||
('YES' if '+copy_user_modules' in spec else 'NO'))
|
||||
return options
|
Reference in New Issue
Block a user