summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort-nojiri <68096132+t-nojiri@users.noreply.github.com>2020-09-02 10:03:47 +0900
committerGitHub <noreply@github.com>2020-09-01 18:03:47 -0700
commitae3f3887a65e4e9e90f279d24cc35263ab1e729a (patch)
tree03eca0f9da1a7f063e7a014231ab1ecbd08b4825
parentae44a8ff644629adbf61440383939cc670d1d390 (diff)
downloadspack-ae3f3887a65e4e9e90f279d24cc35263ab1e729a.tar.gz
spack-ae3f3887a65e4e9e90f279d24cc35263ab1e729a.tar.bz2
spack-ae3f3887a65e4e9e90f279d24cc35263ab1e729a.tar.xz
spack-ae3f3887a65e4e9e90f279d24cc35263ab1e729a.zip
ccs-qcd: Change compile option for aarch64 (#17516)
* ccs-qcd: Change compile option for aarch64
-rw-r--r--var/spack/repos/builtin/packages/ccs-qcd/package.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/ccs-qcd/package.py b/var/spack/repos/builtin/packages/ccs-qcd/package.py
index d1e5c9abd8..31b85dd969 100644
--- a/var/spack/repos/builtin/packages/ccs-qcd/package.py
+++ b/var/spack/repos/builtin/packages/ccs-qcd/package.py
@@ -7,7 +7,8 @@ from spack import *
from spack.error import SpackError
-def class_validator(pkg_name, variant_name, values):
+def class_validator(values):
+ """1, 2, 3, 4, 5, 6"""
values = int(values[0])
if values < 1 or values > 6:
error_msg = ("class: Choose one of the following:\n"
@@ -33,24 +34,33 @@ class CcsQcd(MakefilePackage):
version('master', branch='master')
version('1.2.1', commit='d7c6b6923f35a824e997ba8db5bd12dc20dda45c')
- variant('class', values=int, default=1,
+ variant('class', default=1, values=class_validator,
description='This miniapp has five problem classes, for which the'
' first three are relatively small problems just for testing'
' this miniapp itself. The remaining two are the target problem'
' sizes for the HPCI FS evaluation.',
- multi=False, validator=class_validator)
+ multi=False)
depends_on('mpi')
parallel = False
def edit(self, spec, prefix):
+ if spec.satisfies('%gcc') and spec.satisfies('arch=aarch64:'):
+ chgopt = 'FFLAGS =-O3 -ffixed-line-length-132 -g -fopenmp' \
+ ' -mcmodel=large -funderscoring'
+ filter_file('FFLAGS =.*', chgopt, join_path(
+ self.stage.source_path, 'src', 'make.gfortran.inc'))
if '%fj' in spec:
- filter_file('mpifrtpx', spec['mpi'].mpifc, './src/make.fx10.inc')
- filter_file('mpifccpx', spec['mpi'].mpicc, './src/make.fx10.inc')
+ filter_file('mpifrtpx', spec['mpi'].mpifc, join_path(
+ self.stage.source_path, 'src', 'make.fx10.inc'))
+ filter_file('mpifccpx', spec['mpi'].mpicc, join_path(
+ self.stage.source_path, 'src', 'make.fx10.inc'))
else:
- filter_file('mpif90', spec['mpi'].mpifc, './src/make.gfortran.inc')
- filter_file('mpicc', spec['mpi'].mpicc, './src/make.gfortran.inc')
+ filter_file('mpif90', spec['mpi'].mpifc, join_path(
+ self.stage.source_path, 'src', 'make.gfortran.inc'))
+ filter_file('mpicc', spec['mpi'].mpicc, join_path(
+ self.stage.source_path, 'src', 'make.gfortran.inc'))
def build(self, spec, prefix):
ccs_class = 'CLASS=' + spec.variants['class'].value