summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/ppopen-appl-bem/package.py')
-rw-r--r--var/spack/repos/builtin/packages/ppopen-appl-bem/package.py48
1 files changed, 21 insertions, 27 deletions
diff --git a/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py b/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py
index b1f282cc47..f489039a32 100644
--- a/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py
+++ b/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py
@@ -24,57 +24,51 @@ class PpopenApplBem(MakefilePackage):
homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/"
git = "https://github.com/Post-Peta-Crest/ppOpenHPC.git"
- version('master', branch='APPL/BEM')
+ version("master", branch="APPL/BEM")
- depends_on('mpi')
+ depends_on("mpi")
parallel = False
- hacapk_src_dir = join_path(
- 'HACApK_1.0.0',
- 'src',
- 'HACApK_with_BEM-BB-framework_1.0.0'
- )
+ hacapk_src_dir = join_path("HACApK_1.0.0", "src", "HACApK_with_BEM-BB-framework_1.0.0")
src_directories = [
- join_path('bem-bb-framework_dense', 'src', 'framework_with_templates'),
- join_path('bem-bb-framework_dense', 'src', 'framework'),
- hacapk_src_dir
+ join_path("bem-bb-framework_dense", "src", "framework_with_templates"),
+ join_path("bem-bb-framework_dense", "src", "framework"),
+ hacapk_src_dir,
]
def edit(self, spec, prefix):
flags = [self.compiler.openmp_flag]
fflags = flags[:]
- if spec.satisfies('%gcc'):
- fflags.append('-ffree-line-length-none')
+ if spec.satisfies("%gcc"):
+ fflags.append("-ffree-line-length-none")
filter_file(
- 'bem-bb-SCM.out',
- 'HACApK-bem-bb-sSCM.out',
- join_path(self.hacapk_src_dir, 'Makefile')
+ "bem-bb-SCM.out", "HACApK-bem-bb-sSCM.out", join_path(self.hacapk_src_dir, "Makefile")
)
for d in self.src_directories:
with working_dir(d):
- with open('Makefile', 'a') as m:
- m.write('ifeq ($(SYSTEM),spack)\n')
- m.write(' CC = {0}\n'.format(spec['mpi'].mpicc))
- m.write(' F90 = {0}\n'.format(spec['mpi'].mpifc))
- m.write(' CCFLAGS = {0}\n'.format(' '.join(flags)))
- m.write(' F90FLAGS = {0}\n'.format(' '.join(fflags)))
- m.write(' FFLAGS = {0}\n'.format(' '.join(fflags)))
- m.write(' LDFLAGS = {0}\n'.format(' '.join(flags)))
- m.write('endif\n')
+ with open("Makefile", "a") as m:
+ m.write("ifeq ($(SYSTEM),spack)\n")
+ m.write(" CC = {0}\n".format(spec["mpi"].mpicc))
+ m.write(" F90 = {0}\n".format(spec["mpi"].mpifc))
+ m.write(" CCFLAGS = {0}\n".format(" ".join(flags)))
+ m.write(" F90FLAGS = {0}\n".format(" ".join(fflags)))
+ m.write(" FFLAGS = {0}\n".format(" ".join(fflags)))
+ m.write(" LDFLAGS = {0}\n".format(" ".join(flags)))
+ m.write("endif\n")
def build(self, spec, prefix):
for d in self.src_directories:
with working_dir(d):
- make('SYSTEM=spack')
+ make("SYSTEM=spack")
def install(self, spec, prefix):
mkdir(prefix.bin)
mkdir(prefix.src)
for d in self.src_directories:
- for f in find(d, '*.out'):
+ for f in find(d, "*.out"):
copy(f, prefix.bin)
install_src = join_path(prefix.src, os.path.basename(d))
mkdir(install_src)
install_tree(d, install_src)
with working_dir(install_src):
- make('clean')
+ make("clean")