1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Copyright 2013-2021 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 *
class PpopenApplAmrFdm(MakefilePackage):
"""
ppOpen-APPL/AMR-FDM is an adaptive mesh refinement (AMR) framework
for development of 3D parallel finite-difference method (FDM)
applications.
"""
homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/"
git = "https://github.com/Post-Peta-Crest/ppOpenHPC.git"
version('master', branch='APPL/FDM_AMR')
depends_on('mpi')
parallel = False
build_targets = ['default', 'advAMR3D']
def edit(self, spec, prefix):
mkdirp('bin')
mkdirp('lib')
mkdirp('include')
fflags = [
'-O3',
'-I.',
]
makefile_in = FileFilter('Makefile.in')
makefile_in.filter('^PREFIX +=.*', 'PREFIX = {0}'.format(prefix))
makefile_in.filter(
'^INCDIR +=.*',
'INCDIR = {0}/include'.format(self.build_directory)
)
makefile_in.filter(
'^LIBDIR +=.*',
'LIBDIR = {0}/lib'.format(self.build_directory)
)
makefile_in.filter('^F90 +=.*', 'F90 = {0}'.format(spack_fc))
makefile_in.filter(
'^MPIF90 +=.*',
'MPIF90 = {0}'.format(spec['mpi'].mpifc)
)
makefile_in.filter(
'^sFFLAGS +=.*',
'sFFLAGS = {0}'.format(' '.join(fflags))
)
fflags.append(self.compiler.openmp_flag)
makefile_in.filter(
'^pFFLAGS +=.*',
'pFFLAGS = {0}'.format(' '.join(fflags))
)
def install(self, spec, prefix):
install_tree('include', prefix.include)
install_tree('lib', prefix.lib)
install_tree('bin', prefix.bin)
install_tree('doc', prefix.doc)
|