flake8 fixes for superlu-dist

This commit is contained in:
Denis Davydov 2016-06-15 18:31:39 +02:00
parent 3d3a26cd9a
commit 6d714e4425

View file

@ -25,8 +25,10 @@
from spack import *
import glob
class SuperluDist(Package):
"""A general purpose library for the direct solution of large, sparse, nonsymmetric systems of linear equations on high performance machines."""
"""A general purpose library for the direct solution of large, sparse,
nonsymmetric systems of linear equations on high performance machines."""
homepage = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
url = "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_4.1.tar.gz"
@ -36,11 +38,11 @@ class SuperluDist(Package):
version('4.1', '4edee38cc29f687bd0c8eb361096a455')
version('4.0', 'c0b98b611df227ae050bc1635c6940e0')
depends_on ('mpi')
depends_on ('blas')
depends_on ('lapack')
depends_on ('parmetis')
depends_on ('metis@5:')
depends_on('mpi')
depends_on('blas')
depends_on('lapack')
depends_on('parmetis')
depends_on('metis@5:')
def install(self, spec, prefix):
makefile_inc = []
@ -49,25 +51,28 @@ def install(self, spec, prefix):
'DSuperLUroot = %s' % self.stage.source_path,
'DSUPERLULIB = $(DSuperLUroot)/lib/libsuperlu_dist.a',
'BLASDEF = -DUSE_VENDOR_BLAS',
'BLASLIB = %s %s' % (to_link_flags(spec['lapack'].lapack_shared_lib),to_link_flags(spec['blas'].blas_shared_lib)),
'BLASLIB = %s %s' %
(to_link_flags(spec['lapack'].lapack_shared_lib),
to_link_flags(spec['blas'].blas_shared_lib)),
'METISLIB = -L%s -lmetis' % spec['metis'].prefix.lib,
'PARMETISLIB = -L%s -lparmetis' % spec['parmetis'].prefix.lib,
'FLIBS =',
'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)',
'LIBS = $(DSUPERLULIB) $(BLASLIB) $(PARMETISLIB) $(METISLIB)', # NOQA: ignore=E501
'ARCH = ar',
'ARCHFLAGS = cr',
'RANLIB = true',
'CC = %s' % spec['mpi'].mpicc,
'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %(spec['parmetis'].prefix.include, spec['metis'].prefix.include),
'CFLAGS = -fPIC -std=c99 -O2 -I%s -I%s' %
(spec['parmetis'].prefix.include,
spec['metis'].prefix.include),
'NOOPTS = -fPIC -std=c99',
'FORTRAN = %s' % spec['mpi'].mpif77,
'F90FLAGS = -O2',
'LOADER = %s' % spec['mpi'].mpif77,
'LOADOPTS =',
'CDEFS = -DAdd_'
])
])
#with working_dir('src'):
with open('make.inc', 'w') as fh:
fh.write('\n'.join(makefile_inc))
@ -82,9 +87,10 @@ def install(self, spec, prefix):
mkdirp(headers_location)
mkdirp(prefix.lib)
headers = glob.glob(join_path(self.stage.source_path, 'SRC','*.h'))
headers = glob.glob(join_path(self.stage.source_path, 'SRC', '*.h'))
for h in headers:
install(h,headers_location)
install(h, headers_location)
superludist_lib = join_path(self.stage.source_path, 'lib/libsuperlu_dist.a')
install(superludist_lib,self.prefix.lib)
superludist_lib = join_path(self.stage.source_path,
'lib/libsuperlu_dist.a')
install(superludist_lib, self.prefix.lib)