summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorToyohisa Kameyama <kameyama@riken.jp>2020-03-27 12:40:22 +0900
committerGitHub <noreply@github.com>2020-03-26 22:40:22 -0500
commit82936602172c76da3832f69bc45d5c93e7f16a85 (patch)
tree7d81ebe14c729e7fa758916ae2ef17e65eafb991 /var
parente989c05cd0e249be41cd7a4a24f2b126c3ce6f8d (diff)
downloadspack-82936602172c76da3832f69bc45d5c93e7f16a85.tar.gz
spack-82936602172c76da3832f69bc45d5c93e7f16a85.tar.bz2
spack-82936602172c76da3832f69bc45d5c93e7f16a85.tar.xz
spack-82936602172c76da3832f69bc45d5c93e7f16a85.zip
ppOpen-MATH/MP: New package. (#15690)
* ppOpen-MATH/MP: New package. * Fix quote.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ppopen-math-mp/package.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ppopen-math-mp/package.py b/var/spack/repos/builtin/packages/ppopen-math-mp/package.py
new file mode 100644
index 0000000000..8f62264485
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ppopen-math-mp/package.py
@@ -0,0 +1,51 @@
+# 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 PpopenMathMp(MakefilePackage):
+ """
+ ppOpen-Math/MP 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,
+ ppOpen-Math/MP is designed so as that it is independent from grid
+ structure. Instead of grid structure, PpohMATHMP 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 ppOpen-Math/MP API.
+
+ Current version of ppOpen-Math/MP is ver.1.0 which targets scalar
+ data exchange. An exchange code of vector data which requires rotation
+ calculation is under development and will be released the next version.
+ """
+
+ homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/"
+ url = "file://{0}/ppohMATHMP_1.0.0.tar.gz".format(os.getcwd())
+
+ version('1.0.0', sha256='eb85a181286e4e7d071bd7c106fa547d38cfd16df87753e9d4e38da1a84a8f22')
+
+ depends_on('mpi')
+
+ build_directory = 'src'
+ build_targets = ['FC_XXX=spack']
+ parallel = False
+
+ def edit(self, spec, prefix):
+ flags = ['-I.']
+ if spec.satisfies('%gcc'):
+ flags.append('-ffree-line-length-none')
+ with open('src/Makefile', 'a') as makefile:
+ makefile.write('FC_spack = {0}\n'.format(spec['mpi'].mpifc))
+ makefile.write('FFLAGS_spack = {0}\n'.format(' '.join(flags)))
+ makefile.write('AR_spack = ar cr\n')
+
+ def install(self, spec, prefix):
+ for d in ['include', 'lib', 'doc', 'test']:
+ mkdir(join_path(prefix, d))
+ copy_tree(d, join_path(prefix, d))