summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToyohisa Kameyama <kameyama@riken.jp>2020-03-31 13:02:14 +0900
committerGitHub <noreply@github.com>2020-03-30 23:02:14 -0500
commit628516c7611126f2a1b1f72d57e4cfd95535cf30 (patch)
tree25267ff032cfe2286956f6c7be16b6127f401509
parent864960937dfdc7e65faba99fd12ece6578b0b490 (diff)
downloadspack-628516c7611126f2a1b1f72d57e4cfd95535cf30.tar.gz
spack-628516c7611126f2a1b1f72d57e4cfd95535cf30.tar.bz2
spack-628516c7611126f2a1b1f72d57e4cfd95535cf30.tar.xz
spack-628516c7611126f2a1b1f72d57e4cfd95535cf30.zip
ppOpen-APPL/FVM: new package. (#15772)
* ppOpen-APPL/FVM: new package. * copy_tree -> install_tree.
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py63
1 files changed, 63 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py b/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py
new file mode 100644
index 0000000000..2dd6872cc2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py
@@ -0,0 +1,63 @@
+# Copyright 2013-2020 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 PpopenApplFvm(MakefilePackage):
+ """
+ ppOpen-APPL/FVM ia a coupling library that enables weak
+ coupling on various simulation models, such as an
+ atmospheric model and an ocean model, a seismic model
+ and a structure model. For getting very wide
+ applicability, ppohMATHMP is designed so as that it is
+ independent from grid structure. Instead of grid
+ structure, ppOpen-APPL/FVM requires a data set
+ called 'mapping table'. Mapping table is composed of
+ a correspondence table of grid indexes between a send
+ model and a receive model and interpolation coefficients.
+ A subroutine for making a mapping table file is provided
+ by ppohMATHMP API.
+
+ Current version of ppohMATHMP is ver.1.0 which targets
+ scalar data exchange. An exchange code of vector data
+ which requires rotation calculation is under
+ """
+
+ homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/"
+ url = "file://{0}/ppohFVM_0.3.0.tar.gz".format(os.getcwd())
+
+ version('0.3.0', sha256='4e05dd71f4eeda62c9683b7c3069a2537f3c2c7e86ba50a00d4963f41d9cbe29')
+
+ depends_on('mpi')
+ depends_on('metis@:4')
+
+ def edit(self, spec, prefix):
+ fflags = ['-O3']
+ if spec.satisfies('%gcc'):
+ fflags.append('-ffree-line-length-none')
+ makefile_in = FileFilter('Makefile.in')
+ makefile_in.filter(
+ r'^PREFIX *=.*$',
+ 'PREFIX = {0}'.format(prefix)
+ )
+ makefile_in.filter(
+ r'^METISDIR *=.*$',
+ 'METISDIR = {0}'.format(spec['metis'].prefix.lib)
+ )
+ makefile_in.filter('mpifrtpx', spec['mpi'].mpifc)
+ makefile_in.filter('frtpx', spack_fc)
+ makefile_in.filter('-Kfast', ' '.join(fflags))
+ makefile_in.filter(
+ ',openmp',
+ ' {0}'.format(self.compiler.openmp_flag)
+ )
+
+ def install(self, spec, prefix):
+ make('install')
+ install_tree('examples', prefix.examples)
+ install_tree('doc', prefix.doc)