Moab 5.0 and meshkit 1.5 (#4557)

* enable some of the tools

do not make zoltan default

* modify moab package

add shared, debug options to cgm, too
build some tools by default (mbsize, mbconvert)
add hdf5, netcdf dependency
add pnetcdf variant (dependency), metis, parmetis, zoltan
add shared, debug, fortran options to moab

* few kinks for moab

zoltan should be built without fortran api, otherwise moab
complains (need to fix)
also, notice that when built with cgm, shared can't find
cgm libraries for the new tools/geometry execs

install in serial for the time being (because of example makefile
duplicate?)

for example, these builds are successful:
spack install moab+mpi+hdf5+zoltan ^mpich@3.2
spack install moab+mpi+hdf5+shared ^mpich@3.2

* force hdf5+mpi if both are specified

also, something like this works:
spack install  moab+mpi+hdf5+cgm ^mpich@3.2 ^cgm+oce+mpi ^oce@0.17.2

use mpich32, and cgm built with oce 0.17.2

* forgot about irel, fbigeom, mbcoupler

* add meshkit package

simple build so far, moab and cgm deps only

also, an example of complex build for cgm
spack install  moab+mpi+hdf5+cgm+irel+fbigeom ^mpich@3.2 ^cgm+oce+mpi ^oce@0.17.2

* for meshkit, moab needs to have irel, fbigeom

* forgot to self.spec

after building moab with cgm with oce 0.17.2, we can build
meshkit with something like this
spack install meshkit ^moab/tsb75zk

cgm depencency is found out from moab

moab has to be built with irel and fbigeom

* add netgen package and review

do not support yet older versions of meshkit
(which depend on lasso, etc)
add netgen package; tested with meshkit (netgen has to be built without
occ, for meshkit)
We are not enforcing that yet, we may have to test

* use conflicts where needed, suggested by review

remove release candidates

* flake8 alignment errors

* flake8

* reviews

flake8 alignment
explicit options, even for default variants
variant for netgen should be "gui", with the default ~gui (False)
FIXME: with-occ does not work right for netgen ; maybe it should be disabled?
       also, with +gui, it should depend on a lot more, like tk, tcl?

* flake8 issues

whitespaces and a comment in netgen

* add more explicit options

--without-mpi needs fixing for cgm, moab and meshkit
add variable url for netgen (although we don''t know if other
versions will appear)

* flake8, trailing whitespace
This commit is contained in:
iulian787
2017-06-23 09:53:43 -04:00
committed by Adam J. Stewart
parent 811ea4f465
commit 75b8d728bd
4 changed files with 296 additions and 42 deletions

View File

@@ -0,0 +1,81 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# 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/llnl/spack
# Please also see the LICENSE file 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 Meshkit(AutotoolsPackage):
"""MeshKit is an open-source library of mesh generation functionality.
Its design philosophy is two-fold: it provides a collection of
meshing algorithms for use in real meshing problems, along with
other tools commonly needed to support mesh generation"""
homepage = "http://sigma.mcs.anl.gov/meshkit-library"
url = "http://ftp.mcs.anl.gov/pub/fathom/meshkit-1.5.0.tar.gz"
version('1.5.0', '90b52416598ef65525ce4457a50ffe68')
variant("mpi", default=True, description='enable mpi support')
variant("netgen", default=False, description='enable netgen support')
variant("debug", default=False, description='enable debug symbols')
variant("shared", default=False, description='enable shared builds')
depends_on('mpi', when='+mpi')
depends_on('netgen', when='+netgen')
depends_on('cgm')
depends_on('moab+irel+fbigeom')
def configure_args(self):
spec = self.spec
args = [
"--with-igeom={0}".format(spec['cgm'].prefix),
"--with-imesh={0}".format(spec['moab'].prefix)
]
if '+mpi' in spec:
args.extend([
"--with-mpi",
"CC={0}".format(spec['mpi'].mpicc),
"CXX={0}".format(spec['mpi'].mpicxx),
"FC={0}".format(spec['mpi'].mpifc)
])
# FIXME without-mpi is not working
# else:
# args.append("--without-mpi")
if '+netgen' in spec:
args.append("--with-netgen={0}".format(spec['netgen'].prefix))
else:
args.append("--without-netgen")
if '+debug' in spec:
args.append("--enable-debug")
else:
args.append("--disable-debug")
if '+shared' in spec:
args.append("--enable-shared")
else:
args.append("--disable-shared")
return args