summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorhomerdin <homerdin@gmail.com>2017-07-14 15:55:51 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2017-07-14 15:55:51 -0500
commit246c07f864d2db571f7e3ab55e875a4e75b93281 (patch)
treecec6889378317d7591bf88350cc03c29683bbedf /var
parent31503cb058f28088c3f4031c30ff59fe8046dbe0 (diff)
downloadspack-246c07f864d2db571f7e3ab55e875a4e75b93281.tar.gz
spack-246c07f864d2db571f7e3ab55e875a4e75b93281.tar.bz2
spack-246c07f864d2db571f7e3ab55e875a4e75b93281.tar.xz
spack-246c07f864d2db571f7e3ab55e875a4e75b93281.zip
New Package: miniFE (#4712)
* New Package: miniFE * Removed extra property, using variant value directly
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/minife/package.py80
1 files changed, 80 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/minife/package.py b/var/spack/repos/builtin/packages/minife/package.py
new file mode 100644
index 0000000000..ced755d112
--- /dev/null
+++ b/var/spack/repos/builtin/packages/minife/package.py
@@ -0,0 +1,80 @@
+##############################################################################
+# 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 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
+##############################################################################
+
+import tarfile
+
+from spack import *
+
+
+class Minife(MakefilePackage):
+ """Proxy Application. MiniFE is an proxy application
+ for unstructured implicit finite element codes.
+ """
+
+ homepage = "https://mantevo.org/"
+ url = "http://mantevo.org/downloads/releaseTarballs/miniapps/MiniFE/miniFE-2.0.1.tgz"
+
+ tags = ['proxy-app']
+
+ version('2.0.1', '3113d7c8fc01495d08552672b0dbd015')
+
+ variant('build', default='ref', description='Type of Parallelism',
+ values=('ref', 'openmp_ref', 'qthreads', 'kokkos'))
+
+ depends_on('mpi')
+ depends_on('qthreads', when='build=qthreads')
+
+ @property
+ def build_version(self):
+ return self.version.up_to(2)
+
+ @property
+ def build_targets(self):
+ targets = [
+ '--directory=miniFE-{0}_{1}/src'.format(
+ self.build_version, self.spec.variants['build'].value),
+ 'CXX={0}'.format(self.spec['mpi'].mpicxx),
+ 'CC={0}'.format(self.spec['mpi'].mpicc)
+ ]
+
+ return targets
+
+ def edit(self, spec, prefix):
+ inner_tar = tarfile.open(name='miniFE-{0}_{1}.tgz'.format(
+ self.build_version,
+ self.spec.variants['build'].value))
+ inner_tar.extractall()
+
+ makefile = FileFilter('miniFE-{0}_{1}/src/Makefile'.format(
+ self.build_version,
+ self.spec.variants['build'].value))
+
+ makefile.filter('-fopenmp', self.compiler.openmp_flag, string=True)
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install('miniFE-{0}_{1}/src/miniFE.x'.format(
+ self.build_version, self.spec.variants['build'].value),
+ prefix.bin)