diff options
author | iulian787 <iulian787@users.noreply.github.com> | 2017-06-23 09:53:43 -0400 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2017-06-23 08:53:43 -0500 |
commit | 75b8d728bd502193b1e8e213f8e04206f3bde056 (patch) | |
tree | 53db6ac10e06f202be078fcb48a276d7dad155d1 /var/spack/repos/builtin/packages/netgen/package.py | |
parent | 811ea4f465438c285478665fa967c0a12b8c7691 (diff) | |
download | spack-75b8d728bd502193b1e8e213f8e04206f3bde056.tar.gz spack-75b8d728bd502193b1e8e213f8e04206f3bde056.tar.bz2 spack-75b8d728bd502193b1e8e213f8e04206f3bde056.tar.xz spack-75b8d728bd502193b1e8e213f8e04206f3bde056.zip |
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
Diffstat (limited to 'var/spack/repos/builtin/packages/netgen/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/netgen/package.py | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/netgen/package.py b/var/spack/repos/builtin/packages/netgen/package.py new file mode 100644 index 0000000000..ee96fac04d --- /dev/null +++ b/var/spack/repos/builtin/packages/netgen/package.py @@ -0,0 +1,83 @@ +############################################################################## +# 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 Netgen(AutotoolsPackage): + """NETGEN is an automatic 3d tetrahedral mesh generator. It accepts + input from constructive solid geometry (CSG) or boundary + representation (BRep) from STL file format. The connection to + a geometry kernel allows the handling of IGES and STEP files. + NETGEN contains modules for mesh optimization and hierarchical + mesh refinement. """ + + homepage = "https://ngsolve.org/" + url = "https://gigenet.dl.sourceforge.net/project/netgen-mesher/netgen-mesher/5.3/netgen-5.3.1.tar.gz" + + version('5.3.1', 'afd5a9b0b1296c242a9c554f06af6510') + + variant("mpi", default=True, description='enable mpi support') + variant("oce", default=False, description='enable oce geometry kernel') + variant("gui", default=False, description='enable gui') + variant("metis", default=False, description='use metis for partitioning') + + depends_on('mpi', when='+mpi') + depends_on('oce+X11', when='+oce') + depends_on('metis', when='+metis') + + def url_for_version(self, version): + url = "https://gigenet.dl.sourceforge.net/project/netgen-mesher/netgen-mesher/{0}/netgen-{1}.tar.gz" + return url.format(version.up_to(2), version) + + def configure_args(self): + spec = self.spec + args = [] + if '+mpi' in spec: + args.extend([ + "CC={0}".format(spec['mpi'].mpicc), + "CXX={0}".format(spec['mpi'].mpicxx) + ]) + else: + args.append("--without-mpi") + + if '+oce' in spec: + args.append("--with-occ={0}".format(spec['oce'].prefix)) + # FIXME + # due to a bug in netgen config, when --without-occ is specified + # or --with-occ=no, OCC flags is turned true, and build fails + # later; so do not specify anything like that + # else: + # args.append("--without-occ") + + if '~gui' in spec: + args.append("--disable-gui") + else: + args.append("--enable-gui") + if '+metis' in spec: + args.append('--with-metis=%s' % spec['metis'].prefix) + else: + args.append("--without-metis") + + return args |